Mercurial > repos > galaxytrakr > hfp_bettercallsal_konda
comparison 1.0.0/modules/scaffold_genomes/main.nf @ 0:0a8dda29956e draft default tip
planemo upload
| author | galaxytrakr |
|---|---|
| date | Thu, 28 May 2026 20:41:10 +0000 |
| parents | |
| children |
comparison
equal
deleted
inserted
replaced
| -1:000000000000 | 0:0a8dda29956e |
|---|---|
| 1 process SCAFFOLD_GENOMES { | |
| 2 tag "fasta_join.pl" | |
| 3 label "process_nano" | |
| 4 maxForks 5 | |
| 5 | |
| 6 module (params.enable_module ? "${params.swmodulepath}${params.fs}perl${params.fs}5.30.0" : null) | |
| 7 conda (params.enable_conda ? "conda-forge::perl bioconda::perl-bioperl=1.7.8" : null) | |
| 8 container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? | |
| 9 'https://depot.galaxyproject.org/singularity/perl-bioperl:1.7.8--hdfd78af_1' : | |
| 10 'quay.io/biocontainers/perl-bioperl:1.7.8--hdfd78af_1' }" | |
| 11 | |
| 12 input: | |
| 13 path acc_chunk_file | |
| 14 | |
| 15 output: | |
| 16 val "${params.output}${params.fs}scaffold_genomes", emit: genomes_dir | |
| 17 path '*_scaffolded_genomic.fna.gz' , emit: scaffolded | |
| 18 path 'versions.yml' , emit: versions | |
| 19 | |
| 20 when: | |
| 21 task.ext.when == null || task.ext.when | |
| 22 | |
| 23 script: | |
| 24 def args = task.ext.args ?: '' | |
| 25 """ | |
| 26 datasets download genome accession \\ | |
| 27 --dehydrated \\ | |
| 28 --inputfile $acc_chunk_file | |
| 29 | |
| 30 unzip ncbi_dataset.zip | |
| 31 | |
| 32 datasets rehydrate \\ | |
| 33 --gzip \\ | |
| 34 --max-workers $task.cpus \\ | |
| 35 --directory "." | |
| 36 | |
| 37 fasta_join.pl -in ncbi_dataset | |
| 38 | |
| 39 cat <<-END_VERSIONS > versions.yml | |
| 40 "${task.process}": | |
| 41 datasets: \$( datasets --version | sed 's/datasets version: //g' ) | |
| 42 perl: \$( perl -e 'print \$^V' | sed 's/v//g' ) | |
| 43 bioperl: \$(perl -MBio::Root::Version -e 'print \$Bio::Root::Version::VERSION') | |
| 44 END_VERSIONS | |
| 45 | |
| 46 zcmd="" | |
| 47 zver="" | |
| 48 | |
| 49 if type pigz > /dev/null 2>&1; then | |
| 50 zcmd="pigz" | |
| 51 zver=\$( echo \$( \$zcmd --version 2>&1 ) | sed -e '1!d' | sed "s/\$zcmd //" ) | |
| 52 elif type gzip > /dev/null 2>&1; then | |
| 53 zcmd="gzip" | |
| 54 | |
| 55 if [ "${workflow.containerEngine}" != "null" ]; then | |
| 56 zver=\$( echo \$( \$zcmd --help 2>&1 ) | sed -e '1!d; s/ (.*\$//' ) | |
| 57 else | |
| 58 zver=\$( echo \$( \$zcmd --version 2>&1 ) | sed "s/^.*(\$zcmd) //; s/\$zcmd //; s/ Copyright.*\$//" ) | |
| 59 fi | |
| 60 fi | |
| 61 | |
| 62 cat <<-END_VERSIONS >> versions.yml | |
| 63 \$zcmd: \$zver | |
| 64 END_VERSIONS | |
| 65 """ | |
| 66 } |
