Mercurial > repos > galaxytrakr > hfp_bettercallsal_awsbatch
comparison 1.0.0/modules/bcs_distance_matrix/main.nf @ 0:801b85b03a17 draft default tip
planemo upload
| author | galaxytrakr |
|---|---|
| date | Thu, 28 May 2026 20:31:42 +0000 |
| parents | |
| children |
comparison
equal
deleted
inserted
replaced
| -1:000000000000 | 0:801b85b03a17 |
|---|---|
| 1 process BCS_DISTANCE_MATRIX { | |
| 2 tag "Samples vs Genomes" | |
| 3 label "process_pico" | |
| 4 | |
| 5 module (params.enable_module ? "${params.swmodulepath}${params.fs}python${params.fs}3.8.1" : null) | |
| 6 conda (params.enable_conda ? "conda-forge::python=3.10 conda-forge::pyyaml" : null) | |
| 7 container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? | |
| 8 'https://depot.galaxyproject.org/singularity/multiqc:1.14--pyhdfd78af_0' : | |
| 9 'quay.io/biocontainers/multiqc:1.14--pyhdfd78af_0' }" | |
| 10 | |
| 11 input: | |
| 12 path matrix | |
| 13 path labels | |
| 14 | |
| 15 output: | |
| 16 path 'bcs_sourmash_matrix.tblsum.txt', emit: mqc_txt, optional: true | |
| 17 path 'bcs_sourmash_matrix_mqc.json' , emit: mqc_json, optional: true | |
| 18 path 'bcs_sourmash_matrix_mqc.yml' , emit: mqc_yml, optional: true | |
| 19 path 'versions.yml' , emit: versions | |
| 20 | |
| 21 when: | |
| 22 task.ext.when == null || task.ext.when | |
| 23 | |
| 24 script: | |
| 25 def args = task.ext.args ?: '' | |
| 26 | |
| 27 """ | |
| 28 sourmash_sim_matrix.py \\ | |
| 29 -pickle ${params.tuspy_ps} \\ | |
| 30 -csv $matrix \\ | |
| 31 -labels $labels | |
| 32 | |
| 33 if [ -e "bcs_sourmash_matrix.tblsum.txt" ] && [ -s "bcs_sourmash_matrix.tblsum.txt" ]; then | |
| 34 create_mqc_data_table.py \\ | |
| 35 "bcs_sourmash_matrix" \\ | |
| 36 "The following table is an asymmetrical matrix of all <code>v.</code> all <b>ANI</b> values between each of the sample <b>FASTQ</b>'s sketch and genome <b>FASTA</b>'s sketch. Please note that there may be multiple genomes belonging to a serotype as processed by the initial screening steps of the workflow." | |
| 37 fi | |
| 38 | |
| 39 cat <<-END_VERSIONS > versions.yml | |
| 40 "${task.process}": | |
| 41 python: \$( python --version | sed 's/Python //g' ) | |
| 42 bash: \$( bash --version 2>&1 | sed '1!d; s/^.*version //; s/ (.*\$//' ) | |
| 43 END_VERSIONS | |
| 44 """ | |
| 45 } |
