Skip to content

Commit

Permalink
Merge pull request #408 from nf-core/collectinsertsizemetrics
Browse files Browse the repository at this point in the history
add insertsizemetrics to QC workflow
  • Loading branch information
rannick authored Oct 20, 2023
2 parents 57b4692 + 3e4165c commit 6a18471
Show file tree
Hide file tree
Showing 10 changed files with 135 additions and 2 deletions.
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

### Added

- Add picard CollectInserSizeMetrics to QC workflow [#408](https://github.com/nf-core/rnafusion/pull/408)

### Changed

- Removed `--fusioninspector_filter` and `--fusionreport_filter` in favor of `--tools_cutoff` (default = 1, no filters applied) [#389](https://github.com/nf-core/rnafusion/pull/389)
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ In rnafusion the full-sized test includes reference building and fusion detectio
- [FusionInspector](https://github.com/FusionInspector/FusionInspector)
- [Arriba](https://github.com/suhrig/arriba) visualisation
- QC for mapped reads ([`QualiMap: BAM QC`](https://kokonech.github.io/qualimap/HG00096.chr20_bamqc/qualimapReport.html))
- Collect metrics ([`picard CollectRnaSeqMetrics`](https://gatk.broadinstitute.org/hc/en-us/articles/360037057492-CollectRnaSeqMetrics-Picard-) and ([`picard MarkDuplicates`](https://gatk.broadinstitute.org/hc/en-us/articles/360037052812-MarkDuplicates-Picard-))
- Collect metrics ([`picard CollectRnaSeqMetrics`](https://gatk.broadinstitute.org/hc/en-us/articles/360037057492-CollectRnaSeqMetrics-Picard-), [`picard CollectInsertSizeMetrics`](https://gatk.broadinstitute.org/hc/en-us/articles/360037055772-CollectInsertSizeMetrics-Picard-) and ([`picard MarkDuplicates`](https://gatk.broadinstitute.org/hc/en-us/articles/360037052812-MarkDuplicates-Picard-))
13. Present QC for raw reads ([`MultiQC`](http://multiqc.info/))
14. Compress bam files to cram with [samtools view](http://www.htslib.org/)

Expand Down
4 changes: 4 additions & 0 deletions conf/modules.config
Original file line number Diff line number Diff line change
Expand Up @@ -173,6 +173,10 @@ process {
ext.when = { !params.skip_qc && !params.fusioninspector_only && (params.starfusion || params.all) }
}

withName: PICARD_COLLECTINSERTSIZEMETRICS {
ext.prefix = { "${meta.id}_collectinsertsize"}
}

withName: PIZZLY {
ext.args = "-k 31 --align-score 2 --insert-size 400 --cache index.cache.txt"
publishDir = [
Expand Down
1 change: 1 addition & 0 deletions docs/output.md
Original file line number Diff line number Diff line change
Expand Up @@ -279,6 +279,7 @@ Picard CollectRnaMetrics and picard MarkDuplicates share the same output directo
- `picard`
- `<sample>.MarkDuplicates.metrics.txt` - metrics from MarkDuplicates
- `<sample>_rna_metrics.txt` - metrics from CollectRnaMetrics
- `<sample>_insert_size_metrics.txt.txt` - metrics from CollectInsertSizeMetrics
- `<sample>.bam` - BAM file with marked duplicates

</details>
Expand Down
5 changes: 5 additions & 0 deletions modules.json
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,11 @@
"git_sha": "a6e11ac655e744f7ebc724be669dd568ffdc0e80",
"installed_by": ["modules"]
},
"picard/collectinsertsizemetrics": {
"branch": "master",
"git_sha": "240937a2a9c30298110753292be041188891f2cb",
"installed_by": ["modules"]
},
"picard/collectwgsmetrics": {
"branch": "master",
"git_sha": "735e1e04e7e01751d2d6e97055bbdb6f70683cc1",
Expand Down
61 changes: 61 additions & 0 deletions modules/nf-core/picard/collectinsertsizemetrics/main.nf

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

48 changes: 48 additions & 0 deletions modules/nf-core/picard/collectinsertsizemetrics/meta.yml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

7 changes: 7 additions & 0 deletions subworkflows/local/qc_workflow.nf
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@
include { QUALIMAP_RNASEQ } from '../../modules/nf-core/qualimap/rnaseq/main'
include { PICARD_COLLECTRNASEQMETRICS } from '../../modules/local/picard/collectrnaseqmetrics/main'
include { PICARD_MARKDUPLICATES } from '../../modules/nf-core/picard/markduplicates/main'
include { PICARD_COLLECTINSERTSIZEMETRICS } from '../../modules/nf-core/picard/collectinsertsizemetrics/main'


workflow QC_WORKFLOW {
take:
Expand All @@ -31,12 +33,17 @@ workflow QC_WORKFLOW {
ch_versions = ch_versions.mix(PICARD_MARKDUPLICATES.out.versions)
ch_duplicate_metrics = Channel.empty().mix(PICARD_MARKDUPLICATES.out.metrics)

PICARD_COLLECTINSERTSIZEMETRICS(ch_bam_sorted)
ch_versions = ch_versions.mix(PICARD_COLLECTINSERTSIZEMETRICS.out.versions)
ch_insertsize_metrics = Channel.empty().mix(PICARD_COLLECTINSERTSIZEMETRICS.out.metrics)


emit:
versions = ch_versions.ifEmpty(null)
qualimap_qc = ch_qualimap_qc
rnaseq_metrics = ch_rnaseq_metrics
duplicate_metrics = ch_duplicate_metrics
insertsize_metrics = ch_insertsize_metrics

}

6 changes: 5 additions & 1 deletion tower.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,11 @@ reports:
"**/picard/*.MarkDuplicates.metrics.txt":
display: "Picard: Metrics from CollectRnaMetrics"
"**/picard/*_rna_metrics.txt":
display: "Picard: Metrics from MarkDuplicates"
display: "GATK4: Metrics from MarkDuplicates"
"**/picard/*insert*size*metrics.txt":
display: "GATK4: Metrics from InsertSizeMetrics"
"**/picard/*pdf":
display: "GATK4: InsertSizeMetrics histogram"
"**/pizzly/*.pizzly.txt":
display: "Pizzly identified fusion TXT report"
"**/qualimap/qualimapReport.html":
Expand Down
1 change: 1 addition & 0 deletions workflows/rnafusion.nf
Original file line number Diff line number Diff line change
Expand Up @@ -290,6 +290,7 @@ workflow RNAFUSION {
ch_multiqc_files = ch_multiqc_files.mix(STARFUSION_WORKFLOW.out.star_stats.collect{it[1]}.ifEmpty([]))
ch_multiqc_files = ch_multiqc_files.mix(QC_WORKFLOW.out.rnaseq_metrics.collect{it[1]}.ifEmpty([]))
ch_multiqc_files = ch_multiqc_files.mix(QC_WORKFLOW.out.duplicate_metrics.collect{it[1]}.ifEmpty([]))
ch_multiqc_files = ch_multiqc_files.mix(QC_WORKFLOW.out.insertsize_metrics.collect{it[1]}.ifEmpty([]))



Expand Down

0 comments on commit 6a18471

Please sign in to comment.