diff --git a/README.md b/README.md index 440dea8e..c1870211 100644 --- a/README.md +++ b/README.md @@ -1,5 +1,8 @@ # Cecret +UPDATE : THIS README IS (albiet slowly) GETTING TURNED INTO A WIKI. YOU CAN CHECK OUR PROGRESS HERE: https://github.com/UPHL-BioNGS/Cecret/wiki + + Named after the beautiful [Cecret lake](https://en.wikipedia.org/wiki/Cecret_Lake) Location: 40.570°N 111.622°W , Elevation: 9,875 feet (3,010 m), [Hiking level: easy](https://www.alltrails.com/trail/us/utah/cecret-lake-trail) diff --git a/configs/cecret_config_template.config b/configs/cecret_config_template.config index acbba2d4..a9dda1a1 100644 --- a/configs/cecret_config_template.config +++ b/configs/cecret_config_template.config @@ -225,7 +225,7 @@ //params.freyja = true //params.freyja_aggregate = true //params.freyja_variants_options = '' -//params.freyja_demix_options = '--depthcutoff 100' +//params.freyja_demix_options = '' //params.freyja_aggregate_options = '' //params.freyja_plot_options = '' //params.freyja_plot_filetype = 'png' diff --git a/main.nf b/main.nf index ff3b0342..73e83014 100644 --- a/main.nf +++ b/main.nf @@ -190,7 +190,7 @@ params.vadr_mdir = '/opt/vadr/vadr-models' params.nextclade_options = '' params.nextalign_options = '--include-reference' params.freyja_variants_options = '' -params.freyja_demix_options = "--depthcutoff ${params.minimum_depth}" +params.freyja_demix_options = "" params.freyja_aggregate_options = '' params.freyja_plot_options = "" diff --git a/modules/bcftools.nf b/modules/bcftools.nf index b38b47d0..fa4e9245 100644 --- a/modules/bcftools.nf +++ b/modules/bcftools.nf @@ -18,8 +18,8 @@ process bcftools_variants { tuple val(sample), file(bam), file(reference_genome) output: - tuple val(sample), file(bam), file(reference_genome), file("bcftools_variants/${sample}.vcf"), emit: vcf - path "bcftools_variants/${sample}.vcf", emit: bcftools_variants_file + tuple val(sample), file("bcftools_variants/${sample}.vcf"), emit: vcf , optional: true + path "bcftools_variants/${sample}.vcf" , emit: bcftools_variants_file, optional: true path "logs/${task.process}/${sample}.${workflow.sessionId}.log" shell: diff --git a/modules/freyja.nf b/modules/freyja.nf index 15fc2563..067977b5 100644 --- a/modules/freyja.nf +++ b/modules/freyja.nf @@ -3,7 +3,7 @@ process freyja_variants { label "process_medium" //errorStrategy { task.attempt < 2 ? 'retry' : 'ignore'} publishDir "${params.outdir}", mode: 'copy' - container 'quay.io/uphl/freyja:1.4.8-2023-12-19' + container 'quay.io/uphl/freyja:1.4.8-2023-12-26' //#UPHLICA maxForks 10 @@ -45,7 +45,7 @@ process freyja_demix { label "process_medium" //errorStrategy { task.attempt < 2 ? 'retry' : 'ignore'} publishDir "${params.outdir}", mode: 'copy' - container 'quay.io/uphl/freyja:1.4.8-2023-12-19' + container 'quay.io/uphl/freyja:1.4.8-2023-12-26' //#UPHLICA maxForks 10 @@ -87,7 +87,7 @@ process freyja_boot { label "process_medium" //errorStrategy { task.attempt < 2 ? 'retry' : 'ignore'} publishDir "${params.outdir}", mode: 'copy' - container 'quay.io/uphl/freyja:1.4.8-2023-12-19' + container 'quay.io/uphl/freyja:1.4.8-2023-12-26' //#UPHLICA maxForks 10 //#UPHLICA pod annotation: 'scheduler.illumina.com/presetSize', value: 'standard-xlarge' @@ -126,7 +126,7 @@ process freyja_aggregate { tag "Aggregating results from freyja" label "process_single" publishDir "${params.outdir}", mode: 'copy' - container 'quay.io/uphl/freyja:1.4.8-2023-12-19' + container 'quay.io/uphl/freyja:1.4.8-2023-12-26' //#UPHLICA maxForks 10 //#UPHLICA errorStrategy { task.attempt < 2 ? 'retry' : 'ignore'} diff --git a/modules/heatcluster.nf b/modules/heatcluster.nf index 5d113a3f..109bf79c 100755 --- a/modules/heatcluster.nf +++ b/modules/heatcluster.nf @@ -1,7 +1,7 @@ process heatcluster { tag "HeatCluster" publishDir params.outdir, mode: 'copy' - container 'quay.io/uphl/heatcluster:1.0.2-2023-12-19' + container 'quay.io/uphl/heatcluster:1.0.2b-2023-12-26' maxForks 10 //#UPHLICA errorStrategy { task.attempt < 2 ? 'retry' : 'ignore'} //#UPHLICA pod annotation: 'scheduler.illumina.com/presetSize', value: 'standard-medium' @@ -16,7 +16,7 @@ process heatcluster { file(matrix) output: - path "heatcluster/heatcluster*" , optional : true + path "heatcluster/*" , optional : true path "heatcluster/heatcluster_mqc.png", optional : true , emit: for_multiqc path "logs/${task.process}/${task.process}.${workflow.sessionId}.log", emit: log_files @@ -38,5 +38,6 @@ process heatcluster { | tee -a $log_file if [ -f "heatcluster/heatcluster.png" ] ; then cp heatcluster/heatcluster.png heatcluster/heatcluster_mqc.png ; fi + if [ -f "sorted_matrix.csv" ] ; then cp sorted_matrix.csv heatcluster/sorted_matrix.csv ; fi ''' } diff --git a/modules/igvreports.nf b/modules/igvreports.nf index d9e0cd3e..b4e00163 100755 --- a/modules/igvreports.nf +++ b/modules/igvreports.nf @@ -2,7 +2,7 @@ process igv_reports { tag "${sample}" label "process_high" publishDir path: "${params.outdir}", mode: 'copy' - container 'quay.io/biocontainers/igv-reports:1.9.1--pyh7cba7a3_0' + container 'quay.io/biocontainers/igv-reports:1.10.0--pyh7cba7a3_0' //#UPHLICA maxForks 10 //#UPHLICA errorStrategy { task.attempt < 2 ? 'retry' : 'ignore'} @@ -15,25 +15,25 @@ process igv_reports { params.igv_reports input: - tuple val(sample), file(bam), file(reference_genome), file(vcf) + tuple val(sample), file(vcf), file(bam), file(bai), file(reference_genome) output: - path "igv_reports/${sample}/igvjs_viewer.html" + path "igv_reports/${sample}_igvjs_viewer.html" path "logs/${task.process}/${sample}.${workflow.sessionId}.log" shell: ''' - mkdir -p igv_reports/!{sample} logs/!{task.process} + mkdir -p igv_reports logs/!{task.process} log=logs/!{task.process}/!{sample}.!{workflow.sessionId}.log # time stamp + capturing tool versions date > $log - create_report -v >> $log + echo "igv-reports does not print version to screen" >> $log create_report !{params.igv_reports_options} \ --fasta !{reference_genome} \ --tracks !{vcf} !{bam} \ - --output igv_reports/!{sample}/igvjs_viewer.html \ + --output igv_reports/!{sample}_igvjs_viewer.html \ !{vcf} \ | tee -a $log ''' diff --git a/modules/ivar.nf b/modules/ivar.nf index 1955806b..2a9bfd82 100644 --- a/modules/ivar.nf +++ b/modules/ivar.nf @@ -65,8 +65,8 @@ process ivar_variants { tuple val(sample), file(bam), file(reference_genome), file(gff_file) output: - path "ivar_variants/${sample}.variants.tsv", emit: variant_tsv - path "ivar_variants/${sample}.ivar_variants.vcf", emit: ivar_variant_file + path "ivar_variants/${sample}.variants.tsv" , emit: variant_tsv + path "ivar_variants/${sample}.ivar_variants.vcf", emit: vcf path "logs/${task.process}/${sample}.${workflow.sessionId}.log" shell: diff --git a/nextflow.config b/nextflow.config index 72742627..8e1171d3 100644 --- a/nextflow.config +++ b/nextflow.config @@ -5,7 +5,7 @@ manifest { name = 'Cecret' author = 'Erin Young' homePage = 'https://github.com/UPHL-BioNGS/Cecret' - version = 'v3.10.20231219' + version = 'v3.10.20231226' defaultBranch = 'master' recurseSubmodules = false description = 'Reference-based consensus creation' diff --git a/nextflow_schema.json b/nextflow_schema.json index 5d873be0..c18b5e26 100644 --- a/nextflow_schema.json +++ b/nextflow_schema.json @@ -122,7 +122,6 @@ "freyja_demix_options": { "type": "string", "hidden": true, - "default": "--depthcutoff 100", "description": "Options for process" }, "freyja_plot_filetype": { diff --git a/subworkflows/qc.nf b/subworkflows/qc.nf index f64f6681..e9670438 100644 --- a/subworkflows/qc.nf +++ b/subworkflows/qc.nf @@ -47,7 +47,12 @@ workflow qc { samtools_ampliconstats(ch_trim_bam.map{ it -> tuple(it[0], it[1])}.combine(ch_primer_bed)) samtools_plot_ampliconstats(samtools_ampliconstats.out.samtools_ampliconstats_files) - //igv_reports(bcftools_variants.out.vcf) + bcftools_variants.out.vcf + .join(ch_trim_bam, by: 0) + .combine(ch_reference_genome) + .set{ for_igv_reports } + + igv_reports(for_igv_reports) samtools_coverage.out.samtools_coverage .collectFile(name: "samtools_coverage_summary.tsv",