annotate 0.6.1/modules/bcs_distance_matrix/main.nf @ 15:1972677994a6

"planemo upload"
author kkonganti
date Thu, 07 Sep 2023 10:27:12 -0400
parents 749faef1caa9
children
rev   line source
kkonganti@11 1 process BCS_DISTANCE_MATRIX {
kkonganti@11 2 tag "Samples vs Genomes"
kkonganti@11 3 label "process_pico"
kkonganti@11 4
kkonganti@11 5 module (params.enable_module ? "${params.swmodulepath}${params.fs}python${params.fs}3.8.1" : null)
kkonganti@11 6 conda (params.enable_conda ? "conda-forge::python=3.10 conda-forge::pyyaml" : null)
kkonganti@11 7 container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ?
kkonganti@11 8 'https://depot.galaxyproject.org/singularity/multiqc:1.14--pyhdfd78af_0' :
kkonganti@11 9 'quay.io/biocontainers/multiqc:1.14--pyhdfd78af_0' }"
kkonganti@11 10
kkonganti@11 11 input:
kkonganti@11 12 path matrix
kkonganti@11 13 path labels
kkonganti@11 14
kkonganti@11 15 output:
kkonganti@11 16 path 'bcs_sourmash_matrix.tblsum.txt', emit: mqc_txt, optional: true
kkonganti@11 17 path 'bcs_sourmash_matrix_mqc.json' , emit: mqc_json, optional: true
kkonganti@11 18 path 'bcs_sourmash_matrix_mqc.yml' , emit: mqc_yml, optional: true
kkonganti@11 19 path 'versions.yml' , emit: versions
kkonganti@11 20
kkonganti@11 21 when:
kkonganti@11 22 task.ext.when == null || task.ext.when
kkonganti@11 23
kkonganti@11 24 script:
kkonganti@11 25 def args = task.ext.args ?: ''
kkonganti@11 26
kkonganti@11 27 """
kkonganti@11 28 sourmash_sim_matrix.py \\
kkonganti@11 29 -pickle ${params.tuspy_ps} \\
kkonganti@11 30 -csv $matrix \\
kkonganti@11 31 -labels $labels
kkonganti@11 32
kkonganti@11 33 if [ -e "bcs_sourmash_matrix.tblsum.txt" ] && [ -s "bcs_sourmash_matrix.tblsum.txt" ]; then
kkonganti@11 34 create_mqc_data_table.py \\
kkonganti@11 35 "bcs_sourmash_matrix" \\
kkonganti@11 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."
kkonganti@11 37 fi
kkonganti@11 38
kkonganti@11 39 cat <<-END_VERSIONS > versions.yml
kkonganti@11 40 "${task.process}":
kkonganti@11 41 python: \$( python --version | sed 's/Python //g' )
kkonganti@11 42 bash: \$( bash --version 2>&1 | sed '1!d; s/^.*version //; s/ (.*\$//' )
kkonganti@11 43 END_VERSIONS
kkonganti@11 44 """
kkonganti@11 45 }