Skip to content

Commit

Permalink
Merge branch 'dev' into fix_fusionreport_download
Browse files Browse the repository at this point in the history
  • Loading branch information
rannick committed Aug 30, 2023
2 parents bc10b08 + 49fd35a commit eb81ba0
Show file tree
Hide file tree
Showing 5 changed files with 15 additions and 25 deletions.
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
### Changed

- Use institutional configs by default [#381](https://github.com/nf-core/rnafusion/pull/381)
- Remove redundant indexing in starfusion and qc workflows [#387](https://github.com/nf-core/rnafusion/pull/387)
- Output bai files in same directory as bam files [#387](https://github.com/nf-core/rnafusion/pull/387)

### Fixed

Expand Down
13 changes: 2 additions & 11 deletions conf/modules.config
Original file line number Diff line number Diff line change
Expand Up @@ -187,24 +187,15 @@ process {

withName: SAMTOOLS_INDEX_FOR_ARRIBA {
publishDir = [
path: { "${params.outdir}/samtools_index_for_arriba" },
mode: params.publish_dir_mode,
saveAs: { filename -> filename.equals('versions.yml') ? null : filename }
]
}

withName: SAMTOOLS_INDEX_FOR_QC {
ext.when = { !params.skip_qc && !params.fusioninspector_only && (params.starfusion || params.all)}
publishDir = [
path: { "${params.outdir}/samtools_index_for_qc" },
path: { "${params.outdir}/star_for_arriba" },
mode: params.publish_dir_mode,
saveAs: { filename -> filename.equals('versions.yml') ? null : filename }
]
}

withName: SAMTOOLS_INDEX_FOR_STARFUSION {
publishDir = [
path: { "${params.outdir}/samtools_index_for_starfusion" },
path: { "${params.outdir}/star_for_starfusion" },
mode: params.publish_dir_mode,
saveAs: { filename -> filename.equals('versions.yml') ? null : filename }
]
Expand Down
15 changes: 5 additions & 10 deletions subworkflows/local/qc_workflow.nf
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,13 @@
//

include { QUALIMAP_RNASEQ } from '../../modules/nf-core/qualimap/rnaseq/main'
include { SAMTOOLS_INDEX as SAMTOOLS_INDEX_FOR_QC } from '../../modules/nf-core/samtools/index/main'
include { PICARD_COLLECTRNASEQMETRICS } from '../../modules/local/picard/collectrnaseqmetrics/main'
include { PICARD_MARKDUPLICATES } from '../../modules/nf-core/picard/markduplicates/main'

workflow QC_WORKFLOW {
take:
bam_sorted
ch_bam_sorted
ch_bam_sorted_indexed
ch_chrgtf
ch_refflat
ch_fasta
Expand All @@ -19,20 +19,15 @@ workflow QC_WORKFLOW {
main:
ch_versions = Channel.empty()

QUALIMAP_RNASEQ(bam_sorted, ch_chrgtf)
QUALIMAP_RNASEQ(ch_bam_sorted, ch_chrgtf)
ch_versions = ch_versions.mix(QUALIMAP_RNASEQ.out.versions)
ch_qualimap_qc = Channel.empty().mix(QUALIMAP_RNASEQ.out.results)

SAMTOOLS_INDEX_FOR_QC(bam_sorted)
ch_versions = ch_versions.mix(SAMTOOLS_INDEX_FOR_QC.out.versions)

bam_indexed = bam_sorted.join(SAMTOOLS_INDEX_FOR_QC.out.bai)

PICARD_COLLECTRNASEQMETRICS(bam_indexed, ch_refflat, ch_rrna_interval)
PICARD_COLLECTRNASEQMETRICS(ch_bam_sorted_indexed, ch_refflat, ch_rrna_interval)
ch_versions = ch_versions.mix(PICARD_COLLECTRNASEQMETRICS.out.versions)
ch_rnaseq_metrics = Channel.empty().mix(PICARD_COLLECTRNASEQMETRICS.out.metrics)

PICARD_MARKDUPLICATES(bam_sorted, ch_fasta, ch_fai)
PICARD_MARKDUPLICATES(ch_bam_sorted, ch_fasta, ch_fai)
ch_versions = ch_versions.mix(PICARD_MARKDUPLICATES.out.versions)
ch_duplicate_metrics = Channel.empty().mix(PICARD_MARKDUPLICATES.out.metrics)

Expand Down
5 changes: 3 additions & 2 deletions subworkflows/local/starfusion_workflow.nf
Original file line number Diff line number Diff line change
Expand Up @@ -51,8 +51,9 @@ workflow STARFUSION_WORKFLOW {
emit:
fusions = ch_starfusion_fusions
star_stats = ch_star_stats
bam_sorted = ch_align
ch_bam_sorted = ch_align.ifEmpty([[],[]])
ch_bam_sorted_indexed = bam_sorted_indexed.ifEmpty([[],[],[]])
versions = ch_versions.ifEmpty(null)
ch_bam_sorted_indexed = bam_sorted_indexed.ifEmpty(null)

}

5 changes: 3 additions & 2 deletions workflows/rnafusion.nf
Original file line number Diff line number Diff line change
Expand Up @@ -220,7 +220,7 @@ workflow RNAFUSION {

//Run stringtie
STRINGTIE_WORKFLOW (
STARFUSION_WORKFLOW.out.bam_sorted,
STARFUSION_WORKFLOW.out.ch_bam_sorted,
ch_chrgtf
)
ch_versions = ch_versions.mix(STRINGTIE_WORKFLOW.out.versions.first().ifEmpty(null))
Expand Down Expand Up @@ -255,7 +255,8 @@ workflow RNAFUSION {

//QC
QC_WORKFLOW (
STARFUSION_WORKFLOW.out.bam_sorted,
STARFUSION_WORKFLOW.out.ch_bam_sorted,
STARFUSION_WORKFLOW.out.ch_bam_sorted_indexed,
ch_chrgtf,
ch_refflat,
ch_fasta,
Expand Down

0 comments on commit eb81ba0

Please sign in to comment.