Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update 2023 12 26 #274

Merged
merged 12 commits into from
Dec 26, 2023
3 changes: 3 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -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)
Expand Down
2 changes: 1 addition & 1 deletion configs/cecret_config_template.config
Original file line number Diff line number Diff line change
Expand Up @@ -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'
Expand Down
2 changes: 1 addition & 1 deletion main.nf
Original file line number Diff line number Diff line change
Expand Up @@ -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 = ""
Expand Down
4 changes: 2 additions & 2 deletions modules/bcftools.nf
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
8 changes: 4 additions & 4 deletions modules/freyja.nf
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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'
Expand Down Expand Up @@ -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'}
Expand Down
5 changes: 3 additions & 2 deletions modules/heatcluster.nf
Original file line number Diff line number Diff line change
@@ -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'
Expand All @@ -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

Expand All @@ -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
'''
}
12 changes: 6 additions & 6 deletions modules/igvreports.nf
Original file line number Diff line number Diff line change
Expand Up @@ -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'}
Expand All @@ -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
'''
Expand Down
4 changes: 2 additions & 2 deletions modules/ivar.nf
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
2 changes: 1 addition & 1 deletion nextflow.config
Original file line number Diff line number Diff line change
Expand Up @@ -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'
Expand Down
1 change: 0 additions & 1 deletion nextflow_schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,6 @@
"freyja_demix_options": {
"type": "string",
"hidden": true,
"default": "--depthcutoff 100",
"description": "Options for process"
},
"freyja_plot_filetype": {
Expand Down
7 changes: 6 additions & 1 deletion subworkflows/qc.nf
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down