Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Refactor autometa-taxonomy-lca (#211)
* start to fixing issue-#170 🎨 lca entrypoint now has updated output parameter 🍏🎨 update lca.nf with updated entrypoint param * 🎨:green-apple:🐍 WIP * 🎨🐛 Update entrypoint parameters fixes #170 stores pickled data structures for LCA/RMQ to specified directory :bug: Update entrypoint parameters in autometa.sh workflow for autometa-taxonomy-lca :art::green_apple: Include meta.id in LCA outputs * :bug: Replace LCA(...) instantiation outdir param to cache * :bug: Replace incorrect variable to prevent passing pd.DataFrame to load(...) func in markers.get(...) * :art: change process_low to process_medium in prepare_lca.nf
- Loading branch information
1 parent
974d324
commit cf23ce3
Showing
11 changed files
with
507 additions
and
204 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
// Import generic module functions | ||
include { initOptions; saveFiles; getSoftwareName } from './functions' | ||
|
||
params.options = [:] | ||
options = initOptions(params.options) | ||
|
||
process REDUCE_LCA { | ||
tag "Finding LCA for ${meta.id}" | ||
label 'process_high' | ||
publishDir "${params.interim_dir_internal}", | ||
mode: params.publish_dir_mode, | ||
saveAs: { filename -> saveFiles(filename:filename, options:params.options, publish_dir:getSoftwareName(task.process), meta:[:], publish_by_meta:[]) } | ||
|
||
conda (params.enable_conda ? "bioconda::autometa" : null) | ||
if (workflow.containerEngine == 'singularity' && !params.singularity_pull_docker_container) { | ||
container "https://depot.galaxyproject.org/singularity/YOUR-TOOL-HERE" | ||
} else { | ||
container "jason-c-kwan/autometa:${params.autometa_image_tag}" | ||
} | ||
|
||
input: | ||
tuple val(meta), path(blast) | ||
path(blastdb_dir) | ||
path(lca_cache) | ||
|
||
output: | ||
tuple val(meta), path("${meta.id}.lca.tsv"), emit: lca | ||
path "${meta.id}.error_taxids.tsv" , emit: error_taxids | ||
path "${meta.id}.sseqid2taxid.tsv" , emit: sseqid_to_taxids | ||
path '*.version.txt' , emit: version | ||
|
||
|
||
script: | ||
def software = getSoftwareName(task.process) | ||
""" | ||
autometa-taxonomy-lca \\ | ||
--blast ${blast} \\ | ||
--dbdir ${blastdb_dir} \\ | ||
--cache ${lca_cache} \\ | ||
--lca-error-taxids ${meta.id}.error_taxids.tsv \\ | ||
--sseqid2taxid-output ${meta.id}.sseqid2taxid.tsv \\ | ||
--lca-output ${meta.id}.lca.tsv | ||
echo "TODO" > autometa.version.txt | ||
""" | ||
} |
Oops, something went wrong.