Skip to content

Commit

Permalink
Merge pull request #88 from LouisLeNezet/multiqc
Browse files Browse the repository at this point in the history
Multiqc
  • Loading branch information
LouisLeNezet authored Jun 17, 2024
2 parents 150cb9e + 8964fe2 commit 20956e6
Show file tree
Hide file tree
Showing 39 changed files with 1,013 additions and 343 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ Initial release of nf-core/phaseimpute, created with the [nf-core](https://nf-co
- [#84](https://github.com/nf-core/phaseimpute/pull/84) - Change depth computation to use SAMTOOLS_DEPTH and make separation by chromosome only if regions are specified.
- [#85](https://github.com/nf-core/phaseimpute/pull/85) - Use external params in individual tests for tools.
- [#86](https://github.com/nf-core/phaseimpute/pull/86) - Move `bcftools_convert` to `vcf_sites_extract_bcftools`.
- [#88](https://github.com/nf-core/phaseimpute/pull/88) - Improve multiqc report with more information.

### `Fixed`

Expand Down
4 changes: 4 additions & 0 deletions assets/multiqc_config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,10 @@ report_section_order:
"nf-core-phaseimpute-summary":
order: -1002

top_modules:
- samtools
- bcftools

export_plots: true

disable_version_detection: true
4 changes: 2 additions & 2 deletions assets/schema_input.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@
"properties": {
"sample": {
"type": "string",
"pattern": "^\\S+$",
"errorMessage": "Sample name must be provided and cannot contain spaces",
"pattern": "^[a-zA-Z0-9_]+$",
"errorMessage": "Sample name must be provided and cannot contain spaces nor special character '.' .",
"meta": ["id"]
},
"file": {
Expand Down
47 changes: 46 additions & 1 deletion conf/modules.config
Original file line number Diff line number Diff line change
Expand Up @@ -18,12 +18,57 @@ process {
saveAs: { filename -> filename.equals('versions.yml') ? null : filename }
]

withName: 'MULTIQC' {
withName: 'NFCORE_PHASEIMPUTE:PHASEIMPUTE:MULTIQC' {
ext.args = { params.multiqc_title ? "--title \"$params.multiqc_title\"" : '' }
publishDir = [
path: { "${params.outdir}/multiqc" },
mode: params.publish_dir_mode,
saveAs: { filename -> filename.equals('versions.yml') ? null : filename }
]
}

// Stats
// Simulation
// Coverage process
withName: 'NFCORE_PHASEIMPUTE:PHASEIMPUTE:SAMTOOLS_COVERAGE_TRT' {
ext.prefix = { "${meta.id}.A-truth" }
publishDir = [ enabled: false ]
}
withName: 'NFCORE_PHASEIMPUTE:PHASEIMPUTE:SAMTOOLS_COVERAGE_SIM' {
ext.prefix = { "${meta.id}.B-sim" }
publishDir = [ enabled: false ]
}

// VCF
// PANEL
withName: 'NFCORE_PHASEIMPUTE:PHASEIMPUTE:BCFTOOLS_STATS_PANEL' {
ext.prefix = { "${meta.id}.panel" }
publishDir = [
path: { "${params.outdir}/prep_panel/stats/" },
mode: params.publish_dir_mode,
enabled: true,
saveAs: { filename -> filename.equals('versions.yml') ? null : filename }
]
}

// TRUTH
withName: 'NFCORE_PHASEIMPUTE:PHASEIMPUTE:BCFTOOLS_STATS_TRUTH' {
ext.prefix = { "${meta.id}.truth" }
publishDir = [
path: { "${params.outdir}/validation/stats" },
mode: params.publish_dir_mode,
enabled: true,
saveAs: { filename -> filename.equals('versions.yml') ? null : filename }
]
}
// IMPUTE
withName: 'NFCORE_PHASEIMPUTE:PHASEIMPUTE:BCFTOOLS_STATS_TOOLS' {
ext.prefix = { "${meta.id}.${meta.tools}" }
publishDir = [
path: { "${params.outdir}/imputation/stats" },
mode: params.publish_dir_mode,
enabled: true,
saveAs: { filename -> filename.equals('versions.yml') ? null : filename }
]
}
}
6 changes: 3 additions & 3 deletions conf/steps/imputation_glimpse1.config
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ process {
"-Aim",
"-C alleles"
].join(' ')
ext.prefix = { "${meta.id}.call" }
ext.prefix = { "${meta.id}" }
}

withName: 'NFCORE_PHASEIMPUTE:PHASEIMPUTE:VCF_IMPUTE_GLIMPSE1:BAM_GL_BCFTOOLS:BCFTOOLS_ANNOTATE' {
Expand Down Expand Up @@ -74,16 +74,16 @@ process {
publishDir = [
path: { "${params.outdir}/imputation/glimpse1/concat" },
mode: params.publish_dir_mode,
saveAs: { filename -> filename.equals('versions.yml') ? null : filename }
]
}

withName: 'NFCORE_PHASEIMPUTE:PHASEIMPUTE:CONCAT_GLIMPSE1:BCFTOOLS_CONCAT' {
ext.args = ["--ligate", "--output-type z"].join(' ')
ext.prefix = { "${meta.id}_glimpse1" }
ext.prefix = { "${meta.id}.glimpse1" }
}

withName: 'NFCORE_PHASEIMPUTE:PHASEIMPUTE:CONCAT_GLIMPSE1:BCFTOOLS_INDEX' {
ext.args = "--tbi"
ext.prefix = { "${meta.id}_glimpse1" }
}
}
8 changes: 4 additions & 4 deletions conf/steps/imputation_glimpse2.config
Original file line number Diff line number Diff line change
Expand Up @@ -20,12 +20,12 @@ process {
withName: 'NFCORE_PHASEIMPUTE:PHASEIMPUTE:VCF_IMPUTE_GLIMPSE2:GLIMPSE2_PHASE' {
ext.prefix = { "${meta.id}_${meta.chunk.replace(':','_')}_glimpse2" }
ext.args = "--keep-monomorphic-ref-sites"
ext.suffix = "vcf.gz"
ext.suffix = "bcf"
publishDir = [ enabled: false ]
}

withName: 'NFCORE_PHASEIMPUTE:PHASEIMPUTE:VCF_IMPUTE_GLIMPSE2:BCFTOOLS_INDEX_1' {
ext.args = "--tbi"
ext.args = "--csi"
publishDir = [ enabled: false ]
}

Expand All @@ -45,17 +45,17 @@ process {
publishDir = [
path: { "${params.outdir}/imputation/glimpse2/concat" },
mode: params.publish_dir_mode,
saveAs: { filename -> filename.equals('versions.yml') ? null : filename }
]
}

withName: 'NFCORE_PHASEIMPUTE:PHASEIMPUTE:CONCAT_GLIMPSE2:BCFTOOLS_CONCAT' {
ext.args = ["--ligate", "--output-type z"].join(' ')
ext.prefix = { "${meta.id}_glimpse2" }
ext.prefix = { "${meta.id}.glimpse2" }
}

withName: 'NFCORE_PHASEIMPUTE:PHASEIMPUTE:CONCAT_GLIMPSE2:BCFTOOLS_INDEX' {
ext.args = "--tbi"
ext.prefix = { "${meta.id}_glimpse2" }
}

}
4 changes: 2 additions & 2 deletions conf/steps/imputation_quilt.config
Original file line number Diff line number Diff line change
Expand Up @@ -48,17 +48,17 @@ process {
publishDir = [
path: { "${params.outdir}/imputation/quilt/concat" },
mode: params.publish_dir_mode,
saveAs: { filename -> filename.equals('versions.yml') ? null : filename }
]
}

withName: 'NFCORE_PHASEIMPUTE:PHASEIMPUTE:CONCAT_QUILT:BCFTOOLS_CONCAT' {
ext.args = ["--ligate", "--output-type z",].join(' ')
ext.prefix = { "${meta.id}_quilt" }
ext.prefix = { "${meta.id}.quilt" }
}

withName: 'NFCORE_PHASEIMPUTE:PHASEIMPUTE:CONCAT_QUILT:BCFTOOLS_INDEX' {
ext.args = "--tbi"
ext.prefix = { "${meta.id}_quilt" }
}

}
6 changes: 3 additions & 3 deletions conf/steps/imputation_stitch.config
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ process {
}

withName: 'NFCORE_PHASEIMPUTE:PHASEIMPUTE:BAM_IMPUTE_STITCH:STITCH' {
ext.prefix = { "${meta.id}_stitch" }
ext.prefix = { "${meta.id}.stitch" }
}

withName: 'NFCORE_PHASEIMPUTE:PHASEIMPUTE:BAM_IMPUTE_STITCH:BCFTOOLS_INDEX' {
Expand All @@ -44,23 +44,23 @@ process {

withName: 'NFCORE_PHASEIMPUTE:PHASEIMPUTE:CONCAT_STITCH:BCFTOOLS_CONCAT' {
ext.args = ["--ligate", "--output-type z"].join(' ')
ext.prefix = { "${meta.id}_stitch" }
}

withName: 'NFCORE_PHASEIMPUTE:PHASEIMPUTE:CONCAT_STITCH:BCFTOOLS_INDEX' {
ext.args = "--tbi"
ext.prefix = { "${meta.id}_stitch" }
}

withName: 'NFCORE_PHASEIMPUTE:PHASEIMPUTE:VCF_SAMPLES_BCFTOOLS:.*' {
publishDir = [
path: { "${params.outdir}/imputation/stitch/concat" },
mode: params.publish_dir_mode,
saveAs: { filename -> filename.equals('versions.yml') ? null : filename }
]
}

withName: 'NFCORE_PHASEIMPUTE:PHASEIMPUTE:VCF_SAMPLES_BCFTOOLS:BCFTOOLS_PLUGINSPLIT' {
ext.args = "-Oz"
ext.suffix = ".stitch"
}

withName: 'NFCORE_PHASEIMPUTE:PHASEIMPUTE:VCF_SAMPLES_BCFTOOLS:BCFTOOLS_INDEX' {
Expand Down
26 changes: 26 additions & 0 deletions conf/steps/panel_prep.config
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ process {
publishDir = [
path: { "${params.outdir}/prep_panel/" },
mode: params.publish_dir_mode,
saveAs: { filename -> filename.equals('versions.yml') ? null : filename },
enabled: false
]
tag = {"${meta.id} ${meta.chr}"}
Expand Down Expand Up @@ -55,6 +56,7 @@ process {
ext.prefix = { "${meta.id}_${meta.chr}_biallelic_snps" }
publishDir = [
path: { "${params.outdir}/prep_panel/normalized" },
saveAs: { filename -> filename.equals('versions.yml') ? null : filename },
enabled: true
]
}
Expand All @@ -63,6 +65,7 @@ process {
ext.args = "--tbi"
publishDir = [
path: { "${params.outdir}/prep_panel/normalized" },
saveAs: { filename -> filename.equals('versions.yml') ? null : filename },
enabled: true
]
}
Expand All @@ -73,6 +76,7 @@ process {
ext.prefix = { "${meta.id}_${meta.chr}_biallelic_removed_samples" }
publishDir = [
path: { "${params.outdir}/prep_panel/normalized" },
saveAs: { filename -> filename.equals('versions.yml') ? null : filename },
enabled: true
]
}
Expand All @@ -81,6 +85,7 @@ process {
ext.args = "--tbi"
publishDir = [
path: { "${params.outdir}/prep_panel/normalized" },
saveAs: { filename -> filename.equals('versions.yml') ? null : filename },
enabled: true
]
}
Expand All @@ -89,6 +94,7 @@ process {
ext.prefix = { "${meta.id}_${meta.chr}" }
publishDir = [
path: { "${params.outdir}/prep_panel/compute_freq" },
saveAs: { filename -> filename.equals('versions.yml') ? null : filename },
enabled: true
]
}
Expand All @@ -106,6 +112,7 @@ process {
publishDir = [
path: { "${params.outdir}/prep_panel/phasing" },
mode: params.publish_dir_mode,
saveAs: { filename -> filename.equals('versions.yml') ? null : filename },
enabled: false
]
tag = {"${meta.id} ${meta.chr}"}
Expand All @@ -131,6 +138,7 @@ process {
publishDir = [
path: { "${params.outdir}/prep_panel/haplegend/" },
mode: params.publish_dir_mode,
saveAs: { filename -> filename.equals('versions.yml') ? null : filename },
enabled: true
]
}
Expand All @@ -148,6 +156,7 @@ process {
publishDir = [
path: { "${params.outdir}/prep_panel/sites/vcf/" },
mode: params.publish_dir_mode,
saveAs: { filename -> filename.equals('versions.yml') ? null : filename },
enabled: true
]
}
Expand All @@ -157,6 +166,7 @@ process {
publishDir = [
path: { "${params.outdir}/prep_panel/sites/vcf/" },
mode: params.publish_dir_mode,
saveAs: { filename -> filename.equals('versions.yml') ? null : filename },
enabled: true
]
}
Expand All @@ -171,13 +181,20 @@ process {
ext.args = "'{ gsub(\",\", \"\\t\") ; key = \$1 FS \$2 } !seen[key]++'" // Remove duplicates
ext.prefix = { "${meta.id}_${meta.chr}_posfile_stitch" }
ext.suffix = "txt"
publishDir = [
path: { "${params.outdir}/prep_panel/posfile/" },
mode: params.publish_dir_mode,
saveAs: { filename -> filename.equals('versions.yml') ? null : filename },
enabled: true
]
}

withName: 'NFCORE_PHASEIMPUTE:PHASEIMPUTE:VCF_SITES_EXTRACT_BCFTOOLS:TABIX_BGZIP' {
ext.prefix = { "${meta.id}_${meta.chr}_glimpse1_sites_tsv" }
publishDir = [
path: { "${params.outdir}/prep_panel/sites/tsv/" },
mode: params.publish_dir_mode,
saveAs: { filename -> filename.equals('versions.yml') ? null : filename },
enabled: true
]
}
Expand All @@ -192,6 +209,7 @@ process {
publishDir = [
path: { "${params.outdir}/prep_panel/sites/tsv/" },
mode: params.publish_dir_mode,
saveAs: { filename -> filename.equals('versions.yml') ? null : filename },
enabled: true
]
}
Expand All @@ -201,6 +219,10 @@ process {
publishDir = [ enabled: false ]
}

withName: 'NFCORE_PHASEIMPUTE:PHASEIMPUTE:CONCAT_PANEL:BCFTOOLS_CONCAT' {
ext.prefix = { "${meta.id}.panel" }
}

withName: 'NFCORE_PHASEIMPUTE:PHASEIMPUTE:CONCAT_PANEL:BCFTOOLS_INDEX' {
ext.args = "--tbi"
}
Expand All @@ -210,6 +232,7 @@ process {
publishDir = [
path: { "${params.outdir}/prep_panel/chunks/" },
mode: params.publish_dir_mode,
saveAs: { filename -> filename.equals('versions.yml') ? null : filename },
enabled: true
]
tag = {"${meta.id} ${meta.chr}"}
Expand All @@ -220,6 +243,7 @@ process {
publishDir = [
path: { "${params.outdir}/prep_panel/chunks/glimpse1/" },
mode: params.publish_dir_mode,
saveAs: { filename -> filename.equals('versions.yml') ? null : filename },
enabled: true
]
}
Expand All @@ -229,6 +253,7 @@ process {
publishDir = [
path: { "${params.outdir}/prep_panel/chunks/glimpse2/" },
mode: params.publish_dir_mode,
saveAs: { filename -> filename.equals('versions.yml') ? null : filename },
enabled: true
]
}
Expand All @@ -238,6 +263,7 @@ process {
publishDir = [
path: { "${params.outdir}/prep_panel/chunks/glimpse2/" },
mode: params.publish_dir_mode,
saveAs: { filename -> filename.equals('versions.yml') ? null : filename },
enabled: true
]
}
Expand Down
10 changes: 0 additions & 10 deletions conf/steps/simulation.config
Original file line number Diff line number Diff line change
Expand Up @@ -57,14 +57,4 @@ process {
ext.args = ""
tag = {"${meta.id}"}
}

// Coverage process
withName: 'NFCORE_PHASEIMPUTE:PHASEIMPUTE:SAMTOOLS_COVERAGE_TRT' {
ext.prefix = { "${meta.id}_truth" }
publishDir = [ enabled: false ]
}
withName: 'NFCORE_PHASEIMPUTE:PHASEIMPUTE:SAMTOOLS_COVERAGE_SIM' {
ext.prefix = { "${meta.id}" }
publishDir = [ enabled: false ]
}
}
4 changes: 2 additions & 2 deletions conf/steps/validation.config
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ process {
"-Aim",
"-C alleles"
].join(' ')
ext.prefix = { "${meta.id}_truth.call" }
ext.prefix = { "${meta.id}_truth" }
}

withName: 'NFCORE_PHASEIMPUTE:PHASEIMPUTE:GL_TRUTH:BCFTOOLS_ANNOTATE' {
Expand All @@ -43,7 +43,6 @@ process {

// Concatenate the truth set
withName: 'NFCORE_PHASEIMPUTE:PHASEIMPUTE:CONCAT_TRUTH:.*' {
ext.prefix = { "${meta.id}_truth_concat" }
publishDir = [
path: { "${params.outdir}/validation/concat" },
mode: params.publish_dir_mode,
Expand All @@ -53,6 +52,7 @@ process {

withName: 'NFCORE_PHASEIMPUTE:PHASEIMPUTE:CONCAT_TRUTH:BCFTOOLS_CONCAT' {
ext.args = ["--ligate", "--output-type z",].join(' ')
ext.prefix = { "${meta.id}.A-truth" }
}

withName: 'NFCORE_PHASEIMPUTE:PHASEIMPUTE:CONCAT_TRUTH:BCFTOOLS_INDEX' {
Expand Down
Loading

0 comments on commit 20956e6

Please sign in to comment.