Skip to content

Commit

Permalink
Run a single phasing software instead of three in parallel (genomic-m…
Browse files Browse the repository at this point in the history
  • Loading branch information
fellen31 authored Apr 18, 2024
1 parent d293da8 commit 7fdb5fd
Show file tree
Hide file tree
Showing 15 changed files with 355 additions and 254 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ jobs:
matrix:
parameters:
- ""
- "--input assets/samplesheet_multisample_bam.csv --split_fastq 250 --parallel_snv 1"
- "--input assets/samplesheet_multisample_bam.csv --split_fastq 250 --parallel_snv 1 --phaser hiphase_sv"
NXF_VER:
- "23.04.0"
- "latest-everything"
Expand Down
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ Initial release of genomic-medicine-sweden/skierfe, created with the [nf-core](h

### `Added`

- Added a switch to choose phasing software [#83](https://github.com/genomic-medicine-sweden/skierfe/pull/83)
- Added SNV annotation subworkflow to test profile [#75](https://github.com/genomic-medicine-sweden/skierfe/pull/75)
- Refactored conditionally required parameters validation [#69](https://github.com/genomic-medicine-sweden/skierfe/pull/69)
- Added CNV workflow to test profile [#68](https://github.com/genomic-medicine-sweden/skierfe/pull/68)
Expand Down
61 changes: 50 additions & 11 deletions conf/modules/phasing.config
Original file line number Diff line number Diff line change
Expand Up @@ -26,56 +26,95 @@ process {

withName: '.*:PHASING:HIPHASE_SNV' {

ext.args = "--ignore-read-groups"
ext.args = { [
'--ignore-read-groups',
"--stats-file ${meta.id}.stats.tsv",
"--blocks-file ${meta.id}.blocks.tsv",
"--summary-file ${meta.id}.summary.tsv"
].join(' ') }

publishDir = [
path: { "${params.outdir}/phased_reads/hiphase/snv/${meta.id}" },
path: { "${params.outdir}/phasing/hiphase/snv/${meta.id}" },
mode: params.publish_dir_mode,
saveAs: { filename -> filename.equals('versions.yml') ? null : filename }
]
}

withName: '.*:PHASING:HIPHASE_SV' {

ext.args = "--ignore-read-groups --global-realignment-cputime 300"
ext.args = { [
'--ignore-read-groups',
"--stats-file ${meta.id}.stats.tsv",
"--blocks-file ${meta.id}.blocks.tsv",
"--summary-file ${meta.id}.summary.tsv"
].join(' ') }

publishDir = [
path: { "${params.outdir}/phased_reads/hiphase/sv/${meta.id}" },
path: { "${params.outdir}/phasing/hiphase/sv/${meta.id}" },
mode: params.publish_dir_mode,
saveAs: { filename -> filename.equals('versions.yml') ? null : filename }
]
}

withName: '.*:PHASING:WHATSHAP_PHASE' {
// Do not use phased variant calls for analysis - so don't publish
ext.args = '--ignore-read-groups --indels --distrust-genotypes'

ext.args = [
'--ignore-read-groups',
'--indels'
].join(' ')

publishDir = [
path: { "${params.outdir}/phasing/whatshap/phase/${meta.id}" },
mode: params.publish_dir_mode,
saveAs: { filename -> filename.equals('versions.yml') ? null : filename }
]
}

withName: '.*:PHASING:WHATSHAP_STATS' {

publishDir = [
path: { "${params.outdir}/phased_reads/whatshap/stats/${meta.id}" },
path: { "${params.outdir}/phasing/whatshap/stats/${meta.id}" },
mode: params.publish_dir_mode,
saveAs: { filename -> filename.equals('versions.yml') ? null : filename }
]
}

withName: '.*:PHASING:WHATSHAP_HAPLOTAG' {
// TODO: Should supplementary be tagged?
ext.args = '--ignore-read-groups --tag-supplementary'

ext.args = [
'--ignore-read-groups',
'--tag-supplementary'
].join(' ')

publishDir = [
path: { "${params.outdir}/phased_reads/whatshap/haplotag/${meta.id}" },
path: { "${params.outdir}/phasing/whatshap/haplotag/${meta.id}" },
mode: params.publish_dir_mode,
saveAs: { filename -> filename.equals('versions.yml') ? null : filename }
]
}

withName: '.*:PHASING:SAMTOOLS_INDEX_WHATSHAP' {

publishDir = [
path: { "${params.outdir}/phased_reads/whatshap/haplotag/${meta.id}" },
path: { "${params.outdir}/phasing/whatshap/haplotag/${meta.id}" },
mode: params.publish_dir_mode,
saveAs: { filename -> filename.equals('versions.yml') ? null : filename }
]
}

withName: '.*:PHASING:CRAMINO_PHASED' {

ext.args = [
'--karyotype',
'--phased'
].join(' ')

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

}

}
10 changes: 0 additions & 10 deletions conf/modules/qc.config
Original file line number Diff line number Diff line change
Expand Up @@ -27,16 +27,6 @@ process {
]
}

withName: '.*:QC_ALIGNED_READS:CRAMINO_PHASED' {
ext.args = '--karyotype --phased'
publishDir = [
path: { "${params.outdir}/qc_aligned_reads/cramino/phased/${meta.id}" },
mode: params.publish_dir_mode,
saveAs: { filename -> filename.equals('versions.yml') ? null : filename }
]

}

withName: '.*:QC_ALIGNED_READS:MOSDEPTH' {

// If pipeline is run with bed-file, then don't run wth '--by 500'
Expand Down
4 changes: 3 additions & 1 deletion docs/output.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,10 +23,12 @@ This document roughly describes the output structure produced by the pipeline. T
| multiqc | Directory for MultiQC reports and plots. |
| ├── multiqc_data | Directory containing data files generated by MultiQC. |
| └── multiqc_plots | Directory containing plots generated by MultiQC. |
| phased_reads | Directory for phased read analysis. |
| phasing | Directory for phasing analysis. |
| ├── cramino | Directory containing QC results for phased reads using the cramino tool. |
| ├── hiphase | Directory containing phased SNV and SV analysis results by Hiphase. |
| └── whatshap | Directory containing phased reads and statistics by WhatsHap. |
|  ├── haplotag | Directory containing haplotagging results. |
|  ├── phase | Directory containing phased variants. |
|  └── stats | Directory containing statistics related to phased reads. |
| pipeline_info | Directory containing information and reports about the pipeline. |
| qc_aligned_reads | Directory for quality control results of aligned reads. |
Expand Down
Loading

0 comments on commit 7fdb5fd

Please sign in to comment.