Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add sex check #453

Merged
merged 5 commits into from
Dec 18, 2023
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
- New parameters to skip fastqc and haplocheck (`--skip_fastqc` and `--skip_haplocheck`) [#438](https://github.com/nf-core/raredisease/pull/438)
- CNVnator for copy number variant calling [#438](https://github.com/nf-core/raredisease/pull/434)
- A new parameter `svdb_query_bedpedbs` to provide bedpe files as databases for SVDB query [#449](https://github.com/nf-core/raredisease/pull/449)
- ngsbits samplegender to check sex
Lucpen marked this conversation as resolved.
Show resolved Hide resolved

### `Changed`

Expand Down
2 changes: 2 additions & 0 deletions CITATIONS.md
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,8 @@

> Pedersen BS, Quinlan AR. Mosdepth: quick coverage calculation for genomes and exomes. Hancock J, ed. Bioinformatics. 2018;34(5):867-868. doi:10.1093/bioinformatics/btx699

- [ngs-bits-samplegender](https://github.com/imgag/ngs-bits/tree/master)

- [MultiQC](https://pubmed.ncbi.nlm.nih.gov/27312411/)

> Ewels P, Magnusson M, Lundin S, Käller M. MultiQC: summarize analysis results for multiple tools and samples in a single report. Bioinformatics. 2016 Oct 1;32(19):3047-8. doi: 10.1093/bioinformatics/btw354. Epub 2016 Jun 16. PubMed PMID: 27312411; PubMed Central PMCID: PMC5039924.
Expand Down
10 changes: 10 additions & 0 deletions conf/modules/qc_bam.config
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,16 @@ process {
ext.prefix = { "${meta.id}_mosdepth" }
}

withName: '.*QC_BAM:NGSBITS_SAMPLEGENDER' {
// NGSBITS_SAMPLEGENDER needs a chrX and chrY in order to run so we skip it for the two test profiles
ext.when = { !(workflow.profile.tokenize(',').intersect(['test', 'test_one_sample', 'test_sentieon']).size() >= 1) || workflow.stubRun }
Lucpen marked this conversation as resolved.
Show resolved Hide resolved
publishDir = [
path: { "${params.outdir}/ngsbits_samplegender" },
mode: params.publish_dir_mode,
saveAs: { filename -> filename.equals('versions.yml') ? null : filename }
]
}

withName: '.*QC_BAM:PICARD_COLLECTWGSMETRICS' {
ext.when = { params.analysis_type.equals("wgs") && params.aligner.equals("bwamem2") }
ext.prefix = { "${meta.id}_wgsmetrics" }
Expand Down
5 changes: 5 additions & 0 deletions modules.json
Original file line number Diff line number Diff line change
Expand Up @@ -277,6 +277,11 @@
"git_sha": "a6e11ac655e744f7ebc724be669dd568ffdc0e80",
"installed_by": ["modules"]
},
"ngsbits/samplegender": {
"branch": "master",
"git_sha": "3f5420aa22e00bd030a2556dfdffc9e164ec0ec5",
"installed_by": ["modules"]
},
"peddy": {
"branch": "master",
"git_sha": "911696ea0b62df80e900ef244d7867d177971f73",
Expand Down
7 changes: 7 additions & 0 deletions modules/nf-core/ngsbits/samplegender/environment.yml

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

51 changes: 51 additions & 0 deletions modules/nf-core/ngsbits/samplegender/main.nf

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

69 changes: 69 additions & 0 deletions modules/nf-core/ngsbits/samplegender/meta.yml

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

6 changes: 6 additions & 0 deletions subworkflows/local/qc_bam.nf
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ include { PICARD_COLLECTWGSMETRICS as PICARD_COLLECTWGSMETRICS } from '../../m
include { PICARD_COLLECTWGSMETRICS as PICARD_COLLECTWGSMETRICS_Y } from '../../modules/nf-core/picard/collectwgsmetrics/main'
include { SENTIEON_WGSMETRICS } from '../../modules/nf-core/sentieon/wgsmetrics/main'
include { SENTIEON_WGSMETRICS as SENTIEON_WGSMETRICS_Y } from '../../modules/nf-core/sentieon/wgsmetrics/main'
include { NGSBITS_SAMPLEGENDER } from '../../modules/nf-core/ngsbits/samplegender/main'

workflow QC_BAM {

Expand Down Expand Up @@ -59,6 +60,9 @@ workflow QC_BAM {
SENTIEON_WGSMETRICS ( ch_bam_bai, ch_genome_fasta, ch_genome_fai, ch_intervals_wgs.map{ interval -> [[:], interval]} )
SENTIEON_WGSMETRICS_Y ( ch_bam_bai, ch_genome_fasta, ch_genome_fai, ch_intervals_y.map{ interval -> [[:], interval]} )

// Check sex
NGSBITS_SAMPLEGENDER(ch_bam_bai, ch_genome_fasta, ch_genome_fai, "xy")
Lucpen marked this conversation as resolved.
Show resolved Hide resolved

ch_cov = Channel.empty().mix(PICARD_COLLECTWGSMETRICS.out.metrics, SENTIEON_WGSMETRICS.out.wgs_metrics)
ch_cov_y = Channel.empty().mix(PICARD_COLLECTWGSMETRICS_Y.out.metrics, SENTIEON_WGSMETRICS_Y.out.wgs_metrics)

Expand All @@ -67,6 +71,7 @@ workflow QC_BAM {
ch_versions = ch_versions.mix(TIDDIT_COV.out.versions.first())
ch_versions = ch_versions.mix(UCSC_WIGTOBIGWIG.out.versions.first())
ch_versions = ch_versions.mix(MOSDEPTH.out.versions.first())
ch_versions = ch_versions.mix(NGSBITS_SAMPLEGENDER.out.versions.first())
ch_versions = ch_versions.mix(PICARD_COLLECTWGSMETRICS.out.versions.first(), SENTIEON_WGSMETRICS.out.versions.first())
ch_versions = ch_versions.mix(PICARD_COLLECTWGSMETRICS_Y.out.versions.first(), SENTIEON_WGSMETRICS_Y.out.versions.first())

Expand All @@ -78,6 +83,7 @@ workflow QC_BAM {
bigwig = UCSC_WIGTOBIGWIG.out.bw // channel: [ val(meta), path(bw) ]
d4 = MOSDEPTH.out.per_base_d4 // channel: [ val(meta), path(d4) ]
global_dist = MOSDEPTH.out.global_txt // channel: [ val(meta), path(txt) ]
sex_check = NGSBITS_SAMPLEGENDER.out.tsv // channel: [val(meta), path(tsv) ]
cov = ch_cov // channel: [ val(meta), path(metrics) ]
cov_y = ch_cov_y // channel: [ val(meta), path(metrics) ]
versions = ch_versions // channel: [ path(versions.yml) ]
Expand Down
Loading