416dec4bcf1854bcc0cf18e6521379dd601a7231 hiram Sun Aug 13 18:37:33 2023 -0700 allow -ram=Ng argument to get through to the para make command no redmine diff --git src/hg/utils/automation/doSameSpeciesLiftOver.pl src/hg/utils/automation/doSameSpeciesLiftOver.pl index 541cf24..f86b529 100755 --- src/hg/utils/automation/doSameSpeciesLiftOver.pl +++ src/hg/utils/automation/doSameSpeciesLiftOver.pl @@ -13,30 +13,31 @@ use HgAutomate; use HgRemoteScript; use HgStepManager; # Option variable names, both common and peculiar to this script: use vars @HgAutomate::commonOptionVars; use vars @HgStepManager::optionVars; use vars qw/ $opt_buildDir $opt_ooc $opt_target2Bit $opt_targetSizes $opt_query2Bit $opt_querySizes $opt_localTmp + $opt_ram /; # Specify the steps supported with -continue / -stop: my $stepper = new HgStepManager( [ { name => 'align', func => \&doAlign }, { name => 'chain', func => \&doChain }, { name => 'net', func => \&doNet }, { name => 'load', func => \&doLoad }, { name => 'cleanup', func => \&doCleanup }, ] ); # Option defaults: my $dbHost = 'hgwdev'; @@ -57,30 +58,31 @@ options: "; print STDERR $stepper->getOptionHelp(); print STDERR <<_EOF_ -buildDir dir Use dir instead of default $HgAutomate::clusterData/\$fromDb/$HgAutomate::trackBuild/blat.\$toDb.\$date (necessary when continuing at a later date). -ooc /path/11.ooc Use this instead of the default /hive/data/genomes/fromDb/11.ooc Can be "none". -target2Bit /path/target.2bit Full path to target sequence (fromDb) -query2Bit /path/query.2bit Full path to query sequence (toDb) -targetSizes /path/target.chrom.sizes Full path to target chrom.sizes (fromDb) -querySizes /path/query.chrom.sizes Full path to query chrom.sizes (toDb) -localTmp /dev/shm Full path to temporary storage for heavy I/O usage + -ram Ng set -ram=Ng argument to para create command (default 8g) _EOF_ ; print STDERR &HgAutomate::getCommonOptionHelp('dbHost' => $dbHost, 'workhorse' => '', 'fileServer' => '', 'bigClusterHub' => ''); print STDERR " Automates UCSC's same-species liftOver (blat/chain/net) pipeline, based on Kate's suite of makeLo-* scripts: align: Aligns the assemblies using blat -fastMap on a big cluster. chain: Chains the alignments on a big cluster. net: Nets the alignments, uses netChainSubset to extract liftOver chains. load: Installs liftOver chain files, calls hgAddLiftOverChain on $dbHost. cleanup: Removes or compresses intermediate files. All operations are performed in the build directory which is @@ -109,30 +111,31 @@ # Other: my ($buildDir); my ($tSeq, $tSizes, $qSeq, $qSizes, $QDb, $fileServer); my ($liftOverChainDir, $liftOverChainFile, $liftOverChainPath, $dbExists); sub checkOptions { # Make sure command line options are valid/supported. my $ok = GetOptions(@HgStepManager::optionSpec, 'buildDir=s', 'ooc=s', 'target2Bit=s', 'targetSizes=s', 'query2Bit=s', 'querySizes=s', 'localTmp=s', + 'ram=s', @HgAutomate::commonOptionSpec, ); &usage(1) if (!$ok); &usage(0, 1) if ($opt_help); &HgAutomate::processCommonOptions(); my $err = $stepper->processOptions(); usage(1) if ($err); $dbHost = $opt_dbHost if ($opt_dbHost); $localTmp = $opt_localTmp ? $opt_localTmp : $localTmp; } sub getClusterSeqs { # Choose cluster and look for already-installed 2bit files on appropriate # cluster-scratch storage. Exit with an error message if we can't find them. @@ -181,30 +184,34 @@ join("/, ", @okFilesystems) . "/ -- please distribute.\n"; } } &HgAutomate::verbose(1, "Using $paraHub, $tSeqScratch and $qSeqScratch\n"); return ($paraHub, $tSeqScratch, $qSeqScratch); } # getClusterSeqs ######################################################################### # * step: align [bigClusterHub] sub doAlign { my $runDir = "$buildDir/run.blat"; &HgAutomate::mustMkdir($runDir); + my $ramG = "-ram=8g"; + if ($opt_ram) { + $ramG = "-ram=$opt_ram"; + } my $ooc = "/hive/data/genomes/$tDb/11.ooc"; if ($opt_ooc) { if ($opt_ooc eq 'none') { $ooc = ""; } else { $ooc = "$opt_ooc"; } } my $dashOoc = "-ooc=$ooc"; my $pslDir = "$runDir/psl"; &HgAutomate::checkCleanSlate('align', 'chain', $pslDir, 'run.time'); my ($paraHub, $tSeqScratch, $qSeqScratch) = &getClusterSeqs(); if (! &HgAutomate::machineHasFile($paraHub, $ooc)) { @@ -312,31 +319,35 @@ $Bin/partitionSequence.pl $tpSize 0 $tSeqScratch \\ $tSizes 2000 \\ -lstDir=tParts > t.lst rm -rf qParts $Bin/partitionSequence.pl 10000000 0 $qSeqScratch \\ $qSizes 1000 \\ -lstDir=qParts > q.lst mkdir $pslDir foreach f (`cat t.lst`) mkdir $pslDir/\$f:t end $gensub2 t.lst q.lst gsub jobList -$paraRun +/parasol/bin/para $ramG make jobList +/parasol/bin/para check +/parasol/bin/para time > run.time +cat run.time + _EOF_ ); $bossScript->execute(); } # doAlign ######################################################################### # * step: chain [smallClusterHub] sub makePslPartsLst { # $pslDir/$tPart/ files look like either # part006.lst.psl --> make this into a single job. # $qDb.2bit:$seq:$start-$end.psl --> cat $qDb.2bit:$seq:*.psl into a job. # ==> Make a list of any part*.lst.psl plus collapsed roots # (one $qDb.2bit:$seq: per $seq).