-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
8 changed files
with
156 additions
and
2 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
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,54 @@ | ||
process BUSCO { | ||
tag "${asm_tag}:${lineage_dataset}" | ||
label 'process_high' | ||
|
||
conda "bioconda::busco=5.2.2" | ||
container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? | ||
'https://depot.galaxyproject.org/singularity/busco:5.2.2--pyhdfd78af_0': | ||
'quay.io/biocontainers/busco:5.2.2--pyhdfd78af_0' }" | ||
|
||
input: | ||
tuple val(asm_tag), path(fasta_file) | ||
val lineage_dataset | ||
val mode | ||
val download_path | ||
|
||
output: | ||
path "${asm_tag}/short_summary.specific.${lineage_dataset}.${asm_tag}_${lineage_initials}.txt" , emit: summary | ||
path "versions.yml" , emit: versions | ||
|
||
script: | ||
def lineages_path = download_path ? "--download_path ${download_path}" : '' | ||
lineage_initials = "${lineage_dataset}".split("_")[0] | ||
|
||
""" | ||
busco \\ | ||
-m ${mode} \\ | ||
-o ${asm_tag} \\ | ||
-i $fasta_file \\ | ||
-l ${lineage_dataset} \\ | ||
--update-data \\ | ||
$lineages_path \\ | ||
-c ${task.cpus} | ||
mv $asm_tag/short_summary.specific.${lineage_dataset}.${asm_tag}.txt \\ | ||
$asm_tag/short_summary.specific.${lineage_dataset}.${asm_tag}_${lineage_initials}.txt | ||
cat <<-END_VERSIONS > versions.yml | ||
"${task.process}": | ||
busco: \$( busco --version 2>&1 | sed 's/^BUSCO //' ) | ||
END_VERSIONS | ||
""" | ||
|
||
stub: | ||
lineage_initials = "${lineage_dataset}".split("_")[0] | ||
""" | ||
mkdir -p $asm_tag | ||
touch $asm_tag/short_summary.specific.${lineage_dataset}.${asm_tag}_${lineage_initials}.txt | ||
cat <<-END_VERSIONS > versions.yml | ||
"${task.process}": | ||
busco: \$( busco --version 2>&1 | sed 's/^BUSCO //' ) | ||
END_VERSIONS | ||
""" | ||
} |
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,28 @@ | ||
process BUSCO_PLOT { | ||
tag 'all summaries' | ||
label 'process_single' | ||
|
||
conda "bioconda::busco=5.2.2" | ||
container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? | ||
'https://depot.galaxyproject.org/singularity/busco:5.2.2--pyhdfd78af_0': | ||
'quay.io/biocontainers/busco:5.2.2--pyhdfd78af_0' }" | ||
|
||
input: | ||
path "short_summary.*", stageAs: 'busco/*' | ||
|
||
output: | ||
path 'busco/*.png', emit: png | ||
|
||
script: | ||
""" | ||
generate_plot.py \\ | ||
-wd ./busco | ||
""" | ||
|
||
stub: | ||
""" | ||
mkdir -p busco | ||
touch busco/summary_plot.png | ||
""" | ||
} |
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,32 @@ | ||
include { BUSCO } from '../../modules/local/busco' | ||
include { BUSCO_PLOT } from '../../modules/local/busco_plot' | ||
|
||
workflow FASTA_BUSCO_PLOT { | ||
take: | ||
tuple_of_hap_file // Channel | ||
lineage // val | ||
mode // val | ||
download_path // val; Use [] to use work directory. Useful on AWS | ||
|
||
main: | ||
// MODULE: BUSCO | ||
BUSCO( | ||
tuple_of_hap_file, | ||
lineage, | ||
mode, | ||
download_path | ||
) | ||
|
||
ch_busco_summaries = BUSCO.out.summary | ||
| collect | ||
|
||
// MODULE: BUSCO_PLOT | ||
BUSCO_PLOT ( ch_busco_summaries ) | ||
|
||
ch_busco_plot = BUSCO_PLOT.out.png | ||
|
||
emit: | ||
summary = BUSCO.out.summary | ||
plot = ch_busco_plot | ||
versions = Channel.empty().mix(BUSCO.out.versions.first()) | ||
} |
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