diff --git a/Main/lib/perl/WorkflowSteps/CopyPeripheralGroupsResultsFromCache.pm b/Main/lib/perl/WorkflowSteps/CopyPeripheralGroupsResultsFromCache.pm index 8cb18172a..0cacb12b1 100644 --- a/Main/lib/perl/WorkflowSteps/CopyPeripheralGroupsResultsFromCache.pm +++ b/Main/lib/perl/WorkflowSteps/CopyPeripheralGroupsResultsFromCache.pm @@ -9,17 +9,43 @@ sub run { my $preprocessedDataCache = $self->getSharedConfig('preprocessedDataCache'); my $workflowDataDir = $self->getWorkflowDataDir(); - my $resultsDir = join("/", $workflowDataDir, $self->getParamValue("resultsDir")); + my $analysisDir = join("/", $workflowDataDir, $self->getParamValue("analysisDir")); if ($undo) { - $self->runCmd(0, "rm -rf $resultsDir/*"); + $self->runCmd(0, "echo 'undo'"); } elsif ($test) { $self->runCmd(0, "echo 'test'"); } else { - $self->runCmd(0, "cp -r ${preprocessedDataCache}/OrthoMCL/OrthoMCL_peripheralGroups/officialDiamondCache/* $resultsDir/"); + # peripheralEntryResults + $self->runCmd(0, "mkdir -p $analysisDir/peripheralEntryResults/"); + $self->runCmd(0, "cp -r ${preprocessedDataCache}/OrthoMCL/OrthoMCL_peripheralGroups/officialDiamondCache/peripherals.fasta $analysisDir/peripheralEntryResults/"); + $self->runCmd(0, "cp -r ${preprocessedDataCache}/OrthoMCL/OrthoMCL_peripheralGroups/officialDiamondCache/intraGroupBlastFile.tsv $analysisDir/peripheralEntryResults/"); + $self->runCmd(0, "cp -r ${preprocessedDataCache}/OrthoMCL/OrthoMCL_peripheralGroups/officialDiamondCache/coreBestReps.txt $analysisDir/peripheralEntryResults/"); + $self->runCmd(0, "cp -r ${preprocessedDataCache}/OrthoMCL/OrthoMCL_peripheralGroups/officialDiamondCache/GroupsFile.txt $analysisDir/peripheralEntryResults/"); + $self->runCmd(0, "cp -r ${preprocessedDataCache}/OrthoMCL/OrthoMCL_peripheralGroups/officialDiamondCache/peripheralCacheDir.tar.gz $analysisDir/peripheralEntryResults/"); + $self->runCmd(0, "cp -r ${preprocessedDataCache}/OrthoMCL/OrthoMCL_peripheralGroups/officialDiamondCache/residuals.fasta $analysisDir/peripheralEntryResults/"); + $self->runCmd(0, "cp -r ${preprocessedDataCache}/OrthoMCL/OrthoMCL_peripheralGroups/officialDiamondCache/groupStats $analysisDir/peripheralEntryResults/"); + $self->runCmd(0, "cp -r ${preprocessedDataCache}/OrthoMCL/OrthoMCL_peripheralGroups/officialDiamondCache/residuals.fasta $analysisDir/peripheralEntryResults/"); + $self->runCmd(0, "cp -r ${preprocessedDataCache}/OrthoMCL/OrthoMCL_peripheralGroups/officialDiamondCache/groupFastas $analysisDir/peripheralEntryResults/"); + # postResidualEntryResults + $self->runCmd(0, "mkdir -p $analysisDir/postResidualEntryResults/"); + $self->runCmd(0, "cp -r ${preprocessedDataCache}/OrthoMCL/OrthoMCL_peripheralGroups/officialDiamondCache/groupStats $analysisDir/postResidualEntryResults/"); + $self->runCmd(0, "cp -r ${preprocessedDataCache}/OrthoMCL/OrthoMCL_peripheralGroups/officialDiamondCache/residualBestReps.txt $analysisDir/postResidualEntryResults/"); + $self->runCmd(0, "cp -r ${preprocessedDataCache}/OrthoMCL/OrthoMCL_peripheralGroups/officialDiamondCache/residualGroupFastas $analysisDir/postResidualEntryResults/"); + $self->runCmd(0, "cp -r ${preprocessedDataCache}/OrthoMCL/OrthoMCL_peripheralGroups/officialDiamondCache/residualBuildVersion.txt $analysisDir/postResidualEntryResults/"); + $self->runCmd(0, "cp -r ${preprocessedDataCache}/OrthoMCL/OrthoMCL_peripheralGroups/officialDiamondCache/intraResidualGroupBlastFile.tsv $analysisDir/postResidualEntryResults/"); + $self->runCmd(0, "cp -r ${preprocessedDataCache}/OrthoMCL/OrthoMCL_peripheralGroups/officialDiamondCache/reformattedGroups.txt $analysisDir/postResidualEntryResults"); + # postProcessingEntryResults + $self->runCmd(0, "mkdir -p $analysisDir/postProcessingEntryResults/"); + $self->runCmd(0, "cp -r ${preprocessedDataCache}/OrthoMCL/OrthoMCL_peripheralGroups/officialDiamondCache/bestRepsFull.fasta $analysisDir/postProcessingEntryResults/"); + $self->runCmd(0, "cp -r ${preprocessedDataCache}/OrthoMCL/OrthoMCL_peripheralGroups/officialDiamondCache/fullGroupFile.txt $analysisDir/postProcessingEntryResults/"); + $self->runCmd(0, "cp -r ${preprocessedDataCache}/OrthoMCL/OrthoMCL_peripheralGroups/officialDiamondCache/similar_groups.tsv $analysisDir/postProcessingEntryResults/"); + $self->runCmd(0, "cp -r ${preprocessedDataCache}/OrthoMCL/OrthoMCL_peripheralGroups/officialDiamondCache/ortho*db.dmnd $analysisDir/postProcessingEntryResults/"); + $self->runCmd(0, "cp -r ${preprocessedDataCache}/OrthoMCL/OrthoMCL_peripheralGroups/officialDiamondCache/previousGroups.txt $analysisDir/postProcessingEntryResults/"); + $self->runCmd(0, "cp -r ${preprocessedDataCache}/OrthoMCL/OrthoMCL_peripheralGroups/officialDiamondCache/geneTrees $analysisDir/postProcessingEntryResults/"); } } diff --git a/Main/lib/perl/WorkflowSteps/InsertOrthoMCLDerivedECGenomic.pm b/Main/lib/perl/WorkflowSteps/InsertOrthoMCLDerivedECGenomic.pm index d9951a1fe..5dd444460 100644 --- a/Main/lib/perl/WorkflowSteps/InsertOrthoMCLDerivedECGenomic.pm +++ b/Main/lib/perl/WorkflowSteps/InsertOrthoMCLDerivedECGenomic.pm @@ -8,11 +8,10 @@ use ApiCommonWorkflow::Main::WorkflowSteps::WorkflowStep; sub run { my ($self, $test, $undo) = @_; - my $inputFile = $self->getWorkflowDataDir() . "/" . $self->getParamValue('inputFile'); + my $inputFile = $self->getWorkflowDataDir() . "/" . $self->getParamValue('inputFile'); my $evidenceCode = $self->getParamValue('evidenceCode'); - my $idSql = $self->getParamValue('idSql'); - my $args = "--ECMappingFile $inputFile --evidenceCode '$evidenceCode' --aaSeqLocusTagMappingSql '$idSql'"; + my $args = "--ECMappingFile $inputFile --evidenceCode '$evidenceCode'"; $self->testInputFile('inputFile', "$inputFile") unless $undo; diff --git a/Main/lib/perl/WorkflowSteps/MakeOrthoFinderPeripheralNextflowConfig.pm b/Main/lib/perl/WorkflowSteps/MakeOrthoFinderPeripheralEntryNextflowConfig.pm similarity index 76% rename from Main/lib/perl/WorkflowSteps/MakeOrthoFinderPeripheralNextflowConfig.pm rename to Main/lib/perl/WorkflowSteps/MakeOrthoFinderPeripheralEntryNextflowConfig.pm index c61c88447..51537f705 100644 --- a/Main/lib/perl/WorkflowSteps/MakeOrthoFinderPeripheralNextflowConfig.pm +++ b/Main/lib/perl/WorkflowSteps/MakeOrthoFinderPeripheralEntryNextflowConfig.pm @@ -1,4 +1,4 @@ -package ApiCommonWorkflow::Main::WorkflowSteps::MakeOrthoFinderPeripheralNextflowConfig; +package ApiCommonWorkflow::Main::WorkflowSteps::MakeOrthoFinderPeripheralEntryNextflowConfig; @ISA = (ApiCommonWorkflow::Main::WorkflowSteps::WorkflowStep); @@ -16,11 +16,10 @@ sub run { my $coreGroupsFile = $self->getParamValue("coreGroupsFile"); my $coreGroupSimilarities = $self->getParamValue("coreGroupSimilarities"); my $coreTranslateSequenceFile = $self->getParamValue("coreTranslateSequenceFile"); + my $outdatedOrganisms = $self->getParamValue("outdatedOrganisms"); + my $peripheralDiamondCache = $self->getParamValue("peripheralDiamondCache"); + my $buildVersion = $self->getSharedConfig("buildVersion"); - my $residualBuildVersion = $self->getSharedConfig("residualBuildVersion"); - my $peripheralCacheDir = $self->getParamValue("peripheralCacheDir"); - my $outdatedOrganisms = $self->getParamValue("outdated"); - my $oldGroupsFile = $self->getParamValue("oldGroupsFile"); my $resultsDirectory = $self->getParamValue("clusterResultDir"); my $configPath = join("/", $self->getWorkflowDataDir(), $self->getParamValue("analysisDir"), $self->getParamValue("configFileName")); @@ -32,9 +31,8 @@ sub run { my $coreGroupsFileInNextflowWorkingDirOnCluster = $self->relativePathToNextflowClusterPath($workingDirRelativePath, $coreGroupsFile); my $coreGroupSimilaritiesInNextflowWorkingDirOnCluster = $self->relativePathToNextflowClusterPath($workingDirRelativePath, $coreGroupSimilarities); my $coreTranslateSequenceFileInNextflowWorkingDirOnCluster = $self->relativePathToNextflowClusterPath($workingDirRelativePath, $coreTranslateSequenceFile); - my $peripheralCacheDirInNextflowWorkingDirOnCluster = $self->relativePathToNextflowClusterPath($workingDirRelativePath, $peripheralCacheDir); - my $outdatedFileInNextflowWorkingDirOnCluster = $self->relativePathToNextflowClusterPath($workingDirRelativePath, $outdatedOrganisms); - my $oldGroupsFileInNextflowWorkingDirOnCluster = $self->relativePathToNextflowClusterPath($workingDirRelativePath, $oldGroupsFile); + my $peripheralDiamondCacheInNextflowWorkingDirOnCluster = $self->relativePathToNextflowClusterPath($workingDirRelativePath, $peripheralDiamondCache); + my $outdatedOrganismsFileInNextflowWorkingDirOnCluster = $self->relativePathToNextflowClusterPath($workingDirRelativePath, $outdatedOrganisms); my $resultsDirectoryInNextflowWorkingDirOnCluster = $self->relativePathToNextflowClusterPath($workingDirRelativePath, $resultsDirectory); my $executor = $self->getClusterExecutor(); @@ -54,15 +52,10 @@ params { coreGroupsFile = \"$coreGroupsFileInNextflowWorkingDirOnCluster\" coreGroupSimilarities = \"$coreGroupSimilaritiesInNextflowWorkingDirOnCluster\" coreTranslateSequenceFile = \"$coreTranslateSequenceFileInNextflowWorkingDirOnCluster\" - outdatedOrganisms = \"$outdatedFileInNextflowWorkingDirOnCluster\" - oldGroupsFile = \"$oldGroupsFileInNextflowWorkingDirOnCluster\" - peripheralDiamondCache = \"$peripheralCacheDirInNextflowWorkingDirOnCluster\" - blastArgs = \"\" + outdatedOrganisms = \"$outdatedOrganismsFileInNextflowWorkingDirOnCluster\" + peripheralDiamondCache = \"$peripheralDiamondCacheInNextflowWorkingDirOnCluster\" buildVersion = $buildVersion - residualBuildVersion = $residualBuildVersion - bestRepDiamondOutputFields = \"qseqid sseqid evalue\" orthoFinderDiamondOutputFields = \"qseqid sseqid pident length mismatch gapopen qstart qend sstart send evalue bitscore\" - } process { diff --git a/Main/lib/perl/WorkflowSteps/MakeOrthoFinderPostProcessingEntryNextflowConfig.pm b/Main/lib/perl/WorkflowSteps/MakeOrthoFinderPostProcessingEntryNextflowConfig.pm new file mode 100644 index 000000000..6c1eb1819 --- /dev/null +++ b/Main/lib/perl/WorkflowSteps/MakeOrthoFinderPostProcessingEntryNextflowConfig.pm @@ -0,0 +1,88 @@ +package ApiCommonWorkflow::Main::WorkflowSteps::MakeOrthoFinderPostProcessingEntryNextflowConfig; + +@ISA = (ApiCommonWorkflow::Main::WorkflowSteps::WorkflowStep); + +use strict; +use warnings; +use ApiCommonWorkflow::Main::WorkflowSteps::WorkflowStep; + +sub run { + my ($self, $test, $undo) = @_; + + my $clusterWorkflowDataDir = $self->getClusterWorkflowDataDir(); + my $analysisDir = $self->getParamValue("analysisDir"); + my $residualFasta = $self->getParamValue("residualFasta"); + my $residualBestRepsFasta = $self->getParamValue("residualBestRepsFasta"); + my $coreBestRepsFasta = $self->getParamValue("coreBestRepsFasta"); + my $coreAndPeripheralGroups = $self->getParamValue("coreAndPeripheralGroups"); + my $coreAndPeripheralProteome = $self->getParamValue("coreAndPeripheralProteome"); + my $residualGroups = $self->getParamValue("residualGroups"); + my $coreGroupFastas = $self->getParamValue("coreGroupFastas"); + my $residualGroupFastas = $self->getParamValue("residualGroupFastas"); + my $buildVersion = $self->getSharedConfig("buildVersion"); + my $oldGroupsFile = $self->getParamValue("oldGroupsFile"); + my $bestRepDiamondOutputFields = $self->getParamValue("bestRepDiamondOutputFields"); + + my $resultsDirectory = $self->getParamValue("clusterResultDir"); + my $configPath = join("/", $self->getWorkflowDataDir(), $self->getParamValue("analysisDir"), $self->getParamValue("configFileName")); + + my $workingDirRelativePath = $self->getParamValue("workingDirRelativePath"); + + my $residualFastaInNextflowWorkingDirOnCluster = $self->relativePathToNextflowClusterPath($workingDirRelativePath, $residualFasta); + my $residualBestRepsFastaInNextflowWorkingDirOnCluster = $self->relativePathToNextflowClusterPath($workingDirRelativePath, $residualBestRepsFasta); + my $coreBestRepsFastaInNextflowWorkingDirOnCluster = $self->relativePathToNextflowClusterPath($workingDirRelativePath, $coreBestRepsFasta); + my $coreAndPeripheralGroupsInNextflowWorkingDirOnCluster = $self->relativePathToNextflowClusterPath($workingDirRelativePath, $coreAndPeripheralGroups); + my $coreAndPeripheralProteomeInNextflowWorkingDirOnCluster = $self->relativePathToNextflowClusterPath($workingDirRelativePath, $coreAndPeripheralProteome); + my $residualGroupsInNextflowWorkingDirOnCluster = $self->relativePathToNextflowClusterPath($workingDirRelativePath, $residualGroups); + my $coreGroupFastasInNextflowWorkingDirOnCluster = $self->relativePathToNextflowClusterPath($workingDirRelativePath, $coreGroupFastas); + my $residualGroupFastasInNextflowWorkingDirOnCluster = $self->relativePathToNextflowClusterPath($workingDirRelativePath, $residualGroupFastas); + my $oldGroupsFileInNextflowWorkingDirOnCluster = $self->relativePathToNextflowClusterPath($workingDirRelativePath, $oldGroupsFile); + + my $resultsDirectoryInNextflowWorkingDirOnCluster = $self->relativePathToNextflowClusterPath($workingDirRelativePath, $resultsDirectory); + + my $executor = $self->getClusterExecutor(); + my $queue = $self->getClusterQueue(); + + if ($undo) { + $self->runCmd(0,"rm -rf $configPath"); + } else { + open(F, ">", $configPath) or die "$! :Can't open config file '$configPath' for writing"; + + print F +" +params { + outputDir = \"$resultsDirectoryInNextflowWorkingDirOnCluster\" + residualFasta = \"$residualFastaInNextflowWorkingDirOnCluster\" + residualBestRepsFasta = \"$residualBestRepsFastaInNextflowWorkingDirOnCluster\" + coreBestRepsFasta = \"$coreBestRepsFastaInNextflowWorkingDirOnCluster\" + coreAndPeripheralGroups = \"$coreAndPeripheralGroupsInNextflowWorkingDirOnCluster\" + coreAndPeripheralProteome = \"$coreAndPeripheralProteomeInNextflowWorkingDirOnCluster\" + residualGroups = \"$residualGroupsInNextflowWorkingDirOnCluster\" + coreGroupFastas = \"$coreGroupFastasInNextflowWorkingDirOnCluster\" + residualGroupFastas = \"$residualGroupFastasInNextflowWorkingDirOnCluster\" + buildVersion = $buildVersion + oldGroupsFile = \"$oldGroupsFileInNextflowWorkingDirOnCluster\" + bestRepDiamondOutputFields = \"$bestRepDiamondOutputFields\" +} + +process { + executor = \'$executor\' + queue = \'$queue\' +} + +env { + _JAVA_OPTIONS=\"-Xmx8192M\" + NXF_OPTS=\"-Xmx8192M\" + NXF_JVM_ARGS=\"-Xmx8192M\" +} + +singularity { + enabled = true + autoMounts = true +} +"; + close(F); + } +} + +1; diff --git a/Main/lib/perl/WorkflowSteps/MakeOrthoFinderPostResidualEntryNextflowConfig.pm b/Main/lib/perl/WorkflowSteps/MakeOrthoFinderPostResidualEntryNextflowConfig.pm new file mode 100644 index 000000000..bd18dc177 --- /dev/null +++ b/Main/lib/perl/WorkflowSteps/MakeOrthoFinderPostResidualEntryNextflowConfig.pm @@ -0,0 +1,75 @@ +package ApiCommonWorkflow::Main::WorkflowSteps::MakeOrthoFinderPostResidualEntryNextflowConfig; + +@ISA = (ApiCommonWorkflow::Main::WorkflowSteps::WorkflowStep); + +use strict; +use warnings; +use ApiCommonWorkflow::Main::WorkflowSteps::WorkflowStep; + +sub run { + my ($self, $test, $undo) = @_; + + my $clusterWorkflowDataDir = $self->getClusterWorkflowDataDir(); + my $analysisDir = $self->getParamValue("analysisDir"); + my $residualFasta = $self->getParamValue("residualFasta"); + my $groupsFile = $self->getParamValue("groupsFile"); + my $speciesMapping = $self->getParamValue("speciesMapping"); + my $sequenceMapping = $self->getParamValue("sequenceMapping"); + my $diamondResultsFile = $self->getParamValue("diamondResultsFile"); + my $buildVersion = $self->getSharedConfig("buildVersion"); + my $residualBuildVersion = $self->getSharedConfig("residualBuildVersion"); + + my $resultsDirectory = $self->getParamValue("clusterResultDir"); + my $configPath = join("/", $self->getWorkflowDataDir(), $self->getParamValue("analysisDir"), $self->getParamValue("configFileName")); + + my $workingDirRelativePath = $self->getParamValue("workingDirRelativePath"); + + my $residualFastaInNextflowWorkingDirOnCluster = $self->relativePathToNextflowClusterPath($workingDirRelativePath, $residualFasta); + my $groupsFileInNextflowWorkingDirOnCluster = $self->relativePathToNextflowClusterPath($workingDirRelativePath, $groupsFile); + my $speciesMappingInNextflowWorkingDirOnCluster = $self->relativePathToNextflowClusterPath($workingDirRelativePath, $speciesMapping); + my $sequenceMappingInNextflowWorkingDirOnCluster = $self->relativePathToNextflowClusterPath($workingDirRelativePath, $sequenceMapping); + my $diamondResultsFileInNextflowWorkingDirOnCluster = $self->relativePathToNextflowClusterPath($workingDirRelativePath, $diamondResultsFile); + my $resultsDirectoryInNextflowWorkingDirOnCluster = $self->relativePathToNextflowClusterPath($workingDirRelativePath, $resultsDirectory); + + my $executor = $self->getClusterExecutor(); + my $queue = $self->getClusterQueue(); + + if ($undo) { + $self->runCmd(0,"rm -rf $configPath"); + } else { + open(F, ">", $configPath) or die "$! :Can't open config file '$configPath' for writing"; + + print F +" +params { + outputDir = \"$resultsDirectoryInNextflowWorkingDirOnCluster\" + residualFasta = \"$residualFastaInNextflowWorkingDirOnCluster\" + groupsFile = \"$groupsFileInNextflowWorkingDirOnCluster\" + speciesMapping = \"$speciesMappingInNextflowWorkingDirOnCluster\" + sequenceMapping = \"$sequenceMappingInNextflowWorkingDirOnCluster\" + diamondResultsFile = \"$diamondResultsFileInNextflowWorkingDirOnCluster\" + buildVersion = $buildVersion + residualBuildVersion = $residualBuildVersion +} + +process { + executor = \'$executor\' + queue = \'$queue\' +} + +env { + _JAVA_OPTIONS=\"-Xmx8192M\" + NXF_OPTS=\"-Xmx8192M\" + NXF_JVM_ARGS=\"-Xmx8192M\" +} + +singularity { + enabled = true + autoMounts = true +} +"; + close(F); + } +} + +1; diff --git a/Main/lib/perl/WorkflowSteps/MakeOrthoFinderResidualEntryNextflowConfig.pm b/Main/lib/perl/WorkflowSteps/MakeOrthoFinderResidualEntryNextflowConfig.pm new file mode 100644 index 000000000..c75f0e9e1 --- /dev/null +++ b/Main/lib/perl/WorkflowSteps/MakeOrthoFinderResidualEntryNextflowConfig.pm @@ -0,0 +1,61 @@ +package ApiCommonWorkflow::Main::WorkflowSteps::MakeOrthoFinderResidualEntryNextflowConfig; + +@ISA = (ApiCommonWorkflow::Main::WorkflowSteps::WorkflowStep); + +use strict; +use warnings; +use ApiCommonWorkflow::Main::WorkflowSteps::WorkflowStep; + +sub run { + my ($self, $test, $undo) = @_; + + my $clusterWorkflowDataDir = $self->getClusterWorkflowDataDir(); + my $analysisDir = $self->getParamValue("analysisDir"); + my $residualFastaDir = $self->getParamValue("residualFastaDir"); + + my $resultsDirectory = $self->getParamValue("clusterResultDir"); + my $configPath = join("/", $self->getWorkflowDataDir(), $self->getParamValue("analysisDir"), $self->getParamValue("configFileName")); + + my $workingDirRelativePath = $self->getParamValue("workingDirRelativePath"); + + my $residualFastaDirInNextflowWorkingDirOnCluster = $self->relativePathToNextflowClusterPath($workingDirRelativePath, $residualFastaDir); + my $resultsDirectoryInNextflowWorkingDirOnCluster = $self->relativePathToNextflowClusterPath($workingDirRelativePath, $resultsDirectory); + + my $executor = $self->getClusterExecutor(); + my $queue = $self->getClusterQueue(); + + if ($undo) { + $self->runCmd(0,"rm -rf $configPath"); + } else { + open(F, ">", $configPath) or die "$! :Can't open config file '$configPath' for writing"; + + print F +" +params { + outputDir = \"$resultsDirectoryInNextflowWorkingDirOnCluster\" + residualFastaDir = \"$residualFastaDirInNextflowWorkingDirOnCluster\" + orthoFinderDiamondOutputFields = \"qseqid sseqid pident length mismatch gapopen qstart qend sstart send evalue bitscore\" + +} + +process { + executor = \'$executor\' + queue = \'$queue\' +} + +env { + _JAVA_OPTIONS=\"-Xmx8192M\" + NXF_OPTS=\"-Xmx8192M\" + NXF_JVM_ARGS=\"-Xmx8192M\" +} + +singularity { + enabled = true + autoMounts = true +} +"; + close(F); + } +} + +1; diff --git a/Main/lib/perl/WorkflowSteps/PredictEcNumbers.pm b/Main/lib/perl/WorkflowSteps/PredictEcNumbers.pm index c3374af03..18548cd17 100644 --- a/Main/lib/perl/WorkflowSteps/PredictEcNumbers.pm +++ b/Main/lib/perl/WorkflowSteps/PredictEcNumbers.pm @@ -9,15 +9,15 @@ sub run { my ($self, $test, $undo) = @_; my $workflowDataDir = $self->getWorkflowDataDir(); - my $outputDir = $self->getParamValue('outputDir'); - my $outputFile = $workflowDataDir."/".$self->getParamValue('outputFile'); + my $outputFile = $workflowDataDir . "/" . $self->getParamValue('outputFile'); my $gusConfigFile = $workflowDataDir . "/" . $self->getParamValue('gusConfigFile'); + my $threshold = 0.4; if ($undo) { - my $cmd = "rm $outputFile"; + my $cmd = "rm -f $outputFile"; $self->runCmd($test, $cmd); } else { - my $cmd = "orthomclEcPrediction $outputDir $outputFile $gusConfigFile"; + my $cmd = "assignEcByOrthologs.pl --output $outputFile --gusConfigFile $gusConfigFile --threshold $threshold"; $self->runCmd($test, $cmd); } } diff --git a/Main/lib/perl/WorkflowSteps/UpdateOrthoPeripheralPersistentCache.pm b/Main/lib/perl/WorkflowSteps/UpdateOrthoPeripheralPersistentCache.pm index 58467597a..2c7cd538a 100644 --- a/Main/lib/perl/WorkflowSteps/UpdateOrthoPeripheralPersistentCache.pm +++ b/Main/lib/perl/WorkflowSteps/UpdateOrthoPeripheralPersistentCache.pm @@ -32,10 +32,10 @@ sub run { $self->runCmd(0, "cp -r $checkSumFile ${preprocessedDataCache}/OrthoMCL/OrthoMCL_peripheralGroups/officialDiamondCache/checkSum.tsv"); - $self->runCmd(0, "rm -rf ${preprocessedDataCache}/OrthoMCL/OrthoMCL_peripheralGroups/officialDiamondCache/groupFastas"); $self->runCmd(0, "cp -r ${preprocessedDataCache}/OrthoMCL/OrthoMCL_peripheralGroups/genesAndProteins/${nextflowWorkflow}_${nextflowBranch}/**/groupFastas ${preprocessedDataCache}/OrthoMCL/OrthoMCL_peripheralGroups/officialDiamondCache/"); - $self->runCmd(0, "rm -rf ${preprocessedDataCache}/OrthoMCL/OrthoMCL_peripheralGroups/officialDiamondCache/peripheralCacheDir"); + $self->runCmd(0, "cp -r ${preprocessedDataCache}/OrthoMCL/OrthoMCL_peripheralGroups/genesAndProteins/${nextflowWorkflow}_${nextflowBranch}/**/residualGroupFastas ${preprocessedDataCache}/OrthoMCL/OrthoMCL_peripheralGroups/officialDiamondCache/"); + $self->runCmd(0, "cp -r ${preprocessedDataCache}/OrthoMCL/OrthoMCL_peripheralGroups/genesAndProteins/${nextflowWorkflow}_${nextflowBranch}/**/newPeripheralDiamondCache/ ${preprocessedDataCache}/OrthoMCL/OrthoMCL_peripheralGroups/officialDiamondCache/peripheralCacheDir"); $self->runCmd(0, "cp -r ${preprocessedDataCache}/OrthoMCL/OrthoMCL_peripheralGroups/genesAndProteins/${nextflowWorkflow}_${nextflowBranch}/**/buildVersion.txt ${preprocessedDataCache}/OrthoMCL/OrthoMCL_peripheralGroups/officialDiamondCache/residualBuildVersion.txt"); @@ -48,7 +48,8 @@ sub run { $self->runCmd(0, "cp -r ${preprocessedDataCache}/OrthoMCL/OrthoMCL_peripheralGroups/genesAndProteins/${nextflowWorkflow}_${nextflowBranch}/**/GroupsFile.txt ${preprocessedDataCache}/OrthoMCL/OrthoMCL_peripheralGroups/officialDiamondCache/"); - $self->runCmd(0, "cp -r ${preprocessedDataCache}/OrthoMCL/OrthoMCL_peripheralGroups/genesAndProteins/${nextflowWorkflow}_${nextflowBranch}/**/groupStats ${preprocessedDataCache}/OrthoMCL/OrthoMCL_peripheralGroups/officialDiamondCache/"); + $self->runCmd(0, "mkdir -p ${preprocessedDataCache}/OrthoMCL/OrthoMCL_peripheralGroups/officialDiamondCache/groupStats"); + $self->runCmd(0, "cp -r ${preprocessedDataCache}/OrthoMCL/OrthoMCL_peripheralGroups/genesAndProteins/${nextflowWorkflow}_${nextflowBranch}/**/groupStats/* ${preprocessedDataCache}/OrthoMCL/OrthoMCL_peripheralGroups/officialDiamondCache/groupStats/"); $self->runCmd(0, "cp -r ${preprocessedDataCache}/OrthoMCL/OrthoMCL_peripheralGroups/genesAndProteins/${nextflowWorkflow}_${nextflowBranch}/**/intraGroupBlastFile.tsv ${preprocessedDataCache}/OrthoMCL/OrthoMCL_peripheralGroups/officialDiamondCache/"); @@ -68,6 +69,8 @@ sub run { $self->runCmd(0, "cp -r ${preprocessedDataCache}/OrthoMCL/OrthoMCL_peripheralGroups/genesAndProteins/${nextflowWorkflow}_${nextflowBranch}/**/similar_groups.tsv ${preprocessedDataCache}/OrthoMCL/OrthoMCL_peripheralGroups/officialDiamondCache/"); + $self->runCmd(0, "cp -r ${preprocessedDataCache}/OrthoMCL/OrthoMCL_peripheralGroups/genesAndProteins/${nextflowWorkflow}_${nextflowBranch}/**/geneTrees ${preprocessedDataCache}/OrthoMCL/OrthoMCL_peripheralGroups/officialDiamondCache/"); + $self->runCmd(0, "rm -rf ${preprocessedDataCache}/OrthoMCL/OrthoMCL_peripheralGroups/genesAndProteins/"); $self->runCmd(0, "tar -czf ${preprocessedDataCache}/OrthoMCL/OrthoMCL_peripheralGroups/officialDiamondCache/peripheralCacheDir.tar.gz -C ${preprocessedDataCache}/OrthoMCL/OrthoMCL_peripheralGroups/officialDiamondCache peripheralCacheDir"); diff --git a/Main/lib/xml/workflow/OrthoMCLDependent.xml b/Main/lib/xml/workflow/OrthoMCLDependent.xml index 580c984d7..babbfc75c 100644 --- a/Main/lib/xml/workflow/OrthoMCLDependent.xml +++ b/Main/lib/xml/workflow/OrthoMCLDependent.xml @@ -59,7 +59,6 @@ - $$dataDir$$ $$dataDir$$/ec.txt $$gusConfigFile$$ @@ -71,7 +70,6 @@ $$gusConfigFile$$ $$dataDir$$/ec.txt OrthoMCLDerived - select taf.aa_sequence_id from dots.Transcript t, dots.TranslatedAAFeature taf, dots.GeneFeature gf where gf.source_id = ? and gf.na_feature_id = t.parent_id and t.na_feature_id = taf.na_feature_id diff --git a/Main/lib/xml/workflow/OrthoMCLPeripheral.xml b/Main/lib/xml/workflow/OrthoMCLPeripheral.xml index 48be9a19b..14a38395a 100644 --- a/Main/lib/xml/workflow/OrthoMCLPeripheral.xml +++ b/Main/lib/xml/workflow/OrthoMCLPeripheral.xml @@ -72,9 +72,9 @@ $$relativeDownloadSiteDir$$ $$projectVersionForWebsiteFiles$$ $$projectName$$ - $$dataDir$$/peripheralGroups/analysisDir/results/GroupsFile.txt - $$dataDir$$/peripheralGroups/analysisDir/results/reformattedGroups.txt - $$dataDir$$/peripheralGroups/analysisDir/results/fullGroupFile.txt + $$dataDir$$/peripheralGroups/analysisDir/peripheralEntryResults/GroupsFile.txt + $$dataDir$$/peripheralGroups/analysisDir/postResidualEntryResults/reformattedGroups.txt + $$dataDir$$/peripheralGroups/analysisDir/postProcessingEntryResults/fullGroupFile.txt $$residualGroupIdPrefix$$ @@ -89,14 +89,14 @@ - $$dataDir$$/peripheralGroups/analysisDir/results/ + $$dataDir$$/peripheralGroups/analysisDir/postProcessingEntryResults/ $$relativeWebServicesDir$$ $$projectVersionForWebsiteFiles$$ - $$dataDir$$/peripheralGroups/analysisDir/results/geneTrees + $$dataDir$$/peripheralGroups/analysisDir/postProcessingEntryResults/geneTrees $$relativeWebServicesDir$$ $$projectVersionForWebsiteFiles$$ diff --git a/Main/lib/xml/workflow/orthoFinderCore.xml b/Main/lib/xml/workflow/orthoFinderCore.xml index 706e0e72e..392eb04ff 100644 --- a/Main/lib/xml/workflow/orthoFinderCore.xml +++ b/Main/lib/xml/workflow/orthoFinderCore.xml @@ -24,6 +24,7 @@ $$coreGroupsDir$$ $$coreGroupsDir$$/analysisDir $$coreGroupsDir$$/analysisDir/nextflow.config + results diff --git a/Main/lib/xml/workflow/orthoFinderPeripheral.xml b/Main/lib/xml/workflow/orthoFinderPeripheral.xml index e0deba88c..1baf1dbac 100644 --- a/Main/lib/xml/workflow/orthoFinderPeripheral.xml +++ b/Main/lib/xml/workflow/orthoFinderPeripheral.xml @@ -4,27 +4,27 @@ VEuPathDB/orthofinder-nextflow - - + + $$peripheralDir$$ - $$peripheralDir$$/analysisDir/results/ - nextflow.config + $$peripheralDir$$/analysisDir/peripheralEntryResults/ + peripheralEntryNextflow.config $$peripheralDir$$/analysisDir $$peripheralDir$$/fastas.tar.gz $$peripheralDir$$/coreFastas.tar.gz $$peripheralDir$$/reformattedGroups.txt $$peripheralDir$$/groupDiamondResults $$peripheralDir$$/SequenceIDs.txt - $$peripheralDir$$/peripheralCacheDir - $$peripheralDir$$/outdated.txt - $$peripheralDir$$/previousGroups.txt + $$peripheralDir$$/outdated.txt + $$peripheralDir$$/peripheralCacheDir - + $$projectName$$/$$projectName$$_gus.config $$projectName$$ $$peripheralDir$$ - $$peripheralDir$$/analysisDir/nextflow.config + $$peripheralDir$$/analysisDir/peripheralEntryNextflow.config + peripheralEntryResults $$projectName$$|peripheralGroups @@ -33,15 +33,107 @@ $$peripheralDir$$/analysisDir $$nextflowWorkflow$$ peripheralEntry - + + + + + $$peripheralDir$$ + $$peripheralDir$$/analysisDir/residualEntryResults/ + residualEntryNextflow.config + $$peripheralDir$$/analysisDir + $$peripheralDir$$/analysisDir/peripheralEntryResults/residualFastas.tar.gz + qseqid sseqid pident length mismatch gapopen qstart qend sstart send evalue bitscore + + + + + $$projectName$$/$$projectName$$_gus.config + $$projectName$$ + $$peripheralDir$$ + $$peripheralDir$$/analysisDir/residualEntryNextflow.config + residualEntryResults + + + $$projectName$$|peripheralGroups + true + + $$peripheralDir$$/analysisDir + $$nextflowWorkflow$$ + residualEntry + + + + + $$peripheralDir$$ + $$peripheralDir$$/analysisDir/postResidualEntryResults/ + postResidualEntryNextflow.config + $$peripheralDir$$/analysisDir + $$peripheralDir$$/analysisDir/residualEntryResults/residualFasta.fa + $$peripheralDir$$/analysisDir/residualEntryResults/Orthogroups.txt + $$peripheralDir$$/analysisDir/residualEntryResults/SpeciesIDs.txt + $$peripheralDir$$/analysisDir/residualEntryResults/SequenceIDs.txt + $$peripheralDir$$/analysisDir/residualEntryResults/blastsFile.txt + + + + + $$projectName$$/$$projectName$$_gus.config + $$projectName$$ + $$peripheralDir$$ + $$peripheralDir$$/analysisDir/postResidualEntryNextflow.config + postResidualEntryResults + + + $$projectName$$|peripheralGroups + true + + $$peripheralDir$$/analysisDir + $$nextflowWorkflow$$ + postResidualEntry + + + $$peripheralDir$$ + $$peripheralDir$$/analysisDir/postProcessingEntryResults/ + postProcessingEntryNextflow.config + $$peripheralDir$$/analysisDir + $$peripheralDir$$/analysisDir/residualEntryResults/residualFasta.fa + $$peripheralDir$$/analysisDir/postResidualEntryResults/bestReps.fasta + $$peripheralDir$$/analysisDir/peripheralEntryResults/coreBestReps.fasta + $$peripheralDir$$/analysisDir/peripheralEntryResults/GroupsFile.txt + $$peripheralDir$$/analysisDir/peripheralEntryResults/fullProteome.fasta + $$peripheralDir$$/analysisDir/peripheralEntryResults/groupFastas + $$peripheralDir$$/analysisDir/postResidualEntryResults/residualGroupFastas + $$peripheralDir$$/analysisDir/residualEntryResults/Orthogroups.txt + $$peripheralDir$$/previousGroups.txt + qseqid sseqid evalue + + + + + $$projectName$$/$$projectName$$_gus.config + $$projectName$$ + $$peripheralDir$$ + $$peripheralDir$$/analysisDir/postProcessingEntryNextflow.config + postProcessingEntryResults + + + $$projectName$$|peripheralGroups + true + + $$peripheralDir$$/analysisDir + $$nextflowWorkflow$$ + postProcessingEntry + + + $$nextflowWorkflow$$ $$getPeripheralProteinsDir$$/fastas/checkSum.tsv - $$peripheralDir$$/analysisDir/results/fullGroupFile.txt - $$peripheralDir$$/analysisDir/results/previousGroups.txt - + $$peripheralDir$$/analysisDir/postProcessingEntryResults/fullGroupFile.txt + $$peripheralDir$$/analysisDir/postProcessingEntryResults/previousGroups.txt + diff --git a/Main/lib/xml/workflow/orthomclPeripheralWorkflow.xml b/Main/lib/xml/workflow/orthomclPeripheralWorkflow.xml index 7837d4690..d51dc6491 100644 --- a/Main/lib/xml/workflow/orthomclPeripheralWorkflow.xml +++ b/Main/lib/xml/workflow/orthomclPeripheralWorkflow.xml @@ -23,16 +23,31 @@ - - $$peripheralDir$$/analysisDir/results/ + + $$peripheralDir$$/analysisDir/peripheralEntryResults/ - + + + + $$peripheralDir$$/analysisDir/residualEntryResults/ + + + + + $$peripheralDir$$/analysisDir/postResidualEntryResults/ + + + + + $$peripheralDir$$/analysisDir/postProcessingEntryResults/ + + $$getPeripheralProteinsDir$$/fastas/checkSum.tsv $$peripheralDir$$/outdated.txt $$getPeripheralProteinsDir$$/doNotDoAnalysis - + @@ -83,8 +98,9 @@ + - $$peripheralDir$$/analysisDir/results/ + $$peripheralDir$$/analysisDir/ @@ -95,72 +111,72 @@ - $$peripheralDir$$/analysisDir/results/GroupsFile.txt + $$peripheralDir$$/analysisDir/peripheralEntryResults/GroupsFile.txt $$projectName$$/$$projectName$$_gus.config - $$peripheralDir$$/analysisDir/results/reformattedGroups.txt + $$peripheralDir$$/analysisDir/postResidualEntryResults/reformattedGroups.txt $$projectName$$/$$projectName$$_gus.config - $$peripheralDir$$/analysisDir/results/GroupsFile.txt + $$peripheralDir$$/analysisDir/peripheralEntryResults/GroupsFile.txt $$projectName$$/$$projectName$$_gus.config - $$peripheralDir$$/analysisDir/results/reformattedGroups.txt + $$peripheralDir$$/analysisDir/postResidualEntryResults/reformattedGroups.txt $$projectName$$/$$projectName$$_gus.config - $$peripheralDir$$/analysisDir/results/groupStats/core_stats.txt + $$peripheralDir$$/analysisDir/peripheralEntryResults/groupStats/core_stats.txt C $$projectName$$/$$projectName$$_gus.config - $$peripheralDir$$/analysisDir/results/groupStats/peripheral_stats.txt + $$peripheralDir$$/analysisDir/peripheralEntryResults/groupStats/peripheral_stats.txt C+P $$projectName$$/$$projectName$$_gus.config - $$peripheralDir$$/analysisDir/results/groupStats/residual_stats.txt + $$peripheralDir$$/analysisDir/postResidualEntryResults/groupStats/residual_stats.txt R $$projectName$$/$$projectName$$_gus.config - $$peripheralDir$$/analysisDir/results/intraGroupBlastFile.tsv + $$peripheralDir$$/analysisDir/peripheralEntryResults/intraGroupBlastFile.tsv $$projectName$$/$$projectName$$_gus.config - $$peripheralDir$$/analysisDir/results/intraResidualGroupBlastFile.tsv + $$peripheralDir$$/analysisDir/postResidualEntryResults/intraResidualGroupBlastFile.tsv $$projectName$$/$$projectName$$_gus.config - $$peripheralDir$$/analysisDir/results/similar_groups.tsv + $$peripheralDir$$/analysisDir/postProcessingEntryResults/similar_groups.tsv $$projectName$$/$$projectName$$_gus.config - $$peripheralDir$$/analysisDir/results/previousGroups.txt + $$peripheralDir$$/analysisDir/postProcessingEntryResults/previousGroups.txt $$projectName$$/$$projectName$$_gus.config - + diff --git a/Main/lib/xml/workflow/runOrthoNextflowOnCluster.xml b/Main/lib/xml/workflow/runOrthoNextflowOnCluster.xml index 4ae4249a1..5fdc5aca0 100644 --- a/Main/lib/xml/workflow/runOrthoNextflowOnCluster.xml +++ b/Main/lib/xml/workflow/runOrthoNextflowOnCluster.xml @@ -2,6 +2,7 @@ + @@ -21,7 +22,7 @@ $$parentDataDir$$ $$analysisDir$$ - $$analysisDir$$/results + $$analysisDir$$/$$resultDirName$$ $$nextflowConfigFile$$ $$nextflowWorkflow$$ true @@ -32,8 +33,8 @@ $$parentDataDir$$ - $$analysisDir$$/results - $$analysisDir$$/results + $$analysisDir$$/$$resultDirName$$ + $$analysisDir$$/$$resultDirName$$ * true @@ -53,7 +54,7 @@ $$genomeSpec$$ $$isProteomeAnalysis$$ $$datasetSpec$$ - $$analysisDir$$/results + $$analysisDir$$/$$resultDirName$$ $$foundNextflowResults$$ $$nextflowWorkflow$$ $$projectName$$ diff --git a/Main/lib/xml/workflowTemplates/genomicsRoot.xml b/Main/lib/xml/workflowTemplates/genomicsRoot.xml index 18a8693d9..7ebdf227b 100644 --- a/Main/lib/xml/workflowTemplates/genomicsRoot.xml +++ b/Main/lib/xml/workflowTemplates/genomicsRoot.xml @@ -67,7 +67,7 @@ OrthoMCL OrthoMCL/OrthoMCL_gus.config $$multiProjectsDataDir$$ - OrthoMCL/peripheralGroups/analysisDir/results/ + OrthoMCL/peripheralGroups/analysisDir/postProcessingEntryResults/