kkonganti@1: process BCS_DISTANCE_MATRIX {
kkonganti@1: tag "Samples vs Genomes"
kkonganti@1: label "process_pico"
kkonganti@1:
kkonganti@1: module (params.enable_module ? "${params.swmodulepath}${params.fs}python${params.fs}3.8.1" : null)
kkonganti@1: conda (params.enable_conda ? "conda-forge::python=3.10 conda-forge::pyyaml" : null)
kkonganti@1: container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ?
kkonganti@1: 'https://depot.galaxyproject.org/singularity/multiqc:1.13--pyhdfd78af_0' :
kkonganti@1: 'quay.io/biocontainers/multiqc:1.13--pyhdfd78af_0' }"
kkonganti@1:
kkonganti@1: input:
kkonganti@1: path matrix
kkonganti@1: path labels
kkonganti@1:
kkonganti@1: output:
kkonganti@1: path 'bcs_sourmash_matrix.tblsum.txt', emit: mqc_txt, optional: true
kkonganti@1: path 'bcs_sourmash_matrix_mqc.json' , emit: mqc_json, optional: true
kkonganti@1: path 'bcs_sourmash_matrix_mqc.yml' , emit: mqc_yml, optional: true
kkonganti@1: path 'versions.yml' , emit: versions
kkonganti@1:
kkonganti@1: when:
kkonganti@1: task.ext.when == null || task.ext.when
kkonganti@1:
kkonganti@1: script:
kkonganti@1: def args = task.ext.args ?: ''
kkonganti@1:
kkonganti@1: """
kkonganti@1: sourmash_sim_matrix.py \\
kkonganti@1: -pickle ${params.tuspy_ps} \\
kkonganti@1: -csv $matrix \\
kkonganti@1: -labels $labels
kkonganti@1:
kkonganti@1: if [ -e "bcs_sourmash_matrix.tblsum.txt" ] && [ -s "bcs_sourmash_matrix.tblsum.txt" ]; then
kkonganti@1: create_mqc_data_table.py \\
kkonganti@1: "bcs_sourmash_matrix" \\
kkonganti@1: "The following table is an asymmetrical matrix of all v.
all ANI values between each of the sample FASTQ's sketch and genome FASTA'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@1: fi
kkonganti@1:
kkonganti@1: cat <<-END_VERSIONS > versions.yml
kkonganti@1: "${task.process}":
kkonganti@1: python: \$( python --version | sed 's/Python //g' )
kkonganti@1: bash: \$( bash --version 2>&1 | sed '1!d; s/^.*version //; s/ (.*\$//' )
kkonganti@1: END_VERSIONS
kkonganti@1: """
kkonganti@1: }