From 46a4dcca8e49581e61b4c3029577900cb1ececfb Mon Sep 17 00:00:00 2001
From: Alyssa Briggs
Date: Mon, 13 Mar 2023 15:38:46 -0500
Subject: [PATCH 01/42] Build: HOST_STAR Subworkflow
Co-authored-by: Mariana Dias Guilardi
---
subworkflows/local/host_star.nf | 42 +++++++++++++++++++++++++++++++++
1 file changed, 42 insertions(+)
create mode 100644 subworkflows/local/host_star.nf
diff --git a/subworkflows/local/host_star.nf b/subworkflows/local/host_star.nf
new file mode 100644
index 0000000..2784846
--- /dev/null
+++ b/subworkflows/local/host_star.nf
@@ -0,0 +1,42 @@
+//
+// Align input reads against host genome.
+//
+
+include { STAR_ALIGN } from '../../modules/nf-core/star/align/main.nf'
+include { STAR_GENOMEGENERATE_GENERATE } from '../../modules/nf-core/star/genomegenerate/main.nf'
+
+workflow HOST_STAR {
+ take:
+ reads // channel: [ val(meta), [ reads ] ]
+ fasta // file: /path/to/fasta/
+ gtf // file: /path/to/gtf/
+
+ main:
+ STAR_GENOMEGENEREATE (
+ fasta,
+ gtf
+ )
+ ch_versions = ch_versions.mix(STAR_GENOMEGENERATE.out.versions.first())
+ ch_star_index = STAR_GENOMEGENERATE.out.index
+
+ STAR_ALIGN (
+ reads,
+ ch_star_index,
+ gtf,
+ false,
+ "illumina",
+ false
+ )
+ ch_versions = ch_versions.mix(STAR_ALIGN.out.versions.first())
+
+
+ emit:
+ reads // channel: [ val(meta), [ reads ] ]
+ index = ch_star_index
+ bam = STAR_ALIGN.out.bam
+ log_final = STAR_ALIGN.out.log_final
+ log_out = STAR_ALIGN.out.log_out
+ log_progress = STAR_ALIGN.out.log_progress
+ fastq = STAR_ALIGN.out.fastq
+ versions = ch_versions // channel: [ versions.yml ]
+}
From 74b253c4490165896af19851d6b7fe7a86bd392e Mon Sep 17 00:00:00 2001
From: Alyssa Briggs
Date: Mon, 13 Mar 2023 15:38:46 -0500
Subject: [PATCH 02/42] Build: HOST_STAR Subworkflow
Co-authored-by: Mariana Dias Guilardi
---
subworkflows/local/host_star.nf | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/subworkflows/local/host_star.nf b/subworkflows/local/host_star.nf
index 2784846..a45326d 100644
--- a/subworkflows/local/host_star.nf
+++ b/subworkflows/local/host_star.nf
@@ -3,7 +3,7 @@
//
include { STAR_ALIGN } from '../../modules/nf-core/star/align/main.nf'
-include { STAR_GENOMEGENERATE_GENERATE } from '../../modules/nf-core/star/genomegenerate/main.nf'
+include { STAR_GENOMEGENERATE } from '../../modules/nf-core/star/genomegenerate/main.nf'
workflow HOST_STAR {
take:
@@ -12,7 +12,9 @@ workflow HOST_STAR {
gtf // file: /path/to/gtf/
main:
- STAR_GENOMEGENEREATE (
+ ch_versions = Channel.empty()
+
+ STAR_GENOMEGENERATE (
fasta,
gtf
)
From eb0947093e2193e9a9f1a7fba36b9b85ee537874 Mon Sep 17 00:00:00 2001
From: Alyssa Briggs
Date: Wed, 15 Mar 2023 16:49:55 -0500
Subject: [PATCH 03/42] host: add trimmers
---
subworkflows/local/{host_star.nf => host.nf} | 21 +++++++++++++++++++-
1 file changed, 20 insertions(+), 1 deletion(-)
rename subworkflows/local/{host_star.nf => host.nf} (67%)
diff --git a/subworkflows/local/host_star.nf b/subworkflows/local/host.nf
similarity index 67%
rename from subworkflows/local/host_star.nf
rename to subworkflows/local/host.nf
index a45326d..3b24bc7 100644
--- a/subworkflows/local/host_star.nf
+++ b/subworkflows/local/host.nf
@@ -4,8 +4,10 @@
include { STAR_ALIGN } from '../../modules/nf-core/star/align/main.nf'
include { STAR_GENOMEGENERATE } from '../../modules/nf-core/star/genomegenerate/main.nf'
+include { TRIMMOMATIC } from "../../modules/nf-core/trimmomatic/main.nf"
+include { POLYA_STRIPPER } from '../../modules/local/polyA_stripper.nf'
-workflow HOST_STAR {
+workflow HOST {
take:
reads // channel: [ val(meta), [ reads ] ]
fasta // file: /path/to/fasta/
@@ -31,14 +33,31 @@ workflow HOST_STAR {
)
ch_versions = ch_versions.mix(STAR_ALIGN.out.versions.first())
+ TRIMMOMATIC (
+ STAR_ALIGN.out.fastq
+ )
+ ch_versions = ch_versions.mix(TRIMMOMATIC.out.versions.first())
+
+ POLYA_STRIPPER (
+ TRIMMOMATIC.out.trimmed_reads
+ )
+ ch_versions = ch_versions.mix(POLYA_STRIPPER.out.versions.first())
+
emit:
reads // channel: [ val(meta), [ reads ] ]
+
index = ch_star_index
+
bam = STAR_ALIGN.out.bam
log_final = STAR_ALIGN.out.log_final
log_out = STAR_ALIGN.out.log_out
log_progress = STAR_ALIGN.out.log_progress
fastq = STAR_ALIGN.out.fastq
+
+ trimmed_reads = TRIMMOMATIC.out.trimmed_reads
+
+ polya_trimmed = POLYA_STRIPPER.out.polya_trimmed
+
versions = ch_versions // channel: [ versions.yml ]
}
From c66345c516886e91ec0fd3181d14f41a03eed112 Mon Sep 17 00:00:00 2001
From: Alyssa Briggs
Date: Wed, 15 Mar 2023 17:09:29 -0500
Subject: [PATCH 04/42] Build: PLUS subworkflow
Co-authored-by: Mariana Guilardi
---
subworkflows/local/plus.nf | 45 ++++++++++++++++++++++++++++++++++++++
1 file changed, 45 insertions(+)
create mode 100644 subworkflows/local/plus.nf
diff --git a/subworkflows/local/plus.nf b/subworkflows/local/plus.nf
new file mode 100644
index 0000000..de1643b
--- /dev/null
+++ b/subworkflows/local/plus.nf
@@ -0,0 +1,45 @@
+//
+// Align filtered reads against combined host and viral reference.
+//
+
+include { STAR_ALIGN } from '../../modules/nf-core/star/align/main.nf'
+include { STAR_GENOMEGENERATE } from '../../modules/nf-core/star/genomegenerate/main.nf'
+
+workflow PLUS {
+ take:
+ reads // channel: [ val(meta), [ reads ] ]
+ fasta // file: /path/to/fasta/
+ gtf // file: /path/to/gtf/
+
+ main:
+ ch_versions = Channel.empty()
+
+ STAR_GENOMEGENERATE (
+ fasta,
+ gtf
+ )
+ ch_versions = ch_versions.mix(STAR_GENOMEGENERATE.out.versions.first())
+ ch_star_index = STAR_GENOMEGENERATE.out.index
+
+ STAR_ALIGN (
+ reads,
+ ch_star_index,
+ gtf,
+ false,
+ "illumina",
+ false
+ )
+ ch_versions = ch_versions.mix(STAR_ALIGN.out.versions.first())
+
+ emit:
+ reads // channel: [ val(meta), [ reads ] ]
+
+ index = ch_star_index
+
+ bam = STAR_ALIGN.out.bam
+ log_final = STAR_ALIGN.out.log_final
+ log_out = STAR_ALIGN.out.log_out
+ log_progress = STAR_ALIGN.out.log_progress
+
+ versions = ch_versions // channel: [ versions.yml ]
+}
From 6016ea8f7ca539d959a8b6c9d8ba41b62a0e0727 Mon Sep 17 00:00:00 2001
From: Alyssa Briggs
Date: Wed, 15 Mar 2023 18:32:48 -0500
Subject: [PATCH 05/42] HOST: remove unneeded emissions
---
subworkflows/local/host.nf | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/subworkflows/local/host.nf b/subworkflows/local/host.nf
index 3b24bc7..e34de02 100644
--- a/subworkflows/local/host.nf
+++ b/subworkflows/local/host.nf
@@ -49,13 +49,13 @@ workflow HOST {
index = ch_star_index
- bam = STAR_ALIGN.out.bam
log_final = STAR_ALIGN.out.log_final
log_out = STAR_ALIGN.out.log_out
log_progress = STAR_ALIGN.out.log_progress
fastq = STAR_ALIGN.out.fastq
trimmed_reads = TRIMMOMATIC.out.trimmed_reads
+ //mqc_log = TRIMMOMATIC.out.mqc_log
polya_trimmed = POLYA_STRIPPER.out.polya_trimmed
From 6afdead038e6f28b37de3c61f63cfd43a0f5ee00 Mon Sep 17 00:00:00 2001
From: Alyssa Briggs
Date: Wed, 15 Mar 2023 18:33:29 -0500
Subject: [PATCH 06/42] PLUS: add junction emission
---
subworkflows/local/plus.nf | 1 +
1 file changed, 1 insertion(+)
diff --git a/subworkflows/local/plus.nf b/subworkflows/local/plus.nf
index de1643b..ea6fe9e 100644
--- a/subworkflows/local/plus.nf
+++ b/subworkflows/local/plus.nf
@@ -37,6 +37,7 @@ workflow PLUS {
index = ch_star_index
bam = STAR_ALIGN.out.bam
+ junction = STAR_ALIGN.out.junction
log_final = STAR_ALIGN.out.log_final
log_out = STAR_ALIGN.out.log_out
log_progress = STAR_ALIGN.out.log_progress
From f7144299766abab06e93b0ba08645847bf88f089 Mon Sep 17 00:00:00 2001
From: Alyssa Briggs
Date: Wed, 15 Mar 2023 18:33:53 -0500
Subject: [PATCH 07/42] PLUS: Add samtools
---
subworkflows/local/plus.nf | 17 +++++++++++++++++
1 file changed, 17 insertions(+)
diff --git a/subworkflows/local/plus.nf b/subworkflows/local/plus.nf
index ea6fe9e..47b4744 100644
--- a/subworkflows/local/plus.nf
+++ b/subworkflows/local/plus.nf
@@ -4,6 +4,8 @@
include { STAR_ALIGN } from '../../modules/nf-core/star/align/main.nf'
include { STAR_GENOMEGENERATE } from '../../modules/nf-core/star/genomegenerate/main.nf'
+include { SAMTOOLS_SORT } from '../../modules/nf-core/samtools/sort/main.nf'
+include { SAMTOOLS_INDEX } from '../../modules/nf-core/samtools/index/main.nf'
workflow PLUS {
take:
@@ -31,6 +33,17 @@ workflow PLUS {
)
ch_versions = ch_versions.mix(STAR_ALIGN.out.versions.first())
+ SAMTOOLS_SORT (
+ STAR_ALIGN.out.bam
+ )
+ ch_versions = ch_versions.mix(SAMTOOLS_SORT.out.versions.first())
+
+ SAMTOOLS_INDEX (
+ SAMTOOLS_SORT.out.bam
+ )
+ ch_versions = ch_versions.mix(SAMTOOLS_INDEX.out.versions.first())
+
+
emit:
reads // channel: [ val(meta), [ reads ] ]
@@ -42,5 +55,9 @@ workflow PLUS {
log_out = STAR_ALIGN.out.log_out
log_progress = STAR_ALIGN.out.log_progress
+ sambam = SAMTOOLS_SORT.out.bam
+
+ bai = SAMTOOLS_INDEX.out.bai
+
versions = ch_versions // channel: [ versions.yml ]
}
From dd510eef954bd476b2ac33ba7ec1e6f0435a6bbd Mon Sep 17 00:00:00 2001
From: Alyssa Briggs
Date: Mon, 20 Mar 2023 14:05:53 -0500
Subject: [PATCH 08/42] plus: add join bam_bai_junction
Co-authored-by: Mariana Dias Guilardi
---
subworkflows/local/plus.nf | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/subworkflows/local/plus.nf b/subworkflows/local/plus.nf
index 47b4744..c4ae1ab 100644
--- a/subworkflows/local/plus.nf
+++ b/subworkflows/local/plus.nf
@@ -43,6 +43,11 @@ workflow PLUS {
)
ch_versions = ch_versions.mix(SAMTOOLS_INDEX.out.versions.first())
+ SAMTOOLS_SORT.out.bam
+ .join(SAMTOOLS_INDEX.out.bai, by: [0], remainder: true)
+ .join(STAR_ALIGN.out.junction)
+ .set { ch_bam_bai_junction }
+
emit:
reads // channel: [ val(meta), [ reads ] ]
@@ -55,9 +60,11 @@ workflow PLUS {
log_out = STAR_ALIGN.out.log_out
log_progress = STAR_ALIGN.out.log_progress
- sambam = SAMTOOLS_SORT.out.bam
+ sam_bam = SAMTOOLS_SORT.out.bam
bai = SAMTOOLS_INDEX.out.bai
+ bam_bai_junction = ch_bam_bai_junction
+
versions = ch_versions // channel: [ versions.yml ]
}
From bf3680d08b643bc0ecc6279e04923204df9d35e0 Mon Sep 17 00:00:00 2001
From: Alyssa Briggs
Date: Mon, 20 Mar 2023 15:27:36 -0500
Subject: [PATCH 09/42] reorganize workflow with subworkflows
Co-authored-by: Mariana Guilardi
---
workflows/viralintegration.nf | 85 +++++++++++------------------------
1 file changed, 27 insertions(+), 58 deletions(-)
diff --git a/workflows/viralintegration.nf b/workflows/viralintegration.nf
index 7e5d785..32f7e52 100644
--- a/workflows/viralintegration.nf
+++ b/workflows/viralintegration.nf
@@ -47,6 +47,11 @@ include { REMOVE_DUPLICATES } from '../modules/local/remove_duplicates'
//
// SUBWORKFLOW: Consisting of a mix of local and nf-core/modules
//
+include { INPUT_CHECK } from '../subworkflows/local/input_check'
+include { HOST } from '../subworkflows/local/host'
+include { PLUS } from '../subworkflows/local/plus'
+
+
/*
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
IMPORT NF-CORE MODULES/SUBWORKFLOWS
@@ -115,32 +120,16 @@ workflow VIRALINTEGRATION {
)
ch_versions = ch_versions.mix(FASTQC.out.versions.first())
- STAR_GENOMEGENERATE_HOST (
+ //
+ // SUBWORKFLOW: Align input reads against host genome.
+ //
+
+ HOST (
+ INPUT_CHECK.out.reads,
params.fasta,
params.gtf
)
- ch_versions = ch_versions.mix(STAR_GENOMEGENERATE_HOST.out.versions)
-
- // TODO Use igenomes
- STAR_ALIGN_HOST (
- ch_fastq,
- STAR_GENOMEGENERATE_HOST.out.index,
- params.gtf,
- false,
- "illumina",
- false
- )
- ch_versions = ch_versions.mix(STAR_ALIGN_HOST.out.versions.first())
-
- TRIMMOMATIC (
- STAR_ALIGN_HOST.out.fastq
- )
- ch_versions = ch_versions.mix(TRIMMOMATIC.out.versions.first())
-
- POLYA_STRIPPER (
- TRIMMOMATIC.out.trimmed_reads
- )
- ch_versions = ch_versions.mix(POLYA_STRIPPER.out.versions.first())
+ ch_versions = ch_versions.mix(HOST.out.versions)
CAT_FASTA (
params.fasta,
@@ -148,39 +137,19 @@ workflow VIRALINTEGRATION {
)
ch_versions = ch_versions.mix(CAT_FASTA.out.versions)
- STAR_GENOMEGENERATE_PLUS (
+ //
+ // SUBWORKFLOW: Align filtered reads against combined host and viral reference.
+ //
+
+ PLUS (
+ HOST.out.polya_trimmed,
CAT_FASTA.out.plus_fasta,
params.gtf
)
- ch_versions = ch_versions.mix(STAR_GENOMEGENERATE_PLUS.out.versions)
-
- STAR_ALIGN_PLUS (
- POLYA_STRIPPER.out.polya_trimmed,
- STAR_GENOMEGENERATE_PLUS.out.index,
- params.gtf,
- false,
- "illumina",
- false
- )
- ch_versions = ch_versions.mix(STAR_ALIGN_PLUS.out.versions.first())
-
- SAMTOOLS_SORT_PLUS (
- STAR_ALIGN_PLUS.out.bam
- )
- ch_versions = ch_versions.mix(SAMTOOLS_SORT_PLUS.out.versions.first())
-
- SAMTOOLS_INDEX_PLUS (
- SAMTOOLS_SORT_PLUS.out.bam
- )
- ch_versions = ch_versions.mix(SAMTOOLS_INDEX_PLUS.out.versions.first())
-
- SAMTOOLS_SORT_PLUS.out.bam
- .join(SAMTOOLS_INDEX_PLUS.out.bai, by: [0], remainder: true)
- .join(STAR_ALIGN_PLUS.out.junction)
- .set { ch_bam_bai_junction }
+ ch_versions = ch_versions.mix(PLUS.out.versions)
INSERTION_SITE_CANDIDATES (
- ch_bam_bai_junction,
+ PLUS.out.bam_bai_junction,
params.fasta,
params.viral_fasta
)
@@ -191,8 +160,8 @@ workflow VIRALINTEGRATION {
)
// TODO ch_versions = ch_versions.mix(ABRIDGED_TSV.out.versions.first())
- SAMTOOLS_SORT_PLUS.out.bam
- .join(SAMTOOLS_INDEX_PLUS.out.bai, by: [0], remainder: true)
+ PLUS.out.sam_bam
+ .join(PLUS.out.bai, by: [0], remainder: true)
.join(ABRIDGED_TSV.out.filtered_abridged)
.set { ch_bam_bai_filtered }
@@ -213,12 +182,12 @@ workflow VIRALINTEGRATION {
)
ch_versions = ch_versions.mix(EXTRACT_CHIMERIC_GENOMIC_TARGETS.out.versions.first())
- STAR_ALIGN_HOST.out.fastq
+ HOST.out.fastq
.join(EXTRACT_CHIMERIC_GENOMIC_TARGETS.out.fasta_extract)
.set { ch_unaligned_fastq_fasta }
STAR_ALIGN_VALIDATE (
ch_unaligned_fastq_fasta,
- STAR_GENOMEGENERATE_PLUS.out.index,
+ PLUS.out.index,
"illumina",
false
)
@@ -290,9 +259,9 @@ workflow VIRALINTEGRATION {
.mix(ch_methods_description.collectFile(name: 'methods_description_mqc.yaml'))
.mix(CUSTOM_DUMPSOFTWAREVERSIONS.out.mqc_yml.collect())
.mix(FASTQC.out.zip.collect{it[1]}.ifEmpty([]))
- .mix(STAR_ALIGN_HOST.out.log_final.collect{it[1]}.ifEmpty([]))
- .mix(TRIMMOMATIC.out.mqc_log.collect{it[1]}.ifEmpty([]))
- .mix(STAR_ALIGN_PLUS.out.log_final.collect{it[1]}.ifEmpty([]))
+ .mix(HOST.out.log_final.collect{it[1]}.ifEmpty([]))
+ //.mix(TRIMMOMATIC.out.mqc_log.collect{it[1]}.ifEmpty([]))
+ .mix(PLUS.out.log_final.collect{it[1]}.ifEmpty([]))
.mix(STAR_ALIGN_VALIDATE.out.log_final.collect{it[1]}.ifEmpty([]))
From a3344a41afab72b68d0c05e4c1533d6b12f494d8 Mon Sep 17 00:00:00 2001
From: Alyssa Briggs
Date: Mon, 20 Mar 2023 16:08:21 -0500
Subject: [PATCH 10/42] subworkflows: rename STAR to match args
Co-authored-by: Mariana Guilardi
---
subworkflows/local/host.nf | 16 ++++++++--------
subworkflows/local/plus.nf | 20 ++++++++++----------
2 files changed, 18 insertions(+), 18 deletions(-)
diff --git a/subworkflows/local/host.nf b/subworkflows/local/host.nf
index e34de02..ef2200c 100644
--- a/subworkflows/local/host.nf
+++ b/subworkflows/local/host.nf
@@ -2,7 +2,7 @@
// Align input reads against host genome.
//
-include { STAR_ALIGN } from '../../modules/nf-core/star/align/main.nf'
+include { STAR_ALIGN as STAR_ALIGN_HOST } from '../../modules/nf-core/star/align/main.nf'
include { STAR_GENOMEGENERATE } from '../../modules/nf-core/star/genomegenerate/main.nf'
include { TRIMMOMATIC } from "../../modules/nf-core/trimmomatic/main.nf"
include { POLYA_STRIPPER } from '../../modules/local/polyA_stripper.nf'
@@ -23,7 +23,7 @@ workflow HOST {
ch_versions = ch_versions.mix(STAR_GENOMEGENERATE.out.versions.first())
ch_star_index = STAR_GENOMEGENERATE.out.index
- STAR_ALIGN (
+ STAR_ALIGN_HOST (
reads,
ch_star_index,
gtf,
@@ -31,10 +31,10 @@ workflow HOST {
"illumina",
false
)
- ch_versions = ch_versions.mix(STAR_ALIGN.out.versions.first())
+ ch_versions = ch_versions.mix(STAR_ALIGN_HOST.out.versions.first())
TRIMMOMATIC (
- STAR_ALIGN.out.fastq
+ STAR_ALIGN_HOST.out.fastq
)
ch_versions = ch_versions.mix(TRIMMOMATIC.out.versions.first())
@@ -49,10 +49,10 @@ workflow HOST {
index = ch_star_index
- log_final = STAR_ALIGN.out.log_final
- log_out = STAR_ALIGN.out.log_out
- log_progress = STAR_ALIGN.out.log_progress
- fastq = STAR_ALIGN.out.fastq
+ log_final = STAR_ALIGN_HOST.out.log_final
+ log_out = STAR_ALIGN_HOST.out.log_out
+ log_progress = STAR_ALIGN_HOST.out.log_progress
+ fastq = STAR_ALIGN_HOST.out.fastq
trimmed_reads = TRIMMOMATIC.out.trimmed_reads
//mqc_log = TRIMMOMATIC.out.mqc_log
diff --git a/subworkflows/local/plus.nf b/subworkflows/local/plus.nf
index c4ae1ab..9cfc171 100644
--- a/subworkflows/local/plus.nf
+++ b/subworkflows/local/plus.nf
@@ -2,7 +2,7 @@
// Align filtered reads against combined host and viral reference.
//
-include { STAR_ALIGN } from '../../modules/nf-core/star/align/main.nf'
+include { STAR_ALIGN as STAR_ALIGN_PLUS } from '../../modules/nf-core/star/align/main.nf'
include { STAR_GENOMEGENERATE } from '../../modules/nf-core/star/genomegenerate/main.nf'
include { SAMTOOLS_SORT } from '../../modules/nf-core/samtools/sort/main.nf'
include { SAMTOOLS_INDEX } from '../../modules/nf-core/samtools/index/main.nf'
@@ -23,7 +23,7 @@ workflow PLUS {
ch_versions = ch_versions.mix(STAR_GENOMEGENERATE.out.versions.first())
ch_star_index = STAR_GENOMEGENERATE.out.index
- STAR_ALIGN (
+ STAR_ALIGN_PLUS (
reads,
ch_star_index,
gtf,
@@ -31,10 +31,10 @@ workflow PLUS {
"illumina",
false
)
- ch_versions = ch_versions.mix(STAR_ALIGN.out.versions.first())
+ ch_versions = ch_versions.mix(STAR_ALIGN_PLUS.out.versions.first())
SAMTOOLS_SORT (
- STAR_ALIGN.out.bam
+ STAR_ALIGN_PLUS.out.bam
)
ch_versions = ch_versions.mix(SAMTOOLS_SORT.out.versions.first())
@@ -45,7 +45,7 @@ workflow PLUS {
SAMTOOLS_SORT.out.bam
.join(SAMTOOLS_INDEX.out.bai, by: [0], remainder: true)
- .join(STAR_ALIGN.out.junction)
+ .join(STAR_ALIGN_PLUS.out.junction)
.set { ch_bam_bai_junction }
@@ -54,11 +54,11 @@ workflow PLUS {
index = ch_star_index
- bam = STAR_ALIGN.out.bam
- junction = STAR_ALIGN.out.junction
- log_final = STAR_ALIGN.out.log_final
- log_out = STAR_ALIGN.out.log_out
- log_progress = STAR_ALIGN.out.log_progress
+ bam = STAR_ALIGN_PLUS.out.bam
+ junction = STAR_ALIGN_PLUS.out.junction
+ log_final = STAR_ALIGN_PLUS.out.log_final
+ log_out = STAR_ALIGN_PLUS.out.log_out
+ log_progress = STAR_ALIGN_PLUS.out.log_progress
sam_bam = SAMTOOLS_SORT.out.bam
From de860aaea99cb10714d99a213574c388c6849dd6 Mon Sep 17 00:00:00 2001
From: Alyssa Briggs
Date: Mon, 20 Mar 2023 16:11:59 -0500
Subject: [PATCH 11/42] clean up main workflow
---
workflows/viralintegration.nf | 11 ++---------
1 file changed, 2 insertions(+), 9 deletions(-)
diff --git a/workflows/viralintegration.nf b/workflows/viralintegration.nf
index 32f7e52..b2600e0 100644
--- a/workflows/viralintegration.nf
+++ b/workflows/viralintegration.nf
@@ -62,16 +62,9 @@ include { PLUS } from '../subworkflows/local/plus'
// MODULE: Installed directly from nf-core/modules
//
include { FASTQC } from '../modules/nf-core/fastqc/main'
-include { TRIMMOMATIC } from '../modules/nf-core/trimmomatic/main'
-include { STAR_GENOMEGENERATE as STAR_GENOMEGENERATE_HOST
- STAR_GENOMEGENERATE as STAR_GENOMEGENERATE_PLUS } from '../modules/nf-core/star/genomegenerate/main'
-include { STAR_ALIGN as STAR_ALIGN_HOST
- STAR_ALIGN as STAR_ALIGN_PLUS } from '../modules/nf-core/star/align/main'
-include { SAMTOOLS_SORT as SAMTOOLS_SORT_PLUS
- SAMTOOLS_SORT as SAMTOOLS_SORT_VALIDATE
+include { SAMTOOLS_SORT as SAMTOOLS_SORT_VALIDATE
SAMTOOLS_SORT as SAMTOOLS_SORT_DUPLICATES } from '../modules/nf-core/samtools/sort/main'
-include { SAMTOOLS_INDEX as SAMTOOLS_INDEX_PLUS
- SAMTOOLS_INDEX as SAMTOOLS_INDEX_VALIDATE
+include { SAMTOOLS_INDEX as SAMTOOLS_INDEX_VALIDATE
SAMTOOLS_INDEX as SAMTOOLS_INDEX_DUPLICATES } from '../modules/nf-core/samtools/index/main'
include { MULTIQC } from '../modules/nf-core/multiqc/main'
include { CUSTOM_DUMPSOFTWAREVERSIONS } from '../modules/nf-core/custom/dumpsoftwareversions/main'
From 4185391f4616bab602dbb56b32e0735a0357e7b4 Mon Sep 17 00:00:00 2001
From: Alyssa Briggs
Date: Wed, 22 Mar 2023 11:41:15 -0500
Subject: [PATCH 12/42] build INSERTION_SITES subworkflow
---
subworkflows/local/insertion_sites.nf | 76 +++++++++++++++++++++++++++
workflows/viralintegration.nf | 53 ++++++-------------
2 files changed, 93 insertions(+), 36 deletions(-)
create mode 100644 subworkflows/local/insertion_sites.nf
diff --git a/subworkflows/local/insertion_sites.nf b/subworkflows/local/insertion_sites.nf
new file mode 100644
index 0000000..22629ed
--- /dev/null
+++ b/subworkflows/local/insertion_sites.nf
@@ -0,0 +1,76 @@
+//
+// Map potential virus insertion sites and create virus infection evidence viewer.
+//
+
+include { INSERTION_SITE_CANDIDATES } from '../../modules/local/insertion_site_candidates.nf'
+include { ABRIDGED_TSV } from '../../modules/local/abridged_tsv.nf'
+include { VIRUS_REPORT } from '../../modules/local/virus_report.nf'
+include { EXTRACT_CHIMERIC_GENOMIC_TARGETS } from '../../modules/local/extract_chimeric_genomic_targets.nf'
+
+workflow INSERTION_SITES {
+ take:
+ junction // file: /path/to/junction/
+ fasta // file: /path/to/fasta/
+ viral_fasta // file: /path/to/viral_fasta/
+ bam // file: /path/to/bam/
+ bai // file: /path/to/bai/
+ igvjs_VIF
+
+
+ main:
+ ch_versions = Channel.empty()
+
+ INSERTION_SITE_CANDIDATES (
+ junction,
+ fasta,
+ viral_fasta
+ )
+ ch_versions = ch_versions.mix(INSERTION_SITE_CANDIDATES.out.versions.first())
+
+ ABRIDGED_TSV (
+ INSERTION_SITE_CANDIDATES.out.full
+ )
+ // TODO ch_versions = ch_versions.mix(ABRIDGED_TSV.out.versions.first())
+
+ bam
+ .join(bai, by: [0], remainder: true)
+ .join(ABRIDGED_TSV.out.filtered_abridged)
+ .set { ch_bam_bai_filtered }
+
+ VIRUS_REPORT (
+ ch_bam_bai_filtered,
+ viral_fasta,
+ igvjs_VIF
+ )
+ ch_versions = ch_versions.mix(VIRUS_REPORT.out.versions.first())
+
+ // TODO Handle insertion_site_candidates
+ // File insertion_site_candidates_use = select_first([insertion_site_candidates, InsertionSiteCandidates.filtered_abridged])
+
+ EXTRACT_CHIMERIC_GENOMIC_TARGETS (
+ ABRIDGED_TSV.out.filtered_abridged,
+ fasta,
+ viral_fasta
+ )
+ ch_versions = ch_versions.mix(EXTRACT_CHIMERIC_GENOMIC_TARGETS.out.versions.first())
+
+ emit:
+ full = INSERTION_SITE_CANDIDATES.out.full
+ genome_chimeric_evidence_reads_bam = INSERTION_SITE_CANDIDATES.out.genome_chimeric_evidence_reads_bam
+ genome_chimeric_evidence_reads_bai = INSERTION_SITE_CANDIDATES.out.genome_chimeric_evidence_reads_bai
+
+ filtered_abridged = ABRIDGED_TSV.out.filtered_abridged
+
+ html = VIRUS_REPORT.out.html
+ genome_abundance_plot = VIRUS_REPORT.out.genome_abundance_plot
+ virus_alignments_bam = VIRUS_REPORT.out.virus_alignments_bam
+ virus_alignments_bai = VIRUS_REPORT.out.virus_alignments_bai
+ read_counts_summary = VIRUS_REPORT.out.read_counts_summary
+ read_counts_image = VIRUS_REPORT.out.read_counts_image
+ read_counts_log_image = VIRUS_REPORT.out.read_counts_log_image
+
+ fasta_extract = EXTRACT_CHIMERIC_GENOMIC_TARGETS.out.fasta_extract
+ gtf_extract = EXTRACT_CHIMERIC_GENOMIC_TARGETS.out.gtf_extract
+
+ versions = ch_versions // channel: [ versions.yml ]
+}
diff --git a/workflows/viralintegration.nf b/workflows/viralintegration.nf
index b2600e0..67ee0a0 100644
--- a/workflows/viralintegration.nf
+++ b/workflows/viralintegration.nf
@@ -50,6 +50,7 @@ include { REMOVE_DUPLICATES } from '../modules/local/remove_duplicates'
include { INPUT_CHECK } from '../subworkflows/local/input_check'
include { HOST } from '../subworkflows/local/host'
include { PLUS } from '../subworkflows/local/plus'
+include { INSERTION_SITES } from '../subworkflows/local/insertion_sites'
/*
@@ -141,42 +142,22 @@ workflow VIRALINTEGRATION {
)
ch_versions = ch_versions.mix(PLUS.out.versions)
- INSERTION_SITE_CANDIDATES (
+ //
+ // SUBWORKFLOW: Map potential virus insertion sites and create virus infection evidence viewer.
+ //
+
+ INSERTION_SITES (
PLUS.out.bam_bai_junction,
params.fasta,
- params.viral_fasta
- )
- ch_versions = ch_versions.mix(INSERTION_SITE_CANDIDATES.out.versions.first())
-
- ABRIDGED_TSV (
- INSERTION_SITE_CANDIDATES.out.full
- )
- // TODO ch_versions = ch_versions.mix(ABRIDGED_TSV.out.versions.first())
-
- PLUS.out.sam_bam
- .join(PLUS.out.bai, by: [0], remainder: true)
- .join(ABRIDGED_TSV.out.filtered_abridged)
- .set { ch_bam_bai_filtered }
-
- VIRUS_REPORT (
- ch_bam_bai_filtered,
params.viral_fasta,
+ PLUS.out.sam_bam,
+ PLUS.out.bai,
ch_igvjs_VIF
)
- ch_versions = ch_versions.mix(VIRUS_REPORT.out.versions.first())
-
- // TODO Handle insertion_site_candidates
- // File insertion_site_candidates_use = select_first([insertion_site_candidates, InsertionSiteCandidates.filtered_abridged])
-
- EXTRACT_CHIMERIC_GENOMIC_TARGETS (
- ABRIDGED_TSV.out.filtered_abridged,
- params.fasta,
- params.viral_fasta
- )
- ch_versions = ch_versions.mix(EXTRACT_CHIMERIC_GENOMIC_TARGETS.out.versions.first())
+ ch_versions = ch_versions.mix(INSERTION_SITES.out.versions)
HOST.out.fastq
- .join(EXTRACT_CHIMERIC_GENOMIC_TARGETS.out.fasta_extract)
+ .join(INSERTION_SITES.out.fasta_extract)
.set { ch_unaligned_fastq_fasta }
STAR_ALIGN_VALIDATE (
ch_unaligned_fastq_fasta,
@@ -208,7 +189,7 @@ workflow VIRALINTEGRATION {
}
ch_to_dupe_or_not
- .join(EXTRACT_CHIMERIC_GENOMIC_TARGETS.out.gtf_extract, by: [0])
+ .join(INSERTION_SITES.out.gtf_extract, by: [0])
.set { ch_validate_bam_bai_gtf }
CHIMERIC_CONTIG_EVIDENCE_ANALYZER (
@@ -218,13 +199,13 @@ workflow VIRALINTEGRATION {
CHIMERIC_CONTIG_EVIDENCE_ANALYZER.out.evidence_bam
.join(CHIMERIC_CONTIG_EVIDENCE_ANALYZER.out.evidence_bai, by: [0])
- .join(ABRIDGED_TSV.out.filtered_abridged, by: [0])
+ .join(INSERTION_SITES.out.filtered_abridged, by: [0])
.join(CHIMERIC_CONTIG_EVIDENCE_ANALYZER.out.evidence_counts, by: [0])
- .join(EXTRACT_CHIMERIC_GENOMIC_TARGETS.out.gtf_extract, by: [0])
- .join(EXTRACT_CHIMERIC_GENOMIC_TARGETS.out.fasta_extract, by: [0])
- .join(VIRUS_REPORT.out.genome_abundance_plot, by: [0])
- .join(VIRUS_REPORT.out.read_counts_image, by: [0])
- .join(VIRUS_REPORT.out.read_counts_log_image, by: [0])
+ .join(INSERTION_SITES.out.gtf_extract, by: [0])
+ .join(INSERTION_SITES.out.fasta_extract, by: [0])
+ .join(INSERTION_SITES.out.genome_abundance_plot, by: [0])
+ .join(INSERTION_SITES.out.read_counts_image, by: [0])
+ .join(INSERTION_SITES.out.read_counts_log_image, by: [0])
.set { ch_summary_report }
SUMMARY_REPORT(
From 77fc465c0bd0cbebe843a81464506c1f064771c7 Mon Sep 17 00:00:00 2001
From: alyssa-ab
Date: Mon, 27 Mar 2023 12:05:01 -0500
Subject: [PATCH 13/42] build: validate subworkflow
---
subworkflows/local/validate.nf | 46 ++++++++++++++++++++++++++++++++++
workflows/viralintegration.nf | 40 +++++++++++------------------
2 files changed, 60 insertions(+), 26 deletions(-)
create mode 100644 subworkflows/local/validate.nf
diff --git a/subworkflows/local/validate.nf b/subworkflows/local/validate.nf
new file mode 100644
index 0000000..cf4030a
--- /dev/null
+++ b/subworkflows/local/validate.nf
@@ -0,0 +1,46 @@
+//
+// Validate potential chimeric reads.
+//
+
+include { STAR_ALIGN_VALIDATE } from '../../modules/local/star_align_validate.nf'
+include { SAMTOOLS_SORT} from '../../modules/nf-core/samtools/sort/main.nf'
+include { SAMTOOLS_INDEX } from '../../modules/nf-core/samtools/index/main.nf'
+
+workflow VALIDATE {
+ take:
+ reads // channel: [ val(meta), [ reads ] ]
+ fasta_extract
+ index
+
+ main:
+ ch_versions = Channel.empty()
+
+ reads
+ .join(fasta_extract)
+ .set { ch_unaligned_fastq_fasta }
+
+ STAR_ALIGN_VALIDATE (
+ ch_unaligned_fastq_fasta,
+ index,
+ "illumina",
+ false
+ )
+ ch_versions = ch_versions.mix(STAR_ALIGN_VALIDATE.out.versions.first())
+
+ SAMTOOLS_SORT (
+ STAR_ALIGN_VALIDATE.out.bam
+ )
+ ch_versions = ch_versions.mix(SAMTOOLS_SORT.out.versions.first())
+
+ SAMTOOLS_SORT.out.bam.join(
+ SAMTOOLS_INDEX ( SAMTOOLS_SORT.out.bam ).bai,
+ by: [0], remainder: true)
+ .set { ch_validate_bam_bai }
+
+
+ emit:
+
+ bam_bai = ch_validate_bam_bai
+
+ versions = ch_versions // channel: [ versions.yml ]
+}
diff --git a/workflows/viralintegration.nf b/workflows/viralintegration.nf
index 67ee0a0..bffbb2c 100644
--- a/workflows/viralintegration.nf
+++ b/workflows/viralintegration.nf
@@ -39,7 +39,6 @@ include { INSERTION_SITE_CANDIDATES } from '../modules/local/insertion_site_cand
include { ABRIDGED_TSV } from '../modules/local/abridged_tsv'
include { VIRUS_REPORT } from '../modules/local/virus_report'
include { EXTRACT_CHIMERIC_GENOMIC_TARGETS } from '../modules/local/extract_chimeric_genomic_targets'
-include { STAR_ALIGN_VALIDATE } from '../modules/local/star_align_validate'
include { CHIMERIC_CONTIG_EVIDENCE_ANALYZER } from '../modules/local/chimeric_contig_evidence_analyzer'
include { SUMMARY_REPORT } from '../modules/local/summary_report'
include { REMOVE_DUPLICATES } from '../modules/local/remove_duplicates'
@@ -51,6 +50,7 @@ include { INPUT_CHECK } from '../subworkflows/local/input_check'
include { HOST } from '../subworkflows/local/host'
include { PLUS } from '../subworkflows/local/plus'
include { INSERTION_SITES } from '../subworkflows/local/insertion_sites'
+include { VALIDATE } from '../subworkflows/local/validate'
/*
@@ -63,10 +63,8 @@ include { INSERTION_SITES } from '../subworkflows/local/insertion_sites'
// MODULE: Installed directly from nf-core/modules
//
include { FASTQC } from '../modules/nf-core/fastqc/main'
-include { SAMTOOLS_SORT as SAMTOOLS_SORT_VALIDATE
- SAMTOOLS_SORT as SAMTOOLS_SORT_DUPLICATES } from '../modules/nf-core/samtools/sort/main'
-include { SAMTOOLS_INDEX as SAMTOOLS_INDEX_VALIDATE
- SAMTOOLS_INDEX as SAMTOOLS_INDEX_DUPLICATES } from '../modules/nf-core/samtools/index/main'
+include { SAMTOOLS_SORT as SAMTOOLS_SORT_DUPLICATES } from '../modules/nf-core/samtools/sort/main'
+include { SAMTOOLS_INDEX as SAMTOOLS_INDEX_DUPLICATES } from '../modules/nf-core/samtools/index/main'
include { MULTIQC } from '../modules/nf-core/multiqc/main'
include { CUSTOM_DUMPSOFTWAREVERSIONS } from '../modules/nf-core/custom/dumpsoftwareversions/main'
@@ -156,36 +154,26 @@ workflow VIRALINTEGRATION {
)
ch_versions = ch_versions.mix(INSERTION_SITES.out.versions)
- HOST.out.fastq
- .join(INSERTION_SITES.out.fasta_extract)
- .set { ch_unaligned_fastq_fasta }
- STAR_ALIGN_VALIDATE (
- ch_unaligned_fastq_fasta,
- PLUS.out.index,
- "illumina",
- false
- )
- ch_versions = ch_versions.mix(STAR_ALIGN_VALIDATE.out.versions.first())
+ //
+ // SUBWORKFLOW: Validate potential chimeric reads.
+ //
- SAMTOOLS_SORT_VALIDATE (
- STAR_ALIGN_VALIDATE.out.bam
+ VALIDATE (
+ HOST.out.fastq,
+ INSERTION_SITES.out.fasta_extract,
+ PLUS.out.index
)
- ch_versions = ch_versions.mix(SAMTOOLS_SORT_VALIDATE.out.versions.first())
-
- SAMTOOLS_SORT_VALIDATE.out.bam.join(
- SAMTOOLS_INDEX_VALIDATE ( SAMTOOLS_SORT_VALIDATE.out.bam ).bai,
- by: [0], remainder: true)
- .set { ch_validate_bam_bai }
+ ch_versions = ch_versions.mix(VALIDATE.out.versions)
ch_to_dupe_or_not = Channel.empty()
// Check if REMOVE_DUPLICATES.out.bam exists.
if (params.remove_duplicates) {
- REMOVE_DUPLICATES ( ch_validate_bam_bai )
+ REMOVE_DUPLICATES ( VALIDATE.out.bam_bai )
ch_versions = ch_versions.mix(REMOVE_DUPLICATES.out.versions.first())
ch_to_dupe_or_not = REMOVE_DUPLICATES.out.bam_bai
} else {
- ch_to_dupe_or_not = ch_validate_bam_bai
+ ch_to_dupe_or_not = VALIDATE.out.bam_bai
}
ch_to_dupe_or_not
@@ -236,7 +224,7 @@ workflow VIRALINTEGRATION {
.mix(HOST.out.log_final.collect{it[1]}.ifEmpty([]))
//.mix(TRIMMOMATIC.out.mqc_log.collect{it[1]}.ifEmpty([]))
.mix(PLUS.out.log_final.collect{it[1]}.ifEmpty([]))
- .mix(STAR_ALIGN_VALIDATE.out.log_final.collect{it[1]}.ifEmpty([]))
+ .mix(VALIDATE.out.log_final.collect{it[1]}.ifEmpty([]))
MULTIQC (
From 9f35672f1d47bc4f3fe7c7677a74a2b12e6ff8a2 Mon Sep 17 00:00:00 2001
From: Edmund Miller
Date: Mon, 27 Mar 2023 12:32:04 -0500
Subject: [PATCH 14/42] fix(validate): Add log_final to make Multiqc happy
---
subworkflows/local/validate.nf | 1 +
1 file changed, 1 insertion(+)
diff --git a/subworkflows/local/validate.nf b/subworkflows/local/validate.nf
index cf4030a..9d92c00 100644
--- a/subworkflows/local/validate.nf
+++ b/subworkflows/local/validate.nf
@@ -41,6 +41,7 @@ workflow VALIDATE {
emit:
bam_bai = ch_validate_bam_bai
+ log_final = STAR_ALIGN_VALIDATE.out.log_final
versions = ch_versions // channel: [ versions.yml ]
}
From 136c021148f134c1cad82385c7d670ed024e9305 Mon Sep 17 00:00:00 2001
From: Alyssa Ann Briggs
Date: Tue, 28 Mar 2023 15:04:37 -0500
Subject: [PATCH 15/42] fix(host): add mqc_log for TRIMMOMATIC in MultiQC
---
subworkflows/local/host.nf | 2 +-
workflows/viralintegration.nf | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/subworkflows/local/host.nf b/subworkflows/local/host.nf
index ef2200c..a9a7d0e 100644
--- a/subworkflows/local/host.nf
+++ b/subworkflows/local/host.nf
@@ -55,7 +55,7 @@ workflow HOST {
fastq = STAR_ALIGN_HOST.out.fastq
trimmed_reads = TRIMMOMATIC.out.trimmed_reads
- //mqc_log = TRIMMOMATIC.out.mqc_log
+ mqc_log = TRIMMOMATIC.out.mqc_log
polya_trimmed = POLYA_STRIPPER.out.polya_trimmed
diff --git a/workflows/viralintegration.nf b/workflows/viralintegration.nf
index bffbb2c..f65e3c7 100644
--- a/workflows/viralintegration.nf
+++ b/workflows/viralintegration.nf
@@ -222,7 +222,7 @@ workflow VIRALINTEGRATION {
.mix(CUSTOM_DUMPSOFTWAREVERSIONS.out.mqc_yml.collect())
.mix(FASTQC.out.zip.collect{it[1]}.ifEmpty([]))
.mix(HOST.out.log_final.collect{it[1]}.ifEmpty([]))
- //.mix(TRIMMOMATIC.out.mqc_log.collect{it[1]}.ifEmpty([]))
+ .mix(HOST.out.mqc_log.collect{it[1]}.ifEmpty([]))
.mix(PLUS.out.log_final.collect{it[1]}.ifEmpty([]))
.mix(VALIDATE.out.log_final.collect{it[1]}.ifEmpty([]))
From 88ee4e3b6c368f4c508e258739cc54ea2974f6ef Mon Sep 17 00:00:00 2001
From: Alyssa Ann Briggs
Date: Tue, 28 Mar 2023 15:05:48 -0500
Subject: [PATCH 16/42] build chimeric reads subworkflow
---
subworkflows/local/chimeric_reads.nf | 72 ++++++++++++++++++++++++++++
workflows/viralintegration.nf | 61 +++++++----------------
2 files changed, 89 insertions(+), 44 deletions(-)
create mode 100644 subworkflows/local/chimeric_reads.nf
diff --git a/subworkflows/local/chimeric_reads.nf b/subworkflows/local/chimeric_reads.nf
new file mode 100644
index 0000000..9bda209
--- /dev/null
+++ b/subworkflows/local/chimeric_reads.nf
@@ -0,0 +1,72 @@
+//
+// Refine chimeric read counts and create final summary report.
+//
+
+include { REMOVE_DUPLICATES } from '../../modules/local/remove_duplicates.nf'
+include { CHIMERIC_CONTIG_EVIDENCE_ANALYZER } from '../../modules/local/chimeric_contig_evidence_analyzer.nf'
+include { SUMMARY_REPORT } from '../../modules/local/summary_report.nf'
+
+workflow CHIMERIC_READS {
+ take:
+ bam_bai
+ gtf_extract
+ fasta_extract
+ filtered_abridged
+ genome_abundance_plot
+ read_counts_image
+ read_counts_log_image
+ gtf
+ igvjs_VIF
+
+ main:
+ ch_versions = Channel.empty()
+
+ ch_to_dupe_or_not = Channel.empty()
+ // Check if REMOVE_DUPLICATES.out.bam exists.
+ if (params.remove_duplicates) {
+ REMOVE_DUPLICATES ( bam_bai )
+ ch_versions = ch_versions.mix(REMOVE_DUPLICATES.out.versions.first())
+ ch_to_dupe_or_not = REMOVE_DUPLICATES.out.bam_bai
+ } else {
+ ch_to_dupe_or_not = bam_bai
+ }
+
+ ch_to_dupe_or_not
+ .join(gtf_extract, by: [0])
+ .set { ch_validate_bam_bai_gtf }
+
+ CHIMERIC_CONTIG_EVIDENCE_ANALYZER (
+ ch_validate_bam_bai_gtf
+ )
+ ch_versions = ch_versions.mix(CHIMERIC_CONTIG_EVIDENCE_ANALYZER.out.versions.first())
+
+ CHIMERIC_CONTIG_EVIDENCE_ANALYZER.out.evidence_bam
+ .join(CHIMERIC_CONTIG_EVIDENCE_ANALYZER.out.evidence_bai, by: [0])
+ .join(filtered_abridged, by: [0])
+ .join(CHIMERIC_CONTIG_EVIDENCE_ANALYZER.out.evidence_counts, by: [0])
+ .join(gtf_extract, by: [0])
+ .join(fasta_extract, by: [0])
+ .join(genome_abundance_plot, by: [0])
+ .join(read_counts_image, by: [0])
+ .join(read_counts_log_image, by: [0])
+ .set { ch_summary_report }
+
+ SUMMARY_REPORT(
+ ch_summary_report,
+ gtf,
+ igvjs_VIF
+ )
+ ch_versions = ch_versions.mix(SUMMARY_REPORT.out.versions.first())
+
+
+ emit:
+
+ evidence_counts = CHIMERIC_CONTIG_EVIDENCE_ANALYZER.out.evidence_counts
+
+ html = SUMMARY_REPORT.out.html
+ refined_counts = SUMMARY_REPORT.out.refined_counts
+ refined_counts_w_genes = SUMMARY_REPORT.out.refined_counts_w_genes
+ genome_abundance_plot = SUMMARY_REPORT.out.genome_abundance_plot
+
+ versions = ch_versions // channel: [ versions.yml ]
+}
diff --git a/workflows/viralintegration.nf b/workflows/viralintegration.nf
index f65e3c7..c8fe1f3 100644
--- a/workflows/viralintegration.nf
+++ b/workflows/viralintegration.nf
@@ -33,15 +33,7 @@ ch_igvjs_VIF = file("$projectDir/assets/igvjs_VIF.html", checkIfExis
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
*/
-include { POLYA_STRIPPER } from '../modules/local/polyA_stripper'
include { CAT_FASTA } from '../modules/local/cat_fasta'
-include { INSERTION_SITE_CANDIDATES } from '../modules/local/insertion_site_candidates'
-include { ABRIDGED_TSV } from '../modules/local/abridged_tsv'
-include { VIRUS_REPORT } from '../modules/local/virus_report'
-include { EXTRACT_CHIMERIC_GENOMIC_TARGETS } from '../modules/local/extract_chimeric_genomic_targets'
-include { CHIMERIC_CONTIG_EVIDENCE_ANALYZER } from '../modules/local/chimeric_contig_evidence_analyzer'
-include { SUMMARY_REPORT } from '../modules/local/summary_report'
-include { REMOVE_DUPLICATES } from '../modules/local/remove_duplicates'
//
// SUBWORKFLOW: Consisting of a mix of local and nf-core/modules
@@ -51,7 +43,7 @@ include { HOST } from '../subworkflows/local/host'
include { PLUS } from '../subworkflows/local/plus'
include { INSERTION_SITES } from '../subworkflows/local/insertion_sites'
include { VALIDATE } from '../subworkflows/local/validate'
-
+include { CHIMERIC_READS } from '../subworkflows/local/chimeric_reads'
/*
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
@@ -63,8 +55,6 @@ include { VALIDATE } from '../subworkflows/local/validate'
// MODULE: Installed directly from nf-core/modules
//
include { FASTQC } from '../modules/nf-core/fastqc/main'
-include { SAMTOOLS_SORT as SAMTOOLS_SORT_DUPLICATES } from '../modules/nf-core/samtools/sort/main'
-include { SAMTOOLS_INDEX as SAMTOOLS_INDEX_DUPLICATES } from '../modules/nf-core/samtools/index/main'
include { MULTIQC } from '../modules/nf-core/multiqc/main'
include { CUSTOM_DUMPSOFTWAREVERSIONS } from '../modules/nf-core/custom/dumpsoftwareversions/main'
@@ -123,6 +113,10 @@ workflow VIRALINTEGRATION {
)
ch_versions = ch_versions.mix(HOST.out.versions)
+ //
+ // MODULE: CAT viral and host reference fastas.
+ //
+
CAT_FASTA (
params.fasta,
params.viral_fasta
@@ -165,43 +159,22 @@ workflow VIRALINTEGRATION {
)
ch_versions = ch_versions.mix(VALIDATE.out.versions)
+ //
+ // SUBWORKFLOW: Refine chimeric read counts and create final summary report.
+ //
- ch_to_dupe_or_not = Channel.empty()
- // Check if REMOVE_DUPLICATES.out.bam exists.
- if (params.remove_duplicates) {
- REMOVE_DUPLICATES ( VALIDATE.out.bam_bai )
- ch_versions = ch_versions.mix(REMOVE_DUPLICATES.out.versions.first())
- ch_to_dupe_or_not = REMOVE_DUPLICATES.out.bam_bai
- } else {
- ch_to_dupe_or_not = VALIDATE.out.bam_bai
- }
-
- ch_to_dupe_or_not
- .join(INSERTION_SITES.out.gtf_extract, by: [0])
- .set { ch_validate_bam_bai_gtf }
-
- CHIMERIC_CONTIG_EVIDENCE_ANALYZER (
- ch_validate_bam_bai_gtf
- )
- ch_versions = ch_versions.mix(CHIMERIC_CONTIG_EVIDENCE_ANALYZER.out.versions.first())
-
- CHIMERIC_CONTIG_EVIDENCE_ANALYZER.out.evidence_bam
- .join(CHIMERIC_CONTIG_EVIDENCE_ANALYZER.out.evidence_bai, by: [0])
- .join(INSERTION_SITES.out.filtered_abridged, by: [0])
- .join(CHIMERIC_CONTIG_EVIDENCE_ANALYZER.out.evidence_counts, by: [0])
- .join(INSERTION_SITES.out.gtf_extract, by: [0])
- .join(INSERTION_SITES.out.fasta_extract, by: [0])
- .join(INSERTION_SITES.out.genome_abundance_plot, by: [0])
- .join(INSERTION_SITES.out.read_counts_image, by: [0])
- .join(INSERTION_SITES.out.read_counts_log_image, by: [0])
- .set { ch_summary_report }
-
- SUMMARY_REPORT(
- ch_summary_report,
+ CHIMERIC_READS (
+ VALIDATE.out.bam_bai,
+ INSERTION_SITES.out.gtf_extract,
+ INSERTION_SITES.out.fasta_extract,
+ INSERTION_SITES.out.filtered_abridged,
+ INSERTION_SITES.out.genome_abundance_plot,
+ INSERTION_SITES.out.read_counts_image,
+ INSERTION_SITES.out.read_counts_log_image,
params.gtf,
ch_igvjs_VIF
)
- ch_versions = ch_versions.mix(SUMMARY_REPORT.out.versions.first())
+ ch_versions = ch_versions.mix(CHIMERIC_READS.out.versions)
CUSTOM_DUMPSOFTWAREVERSIONS (
ch_versions.unique().collectFile(name: 'collated_versions.yml')
From 818c0fb09afb06c5517f38a40fa559a4e01b0847 Mon Sep 17 00:00:00 2001
From: nf-core-bot
Date: Fri, 28 Apr 2023 14:27:00 +0000
Subject: [PATCH 17/42] Template update for nf-core/tools version 2.8
---
README.md | 2 ++
conf/test_full.config | 2 ++
lib/WorkflowMain.groovy | 2 ++
nextflow.config | 5 +++--
4 files changed, 9 insertions(+), 2 deletions(-)
diff --git a/README.md b/README.md
index 13005bb..d19dd3e 100644
--- a/README.md
+++ b/README.md
@@ -1,7 +1,9 @@
# ![nf-core/viralintegration](docs/images/nf-core-viralintegration_logo_light.png#gh-light-mode-only) ![nf-core/viralintegration](docs/images/nf-core-viralintegration_logo_dark.png#gh-dark-mode-only)
+[![AWS CI](https://img.shields.io/badge/CI%20tests-full%20size-FF9900?labelColor=000000&logo=Amazon%20AWS)](https://nf-co.re/viralintegration/results)[![Cite with Zenodo](http://img.shields.io/badge/DOI-10.5281/zenodo.7783480-1073c8?labelColor=000000)](https://doi.org/10.5281/zenodo.7783480)
[![AWS CI](https://img.shields.io/badge/CI%20tests-full%20size-FF9900?labelColor=000000&logo=Amazon%20AWS)](https://nf-co.re/viralintegration/results)[![Cite with Zenodo](http://img.shields.io/badge/DOI-10.5281/zenodo.7783480-1073c8?labelColor=000000)](https://doi.org/10.5281/zenodo.7783480)
+[![Nextflow](https://img.shields.io/badge/nextflow%20DSL2-%E2%89%A523.04.0-23aa62.svg)](https://www.nextflow.io/)
[![Nextflow](https://img.shields.io/badge/nextflow%20DSL2-%E2%89%A523.04.0-23aa62.svg)](https://www.nextflow.io/)
[![run with conda](http://img.shields.io/badge/run%20with-conda-3EB049?labelColor=000000&logo=anaconda)](https://docs.conda.io/en/latest/)
[![run with docker](https://img.shields.io/badge/run%20with-docker-0db7ed?labelColor=000000&logo=docker)](https://www.docker.com/)
diff --git a/conf/test_full.config b/conf/test_full.config
index 97d0ff6..f0bf84b 100644
--- a/conf/test_full.config
+++ b/conf/test_full.config
@@ -10,6 +10,8 @@
----------------------------------------------------------------------------------------
*/
+cleanup = true
+
params {
config_profile_name = 'Full test profile'
config_profile_description = 'Full test dataset to check pipeline function'
diff --git a/lib/WorkflowMain.groovy b/lib/WorkflowMain.groovy
index ab84a4a..811a4eb 100755
--- a/lib/WorkflowMain.groovy
+++ b/lib/WorkflowMain.groovy
@@ -4,6 +4,8 @@
import nextflow.Nextflow
+import nextflow.Nextflow
+
class WorkflowMain {
//
diff --git a/nextflow.config b/nextflow.config
index 8a8e195..fc69473 100644
--- a/nextflow.config
+++ b/nextflow.config
@@ -27,7 +27,7 @@ params {
genome = null
igenomes_base = 's3://ngi-igenomes/igenomes'
igenomes_ignore = false
-
+
// MultiQC options
multiqc_config = null
@@ -54,7 +54,7 @@ params {
custom_config_base = "https://raw.githubusercontent.com/nf-core/configs/${params.custom_config_version}"
config_profile_contact = null
config_profile_url = null
-
+
// Max resource options
// Defaults only, expecting to be overwritten
@@ -115,6 +115,7 @@ profiles {
}
docker {
docker.enabled = true
+ docker.registry = 'quay.io'
docker.userEmulation = true
conda.enabled = false
singularity.enabled = false
From aac112c5f71e00392996b4123b2bd4a02210b039 Mon Sep 17 00:00:00 2001
From: nf-core-bot
Date: Fri, 30 Jun 2023 16:16:34 +0000
Subject: [PATCH 18/42] Template update for nf-core/tools version 2.9
---
conf/test_full.config | 2 --
nextflow.config | 1 -
2 files changed, 3 deletions(-)
diff --git a/conf/test_full.config b/conf/test_full.config
index f0bf84b..97d0ff6 100644
--- a/conf/test_full.config
+++ b/conf/test_full.config
@@ -10,8 +10,6 @@
----------------------------------------------------------------------------------------
*/
-cleanup = true
-
params {
config_profile_name = 'Full test profile'
config_profile_description = 'Full test dataset to check pipeline function'
diff --git a/nextflow.config b/nextflow.config
index fc69473..f8f72f2 100644
--- a/nextflow.config
+++ b/nextflow.config
@@ -115,7 +115,6 @@ profiles {
}
docker {
docker.enabled = true
- docker.registry = 'quay.io'
docker.userEmulation = true
conda.enabled = false
singularity.enabled = false
From 487a09af449e6e82e50e96b2b8e492820556eca6 Mon Sep 17 00:00:00 2001
From: Alyssa Briggs
Date: Sat, 18 Feb 2023 17:56:25 -0600
Subject: [PATCH 19/42] bug fix: rollback star and samtools version
---
modules.json | 6 ++-
modules/nf-core/samtools/index/main.nf | 10 ++---
.../samtools/index/samtools-index.diff | 38 +++++++++++++++++++
modules/nf-core/samtools/sort/main.nf | 10 ++---
.../nf-core/samtools/sort/samtools-sort.diff | 37 ++++++++++++++++++
5 files changed, 87 insertions(+), 14 deletions(-)
create mode 100644 modules/nf-core/samtools/index/samtools-index.diff
create mode 100644 modules/nf-core/samtools/sort/samtools-sort.diff
diff --git a/modules.json b/modules.json
index 1266e31..4d8f8ca 100644
--- a/modules.json
+++ b/modules.json
@@ -23,12 +23,14 @@
"samtools/index": {
"branch": "master",
"git_sha": "c8e35eb2055c099720a75538d1b8adb3fb5a464c",
- "installed_by": ["modules"]
+ "installed_by": ["modules"],
+ "patch": "modules/nf-core/samtools/index/samtools-index.diff"
},
"samtools/sort": {
"branch": "master",
"git_sha": "c8e35eb2055c099720a75538d1b8adb3fb5a464c",
- "installed_by": ["modules"]
+ "installed_by": ["modules"],
+ "patch": "modules/nf-core/samtools/sort/samtools-sort.diff"
},
"star/align": {
"branch": "master",
diff --git a/modules/nf-core/samtools/index/main.nf b/modules/nf-core/samtools/index/main.nf
index 8b95687..c63797a 100644
--- a/modules/nf-core/samtools/index/main.nf
+++ b/modules/nf-core/samtools/index/main.nf
@@ -2,10 +2,10 @@ process SAMTOOLS_INDEX {
tag "$meta.id"
label 'process_low'
- conda "bioconda::samtools=1.16.1"
+ conda "bioconda::samtools=1.15.1"
container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ?
- 'https://depot.galaxyproject.org/singularity/samtools:1.16.1--h6899075_1' :
- 'quay.io/biocontainers/samtools:1.16.1--h6899075_1' }"
+ 'https://depot.galaxyproject.org/singularity/samtools:1.15.1--h1170115_0' :
+ 'quay.io/biocontainers/samtools:1.15.1--h1170115_0' }"
input:
tuple val(meta), path(input)
@@ -27,7 +27,6 @@ process SAMTOOLS_INDEX {
-@ ${task.cpus-1} \\
$args \\
$input
-
cat <<-END_VERSIONS > versions.yml
"${task.process}":
samtools: \$(echo \$(samtools --version 2>&1) | sed 's/^.*samtools //; s/Using.*\$//')
@@ -39,10 +38,9 @@ process SAMTOOLS_INDEX {
touch ${input}.bai
touch ${input}.crai
touch ${input}.csi
-
cat <<-END_VERSIONS > versions.yml
"${task.process}":
samtools: \$(echo \$(samtools --version 2>&1) | sed 's/^.*samtools //; s/Using.*\$//')
END_VERSIONS
"""
-}
+}
\ No newline at end of file
diff --git a/modules/nf-core/samtools/index/samtools-index.diff b/modules/nf-core/samtools/index/samtools-index.diff
new file mode 100644
index 0000000..88f1250
--- /dev/null
+++ b/modules/nf-core/samtools/index/samtools-index.diff
@@ -0,0 +1,38 @@
+Changes in module 'nf-core/samtools/index'
+--- modules/nf-core/samtools/index/main.nf
++++ modules/nf-core/samtools/index/main.nf
+@@ -2,10 +2,10 @@
+ tag "$meta.id"
+ label 'process_low'
+
+- conda "bioconda::samtools=1.16.1"
++ conda "bioconda::samtools=1.15.1"
+ container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ?
+- 'https://depot.galaxyproject.org/singularity/samtools:1.16.1--h6899075_1' :
+- 'quay.io/biocontainers/samtools:1.16.1--h6899075_1' }"
++ 'https://depot.galaxyproject.org/singularity/samtools:1.15.1--h1170115_0' :
++ 'quay.io/biocontainers/samtools:1.15.1--h1170115_0' }"
+
+ input:
+ tuple val(meta), path(input)
+@@ -27,7 +27,6 @@
+ -@ ${task.cpus-1} \\
+ $args \\
+ $input
+-
+ cat <<-END_VERSIONS > versions.yml
+ "${task.process}":
+ samtools: \$(echo \$(samtools --version 2>&1) | sed 's/^.*samtools //; s/Using.*\$//')
+@@ -39,10 +38,9 @@
+ touch ${input}.bai
+ touch ${input}.crai
+ touch ${input}.csi
+-
+ cat <<-END_VERSIONS > versions.yml
+ "${task.process}":
+ samtools: \$(echo \$(samtools --version 2>&1) | sed 's/^.*samtools //; s/Using.*\$//')
+ END_VERSIONS
+ """
+-}
++}
+************************************************************
diff --git a/modules/nf-core/samtools/sort/main.nf b/modules/nf-core/samtools/sort/main.nf
index 84c167c..c6a9a27 100644
--- a/modules/nf-core/samtools/sort/main.nf
+++ b/modules/nf-core/samtools/sort/main.nf
@@ -2,17 +2,16 @@ process SAMTOOLS_SORT {
tag "$meta.id"
label 'process_medium'
- conda "bioconda::samtools=1.16.1"
+ conda "bioconda::samtools=1.15.1"
container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ?
- 'https://depot.galaxyproject.org/singularity/samtools:1.16.1--h6899075_1' :
- 'quay.io/biocontainers/samtools:1.16.1--h6899075_1' }"
+ 'https://depot.galaxyproject.org/singularity/samtools:1.15.1--h1170115_0' :
+ 'quay.io/biocontainers/samtools:1.15.1--h1170115_0' }"
input:
tuple val(meta), path(bam)
output:
tuple val(meta), path("*.bam"), emit: bam
- tuple val(meta), path("*.csi"), emit: csi, optional: true
path "versions.yml" , emit: versions
when:
@@ -34,10 +33,9 @@ process SAMTOOLS_SORT {
def prefix = task.ext.prefix ?: "${meta.id}"
"""
touch ${prefix}.bam
-
cat <<-END_VERSIONS > versions.yml
"${task.process}":
samtools: \$(echo \$(samtools --version 2>&1) | sed 's/^.*samtools //; s/Using.*\$//')
END_VERSIONS
"""
-}
+}
\ No newline at end of file
diff --git a/modules/nf-core/samtools/sort/samtools-sort.diff b/modules/nf-core/samtools/sort/samtools-sort.diff
new file mode 100644
index 0000000..a026f97
--- /dev/null
+++ b/modules/nf-core/samtools/sort/samtools-sort.diff
@@ -0,0 +1,37 @@
+Changes in module 'nf-core/samtools/sort'
+--- modules/nf-core/samtools/sort/main.nf
++++ modules/nf-core/samtools/sort/main.nf
+@@ -2,17 +2,16 @@
+ tag "$meta.id"
+ label 'process_medium'
+
+- conda "bioconda::samtools=1.16.1"
++ conda "bioconda::samtools=1.15.1"
+ container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ?
+- 'https://depot.galaxyproject.org/singularity/samtools:1.16.1--h6899075_1' :
+- 'quay.io/biocontainers/samtools:1.16.1--h6899075_1' }"
++ 'https://depot.galaxyproject.org/singularity/samtools:1.15.1--h1170115_0' :
++ 'quay.io/biocontainers/samtools:1.15.1--h1170115_0' }"
+
+ input:
+ tuple val(meta), path(bam)
+
+ output:
+ tuple val(meta), path("*.bam"), emit: bam
+- tuple val(meta), path("*.csi"), emit: csi, optional: true
+ path "versions.yml" , emit: versions
+
+ when:
+@@ -34,10 +33,9 @@
+ def prefix = task.ext.prefix ?: "${meta.id}"
+ """
+ touch ${prefix}.bam
+-
+ cat <<-END_VERSIONS > versions.yml
+ "${task.process}":
+ samtools: \$(echo \$(samtools --version 2>&1) | sed 's/^.*samtools //; s/Using.*\$//')
+ END_VERSIONS
+ """
+-}
++}
+************************************************************
From fd28f0cb2e85232c18dbeace6a141165d4a69d67 Mon Sep 17 00:00:00 2001
From: Alyssa Briggs
Date: Wed, 22 Feb 2023 20:41:40 -0600
Subject: [PATCH 20/42] star/samtools: use matching mulled containers
---
modules/nf-core/samtools/index/main.nf | 4 ++--
modules/nf-core/samtools/index/samtools-index.diff | 4 ++--
modules/nf-core/samtools/sort/main.nf | 4 ++--
modules/nf-core/samtools/sort/samtools-sort.diff | 4 ++--
4 files changed, 8 insertions(+), 8 deletions(-)
diff --git a/modules/nf-core/samtools/index/main.nf b/modules/nf-core/samtools/index/main.nf
index c63797a..7d3d4b0 100644
--- a/modules/nf-core/samtools/index/main.nf
+++ b/modules/nf-core/samtools/index/main.nf
@@ -4,8 +4,8 @@ process SAMTOOLS_INDEX {
conda "bioconda::samtools=1.15.1"
container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ?
- 'https://depot.galaxyproject.org/singularity/samtools:1.15.1--h1170115_0' :
- 'quay.io/biocontainers/samtools:1.15.1--h1170115_0' }"
+ 'https://depot.galaxyproject.org/singularity/mulled-v2-1fa26d1ce03c295fe2fdcf85831a92fbcbd7e8c2:1df389393721fc66f3fd8778ad938ac711951107-0' :
+ 'quay.io/biocontainers/mulled-v2-1fa26d1ce03c295fe2fdcf85831a92fbcbd7e8c2:1df389393721fc66f3fd8778ad938ac711951107-0' }"
input:
tuple val(meta), path(input)
diff --git a/modules/nf-core/samtools/index/samtools-index.diff b/modules/nf-core/samtools/index/samtools-index.diff
index 88f1250..897fde1 100644
--- a/modules/nf-core/samtools/index/samtools-index.diff
+++ b/modules/nf-core/samtools/index/samtools-index.diff
@@ -10,8 +10,8 @@ Changes in module 'nf-core/samtools/index'
container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ?
- 'https://depot.galaxyproject.org/singularity/samtools:1.16.1--h6899075_1' :
- 'quay.io/biocontainers/samtools:1.16.1--h6899075_1' }"
-+ 'https://depot.galaxyproject.org/singularity/samtools:1.15.1--h1170115_0' :
-+ 'quay.io/biocontainers/samtools:1.15.1--h1170115_0' }"
++ 'https://depot.galaxyproject.org/singularity/mulled-v2-1fa26d1ce03c295fe2fdcf85831a92fbcbd7e8c2:1df389393721fc66f3fd8778ad938ac711951107-0' :
++ 'quay.io/biocontainers/mulled-v2-1fa26d1ce03c295fe2fdcf85831a92fbcbd7e8c2:1df389393721fc66f3fd8778ad938ac711951107-0' }"
input:
tuple val(meta), path(input)
diff --git a/modules/nf-core/samtools/sort/main.nf b/modules/nf-core/samtools/sort/main.nf
index c6a9a27..a3421d9 100644
--- a/modules/nf-core/samtools/sort/main.nf
+++ b/modules/nf-core/samtools/sort/main.nf
@@ -4,8 +4,8 @@ process SAMTOOLS_SORT {
conda "bioconda::samtools=1.15.1"
container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ?
- 'https://depot.galaxyproject.org/singularity/samtools:1.15.1--h1170115_0' :
- 'quay.io/biocontainers/samtools:1.15.1--h1170115_0' }"
+ 'https://depot.galaxyproject.org/singularity/mulled-v2-1fa26d1ce03c295fe2fdcf85831a92fbcbd7e8c2:1df389393721fc66f3fd8778ad938ac711951107-0' :
+ 'quay.io/biocontainers/mulled-v2-1fa26d1ce03c295fe2fdcf85831a92fbcbd7e8c2:1df389393721fc66f3fd8778ad938ac711951107-0' }"
input:
tuple val(meta), path(bam)
diff --git a/modules/nf-core/samtools/sort/samtools-sort.diff b/modules/nf-core/samtools/sort/samtools-sort.diff
index a026f97..ab7c513 100644
--- a/modules/nf-core/samtools/sort/samtools-sort.diff
+++ b/modules/nf-core/samtools/sort/samtools-sort.diff
@@ -10,8 +10,8 @@ Changes in module 'nf-core/samtools/sort'
container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ?
- 'https://depot.galaxyproject.org/singularity/samtools:1.16.1--h6899075_1' :
- 'quay.io/biocontainers/samtools:1.16.1--h6899075_1' }"
-+ 'https://depot.galaxyproject.org/singularity/samtools:1.15.1--h1170115_0' :
-+ 'quay.io/biocontainers/samtools:1.15.1--h1170115_0' }"
++ 'https://depot.galaxyproject.org/singularity/mulled-v2-1fa26d1ce03c295fe2fdcf85831a92fbcbd7e8c2:1df389393721fc66f3fd8778ad938ac711951107-0' :
++ 'quay.io/biocontainers/mulled-v2-1fa26d1ce03c295fe2fdcf85831a92fbcbd7e8c2:1df389393721fc66f3fd8778ad938ac711951107-0' }"
input:
tuple val(meta), path(bam)
From 09b7b5cb0665bd2e23eb4aa77ae68ee0274c31a2 Mon Sep 17 00:00:00 2001
From: Edmund Miller
Date: Fri, 24 Feb 2023 09:13:15 -0600
Subject: [PATCH 21/42] fix: Remove samtools diffs
No reason to diverge from upstream on these, it's just a STAR problem.
---
modules.json | 6 +--
modules/nf-core/samtools/index/main.nf | 10 +++--
.../samtools/index/samtools-index.diff | 38 -------------------
modules/nf-core/samtools/sort/main.nf | 10 +++--
.../nf-core/samtools/sort/samtools-sort.diff | 37 ------------------
5 files changed, 14 insertions(+), 87 deletions(-)
delete mode 100644 modules/nf-core/samtools/index/samtools-index.diff
delete mode 100644 modules/nf-core/samtools/sort/samtools-sort.diff
diff --git a/modules.json b/modules.json
index 4d8f8ca..1266e31 100644
--- a/modules.json
+++ b/modules.json
@@ -23,14 +23,12 @@
"samtools/index": {
"branch": "master",
"git_sha": "c8e35eb2055c099720a75538d1b8adb3fb5a464c",
- "installed_by": ["modules"],
- "patch": "modules/nf-core/samtools/index/samtools-index.diff"
+ "installed_by": ["modules"]
},
"samtools/sort": {
"branch": "master",
"git_sha": "c8e35eb2055c099720a75538d1b8adb3fb5a464c",
- "installed_by": ["modules"],
- "patch": "modules/nf-core/samtools/sort/samtools-sort.diff"
+ "installed_by": ["modules"]
},
"star/align": {
"branch": "master",
diff --git a/modules/nf-core/samtools/index/main.nf b/modules/nf-core/samtools/index/main.nf
index 7d3d4b0..8b95687 100644
--- a/modules/nf-core/samtools/index/main.nf
+++ b/modules/nf-core/samtools/index/main.nf
@@ -2,10 +2,10 @@ process SAMTOOLS_INDEX {
tag "$meta.id"
label 'process_low'
- conda "bioconda::samtools=1.15.1"
+ conda "bioconda::samtools=1.16.1"
container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ?
- 'https://depot.galaxyproject.org/singularity/mulled-v2-1fa26d1ce03c295fe2fdcf85831a92fbcbd7e8c2:1df389393721fc66f3fd8778ad938ac711951107-0' :
- 'quay.io/biocontainers/mulled-v2-1fa26d1ce03c295fe2fdcf85831a92fbcbd7e8c2:1df389393721fc66f3fd8778ad938ac711951107-0' }"
+ 'https://depot.galaxyproject.org/singularity/samtools:1.16.1--h6899075_1' :
+ 'quay.io/biocontainers/samtools:1.16.1--h6899075_1' }"
input:
tuple val(meta), path(input)
@@ -27,6 +27,7 @@ process SAMTOOLS_INDEX {
-@ ${task.cpus-1} \\
$args \\
$input
+
cat <<-END_VERSIONS > versions.yml
"${task.process}":
samtools: \$(echo \$(samtools --version 2>&1) | sed 's/^.*samtools //; s/Using.*\$//')
@@ -38,9 +39,10 @@ process SAMTOOLS_INDEX {
touch ${input}.bai
touch ${input}.crai
touch ${input}.csi
+
cat <<-END_VERSIONS > versions.yml
"${task.process}":
samtools: \$(echo \$(samtools --version 2>&1) | sed 's/^.*samtools //; s/Using.*\$//')
END_VERSIONS
"""
-}
\ No newline at end of file
+}
diff --git a/modules/nf-core/samtools/index/samtools-index.diff b/modules/nf-core/samtools/index/samtools-index.diff
deleted file mode 100644
index 897fde1..0000000
--- a/modules/nf-core/samtools/index/samtools-index.diff
+++ /dev/null
@@ -1,38 +0,0 @@
-Changes in module 'nf-core/samtools/index'
---- modules/nf-core/samtools/index/main.nf
-+++ modules/nf-core/samtools/index/main.nf
-@@ -2,10 +2,10 @@
- tag "$meta.id"
- label 'process_low'
-
-- conda "bioconda::samtools=1.16.1"
-+ conda "bioconda::samtools=1.15.1"
- container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ?
-- 'https://depot.galaxyproject.org/singularity/samtools:1.16.1--h6899075_1' :
-- 'quay.io/biocontainers/samtools:1.16.1--h6899075_1' }"
-+ 'https://depot.galaxyproject.org/singularity/mulled-v2-1fa26d1ce03c295fe2fdcf85831a92fbcbd7e8c2:1df389393721fc66f3fd8778ad938ac711951107-0' :
-+ 'quay.io/biocontainers/mulled-v2-1fa26d1ce03c295fe2fdcf85831a92fbcbd7e8c2:1df389393721fc66f3fd8778ad938ac711951107-0' }"
-
- input:
- tuple val(meta), path(input)
-@@ -27,7 +27,6 @@
- -@ ${task.cpus-1} \\
- $args \\
- $input
--
- cat <<-END_VERSIONS > versions.yml
- "${task.process}":
- samtools: \$(echo \$(samtools --version 2>&1) | sed 's/^.*samtools //; s/Using.*\$//')
-@@ -39,10 +38,9 @@
- touch ${input}.bai
- touch ${input}.crai
- touch ${input}.csi
--
- cat <<-END_VERSIONS > versions.yml
- "${task.process}":
- samtools: \$(echo \$(samtools --version 2>&1) | sed 's/^.*samtools //; s/Using.*\$//')
- END_VERSIONS
- """
--}
-+}
-************************************************************
diff --git a/modules/nf-core/samtools/sort/main.nf b/modules/nf-core/samtools/sort/main.nf
index a3421d9..84c167c 100644
--- a/modules/nf-core/samtools/sort/main.nf
+++ b/modules/nf-core/samtools/sort/main.nf
@@ -2,16 +2,17 @@ process SAMTOOLS_SORT {
tag "$meta.id"
label 'process_medium'
- conda "bioconda::samtools=1.15.1"
+ conda "bioconda::samtools=1.16.1"
container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ?
- 'https://depot.galaxyproject.org/singularity/mulled-v2-1fa26d1ce03c295fe2fdcf85831a92fbcbd7e8c2:1df389393721fc66f3fd8778ad938ac711951107-0' :
- 'quay.io/biocontainers/mulled-v2-1fa26d1ce03c295fe2fdcf85831a92fbcbd7e8c2:1df389393721fc66f3fd8778ad938ac711951107-0' }"
+ 'https://depot.galaxyproject.org/singularity/samtools:1.16.1--h6899075_1' :
+ 'quay.io/biocontainers/samtools:1.16.1--h6899075_1' }"
input:
tuple val(meta), path(bam)
output:
tuple val(meta), path("*.bam"), emit: bam
+ tuple val(meta), path("*.csi"), emit: csi, optional: true
path "versions.yml" , emit: versions
when:
@@ -33,9 +34,10 @@ process SAMTOOLS_SORT {
def prefix = task.ext.prefix ?: "${meta.id}"
"""
touch ${prefix}.bam
+
cat <<-END_VERSIONS > versions.yml
"${task.process}":
samtools: \$(echo \$(samtools --version 2>&1) | sed 's/^.*samtools //; s/Using.*\$//')
END_VERSIONS
"""
-}
\ No newline at end of file
+}
diff --git a/modules/nf-core/samtools/sort/samtools-sort.diff b/modules/nf-core/samtools/sort/samtools-sort.diff
deleted file mode 100644
index ab7c513..0000000
--- a/modules/nf-core/samtools/sort/samtools-sort.diff
+++ /dev/null
@@ -1,37 +0,0 @@
-Changes in module 'nf-core/samtools/sort'
---- modules/nf-core/samtools/sort/main.nf
-+++ modules/nf-core/samtools/sort/main.nf
-@@ -2,17 +2,16 @@
- tag "$meta.id"
- label 'process_medium'
-
-- conda "bioconda::samtools=1.16.1"
-+ conda "bioconda::samtools=1.15.1"
- container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ?
-- 'https://depot.galaxyproject.org/singularity/samtools:1.16.1--h6899075_1' :
-- 'quay.io/biocontainers/samtools:1.16.1--h6899075_1' }"
-+ 'https://depot.galaxyproject.org/singularity/mulled-v2-1fa26d1ce03c295fe2fdcf85831a92fbcbd7e8c2:1df389393721fc66f3fd8778ad938ac711951107-0' :
-+ 'quay.io/biocontainers/mulled-v2-1fa26d1ce03c295fe2fdcf85831a92fbcbd7e8c2:1df389393721fc66f3fd8778ad938ac711951107-0' }"
-
- input:
- tuple val(meta), path(bam)
-
- output:
- tuple val(meta), path("*.bam"), emit: bam
-- tuple val(meta), path("*.csi"), emit: csi, optional: true
- path "versions.yml" , emit: versions
-
- when:
-@@ -34,10 +33,9 @@
- def prefix = task.ext.prefix ?: "${meta.id}"
- """
- touch ${prefix}.bam
--
- cat <<-END_VERSIONS > versions.yml
- "${task.process}":
- samtools: \$(echo \$(samtools --version 2>&1) | sed 's/^.*samtools //; s/Using.*\$//')
- END_VERSIONS
- """
--}
-+}
-************************************************************
From f1eb5cce790007350180b414a58551053e9ff126 Mon Sep 17 00:00:00 2001
From: Alyssa Briggs
Date: Tue, 18 Jul 2023 17:55:04 -0500
Subject: [PATCH 22/42] fix prettier
---
assets/igvjs_VIF.html | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/assets/igvjs_VIF.html b/assets/igvjs_VIF.html
index be54347..f5de86c 100644
--- a/assets/igvjs_VIF.html
+++ b/assets/igvjs_VIF.html
@@ -43,7 +43,7 @@
Spanning Read Count: Not Selected
- -->
+ -->
From 818e7020e66e9324c810b749c840a1de40a66630 Mon Sep 17 00:00:00 2001
From: Alyssa Briggs
Date: Tue, 18 Jul 2023 17:55:04 -0500
Subject: [PATCH 23/42] fix prettier
---
assets/igvjs_VIF.html | 379 ++++++++++++++++++++----------------------
1 file changed, 182 insertions(+), 197 deletions(-)
diff --git a/assets/igvjs_VIF.html b/assets/igvjs_VIF.html
index f5de86c..28901f8 100644
--- a/assets/igvjs_VIF.html
+++ b/assets/igvjs_VIF.html
@@ -78,215 +78,200 @@