Skip to content

Commit

Permalink
Merge branch 'develop' into enhancement/multiqc
Browse files Browse the repository at this point in the history
  • Loading branch information
anoronh4 committed Jun 2, 2023
2 parents ef737f6 + f2a8755 commit e8ce44d
Show file tree
Hide file tree
Showing 8 changed files with 128 additions and 33 deletions.
6 changes: 3 additions & 3 deletions assets/pipeline_multiqc_config.yml
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
report_comment: >
This report has been generated by the <a href="https://github.com/anoronh4/forte" target="_blank">anoronh4/forte</a>
This report has been generated by the <a href="https://github.com/mskcc/forte" target="_blank">mskcc/forte</a>
analysis pipeline.
report_section_order:
"anoronh4-forte-methods-description":
"mskcc-forte-methods-description":
order: -1000
software_versions:
order: -1001
"anoronh4-forte-summary":
"mskcc-forte-summary":
order: -1002

export_plots: true
Expand Down
40 changes: 39 additions & 1 deletion conf/modules.config
Original file line number Diff line number Diff line change
Expand Up @@ -35,14 +35,52 @@ process {
]
}

withName: '.*:QC:MULTIQC' {
withName: '.*:QC_DEDUP:MULTIQC_COLLECT' {
ext.args = {
[
"--cl-config \"subtitle: 'Deduplicated Bam'\"",
"-n dedupbam_multiqc_report"
].join(" ")
}
publishDir = [
path: { "${params.outdir}/multiqc" },
mode: params.publish_dir_mode,
saveAs: { filename -> filename.equals('versions.yml') ? null : filename }
]
}

withName: '.*:QC_DUP:MULTIQC_COLLECT' {
ext.args = {
[
"--cl-config \"subtitle: 'Non-deduplicated Bam'\"",
"-n dupbam_multiqc_report"
].join(" ")
}
publishDir = [
path: { "${params.outdir}/multiqc" },
mode: params.publish_dir_mode,
saveAs: { filename -> filename.equals('versions.yml') ? null : filename }
]
}

withName: '.*:QC_DEDUP:MULTIQC' {
ext.args = {
[
"--cl-config \"subtitle: 'Deduplicated Bam'\"",
"-n dedupbam_multiqc_report"
].join(" ")
}
}

withName: '.*:QC_DUP:MULTIQC' {
ext.args = {
[
"--cl-config \"subtitle: 'Non-deduplicated Bam'\"",
"-n dupbam_multiqc_report"
].join(" ")
}
}

withName: SAMPLESHEET_CHECK {
publishDir = [
path: { "${params.outdir}/pipeline_info" },
Expand Down
3 changes: 2 additions & 1 deletion modules.json
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,8 @@
"multiqc": {
"branch": "master",
"git_sha": "ee80d14721e76e2e079103b8dcd5d57129e584ba",
"installed_by": ["modules"]
"installed_by": ["modules"],
"patch": "modules/nf-core/multiqc/multiqc.diff"
},
"picard/collecthsmetrics": {
"branch": "master",
Expand Down
2 changes: 1 addition & 1 deletion modules/nf-core/multiqc/main.nf

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

5 changes: 5 additions & 0 deletions modules/nf-core/multiqc/meta.yml

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

30 changes: 30 additions & 0 deletions modules/nf-core/multiqc/multiqc.diff

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

34 changes: 19 additions & 15 deletions subworkflows/local/qc.nf
Original file line number Diff line number Diff line change
Expand Up @@ -2,23 +2,24 @@ ch_multiqc_config = Channel.fromPath("$projectDir/assets/multiqc_config

include { PICARD_COLLECTRNASEQMETRICS } from '../../modules/nf-core/picard/collectrnaseqmetrics/main'
include { PICARD_COLLECTHSMETRICS } from '../../modules/nf-core/picard/collecthsmetrics/main'
include { MULTIQC } from '../../modules/nf-core/multiqc/main'
include {
MULTIQC ;
MULTIQC as MULTIQC_COLLECT
} from '../../modules/nf-core/multiqc/main'
include { BAM_RSEQC } from '../nf-core/bam_rseqc/main'

workflow QC {

take:
bam
bai
multiqc_files
refflat
rrna_intervals
rseqc_bed
fai
dict
baits
fastp_json
htseq_counts
star_log_final

main:
fasta = params.fasta
Expand Down Expand Up @@ -55,11 +56,9 @@ workflow QC {
dict.map{ dict -> [[:],dict]}
)

multiqc_ch = PICARD_COLLECTRNASEQMETRICS.out.metrics
.mix(fastp_json)
<<<<<<< HEAD
.mix(star_log_final)
.mix(htseq_counts)
multiqc_files = multiqc_files
.mix(PICARD_COLLECTRNASEQMETRICS.out.metrics)
.mix(PICARD_COLLECTHSMETRICS.out.metrics)
.mix(BAM_RSEQC.out.bamstat_txt)
.mix(BAM_RSEQC.out.innerdistance_freq)
.mix(BAM_RSEQC.out.inferexperiment_txt)
Expand All @@ -68,14 +67,19 @@ workflow QC {
.mix(BAM_RSEQC.out.readdistribution_txt)
.mix(BAM_RSEQC.out.readduplication_pos_xls)
.mix(BAM_RSEQC.out.tin_txt)
=======
.mix(PICARD_COLLECTHSMETRICS.out.metrics)
>>>>>>> develop
.map{meta, multiqc_files -> multiqc_files }
.collect()
.map{ meta, file ->
[meta.subMap(['sample']),file]
}

MULTIQC(
multiqc_ch,
multiqc_files.groupTuple(by:[0]),
ch_multiqc_config.collect().ifEmpty([]),
[],
[]
)

MULTIQC_COLLECT(
multiqc_files.map{meta, multiqc_files -> multiqc_files}.collect().map{[[:],it]},
ch_multiqc_config.collect().ifEmpty([]),
[],
[]
Expand Down
41 changes: 29 additions & 12 deletions workflows/forte.nf
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,10 @@ include { PREPROCESS_READS } from '../subworkflows/local/prepro
include { ALIGN_READS } from '../subworkflows/local/align_reads'
include { MERGE_READS } from '../subworkflows/local/merge_reads'
include { MULTIQC } from '../modules/nf-core/multiqc/main'
include { QC } from '../subworkflows/local/qc'
include {
QC as QC_DUP ;
QC as QC_DEDUP
} from '../subworkflows/local/qc'
include { QUANTIFICATION } from '../subworkflows/local/quantification'
include { FUSION } from '../subworkflows/local/fusion'

Expand Down Expand Up @@ -122,20 +125,34 @@ workflow FORTE {
)
ch_versions = ch_versions.mix(FUSION.out.ch_versions)

QC(
QC_DEDUP(
ALIGN_READS.out.bam,
ALIGN_READS.out.bai,
PREPROCESS_READS.out.fastp_json
.mix(QUANTIFICATION.out.htseq_counts)
.mix(ALIGN_READS.out.star_log_final),
PREPARE_REFERENCES.out.refflat,
PREPARE_REFERENCES.out.rrna_interval_list,
PREPARE_REFERENCES.out.rseqc_bed,
PREPARE_REFERENCES.out.fasta_fai,
PREPARE_REFERENCES.out.fasta_dict,
BAIT_INPUTS.out.baits
)
ch_versions = ch_versions.mix(QC_DEDUP.out.ch_versions)

QC_DUP(
ALIGN_READS.out.bam_withdup,
ALIGN_READS.out.bai_withdup,
PREPROCESS_READS.out.fastp_json
.mix(QUANTIFICATION.out.htseq_counts)
.mix(ALIGN_READS.out.star_log_final),
PREPARE_REFERENCES.out.refflat,
PREPARE_REFERENCES.out.rrna_interval_list,
PREPARE_REFERENCES.out.rseqc_bed,
PREPARE_REFERENCES.out.fasta_fai,
PREPARE_REFERENCES.out.fasta_dict,
BAIT_INPUTS.out.baits,
PREPROCESS_READS.out.fastp_json,
QUANTIFICATION.out.htseq_counts,
ALIGN_READS.out.star_log_final
PREPARE_REFERENCES.out.rseqc_bed,
PREPARE_REFERENCES.out.fasta_fai,
PREPARE_REFERENCES.out.fasta_dict,
BAIT_INPUTS.out.baits
)
ch_versions = ch_versions.mix(QC.out.ch_versions)

CUSTOM_DUMPSOFTWAREVERSIONS (
ch_versions.unique().collectFile(name: 'collated_versions.yml')
Expand All @@ -155,10 +172,10 @@ workflow FORTE {
ch_multiqc_files = ch_multiqc_files.mix(ch_methods_description.collectFile(name: 'methods_description_mqc.yaml'))
ch_multiqc_files = ch_multiqc_files.mix(CUSTOM_DUMPSOFTWAREVERSIONS.out.mqc_yml.collect())

ch_multiqc_files.collect()
ch_multiqc_files = ch_multiqc_files.collect().map{ files -> [[:], files] }

MULTIQC (
ch_multiqc_files.collect(),
ch_multiqc_files,
ch_multiqc_config.collect().ifEmpty([]),
ch_multiqc_custom_config.collect().ifEmpty([]),
ch_multiqc_logo.collect().ifEmpty([])
Expand Down

0 comments on commit e8ce44d

Please # to comment.