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

Pre release PR1 #664

Merged
merged 4 commits into from
Jan 15, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
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
57 changes: 36 additions & 21 deletions conf/test_full.config
Original file line number Diff line number Diff line change
Expand Up @@ -14,28 +14,43 @@ params {
config_profile_name = 'Full test profile'
config_profile_description = 'Full test dataset to check pipeline function'

// Input data for full size test
input = params.pipelines_testdata_base_path + 'raredisease/testdata/samplesheet_full.csv'
intervals_wgs = params.pipelines_testdata_base_path + 'raredisease/reference/test_full/genome.interval_list'
intervals_y = params.pipelines_testdata_base_path + 'raredisease/reference/test_full/genomeY.interval_list'
target_bed = params.pipelines_testdata_base_path + 'raredisease/reference/test_full/target.bed'
variant_catalog = params.pipelines_testdata_base_path + 'raredisease/reference/test_full/variant_catalog_hg38.json'

// Genome references
genome = 'GRCh38'
// reference params
igenomes_ignore = true
mito_name = 'MT'

// Skip annotation
skip_mt_annotation = true
skip_snv_annotation = true
skip_sv_annotation = true
}
// analysis params
skip_germlinecnvcaller = true
skip_peddy = true

process {
withName: 'MARKDUPLICATES' {
memory = { check_max( 90.GB * task.attempt, 'memory' ) }
}
withName: 'DEEPVARIANT' {
cpus = 24
memory = { check_max( 90.GB * task.attempt, 'memory' ) }
}
// Input data
input = params.pipelines_testdata_base_path + 'raredisease/testdata/samplesheet_trio.csv'

// Genome references
fasta = params.pipelines_testdata_base_path + 'raredisease/reference/reference.fasta'
fai = params.pipelines_testdata_base_path + 'raredisease/reference/reference.fasta.fai'
genome = 'GRCh37'
gnomad_af = params.pipelines_testdata_base_path + 'raredisease/reference/gnomad_reformated.tab.gz'
intervals_wgs = params.pipelines_testdata_base_path + 'raredisease/reference/target_wgs.interval_list'
intervals_y = params.pipelines_testdata_base_path + 'raredisease/reference/targetY.interval_list'
known_dbsnp = params.pipelines_testdata_base_path + 'raredisease/reference/dbsnp_-138-.vcf.gz'
ml_model = 'https://s3.amazonaws.com/sentieon-release/other/SentieonDNAscopeModel1.1.model'
mobile_element_references = params.pipelines_testdata_base_path + 'raredisease/reference/mobile_element_references.tsv'
mobile_element_svdb_annotations = params.pipelines_testdata_base_path + 'raredisease/reference/svdb_querydb_files.csv'
reduced_penetrance = params.pipelines_testdata_base_path + 'raredisease/reference/reduced_penetrance.tsv'
score_config_mt = params.pipelines_testdata_base_path + 'raredisease/reference/rank_model_snv.ini'
score_config_snv = params.pipelines_testdata_base_path + 'raredisease/reference/rank_model_snv.ini'
score_config_sv = params.pipelines_testdata_base_path + 'raredisease/reference/rank_model_sv.ini'
svdb_query_dbs = params.pipelines_testdata_base_path + 'raredisease/reference/svdb_querydb_files.csv'
target_bed = params.pipelines_testdata_base_path + 'raredisease/reference/target.bed'
variant_catalog = params.pipelines_testdata_base_path + 'raredisease/reference/variant_catalog.json'
vcfanno_lua = params.pipelines_testdata_base_path + 'raredisease/reference/vcfanno_functions.lua'
vcfanno_resources = params.pipelines_testdata_base_path + 'raredisease/reference/vcfanno_resources.txt'
vcfanno_toml = params.pipelines_testdata_base_path + 'raredisease/reference/vcfanno_config.toml'
variant_consequences_snv = params.pipelines_testdata_base_path + 'raredisease/reference/variant_consequences_v2.txt'
variant_consequences_sv = params.pipelines_testdata_base_path + 'raredisease/reference/variant_consequences_v2.txt'
vep_cache = params.pipelines_testdata_base_path + 'raredisease/reference/vep_cache_and_plugins.tar.gz'
vep_filters = params.pipelines_testdata_base_path + 'raredisease/reference/hgnc.txt'
vep_cache_version = 107
vep_plugin_files = params.pipelines_testdata_base_path + 'raredisease/reference/vep_files.csv'
}
43 changes: 0 additions & 43 deletions lib/CustomFunctions.groovy

This file was deleted.

10 changes: 8 additions & 2 deletions main.nf
Original file line number Diff line number Diff line change
Expand Up @@ -34,14 +34,18 @@ workflow NFCORE_RAREDISEASE {

take:
samplesheet // channel: samplesheet read in from --input
samples
case_info

main:

//
// WORKFLOW: Run pipeline
//
RAREDISEASE (
samplesheet
samplesheet,
samples,
case_info
)
emit:
multiqc_report = RAREDISEASE.out.multiqc_report // channel: /path/to/multiqc_report.html
Expand Down Expand Up @@ -71,7 +75,9 @@ workflow {
// WORKFLOW: Run main workflow
//
NFCORE_RAREDISEASE (
PIPELINE_INITIALISATION.out.samplesheet
PIPELINE_INITIALISATION.out.samplesheet,
PIPELINE_INITIALISATION.out.samples,
PIPELINE_INITIALISATION.out.case_info
)
//
// SUBWORKFLOW: Run completion tasks
Expand Down
File renamed without changes.
52 changes: 0 additions & 52 deletions modules/local/sentieon/tnscope.nf

This file was deleted.

10 changes: 5 additions & 5 deletions subworkflows/local/align.nf
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,12 @@
//

include { FASTP } from '../../modules/nf-core/fastp/main'
include { ALIGN_BWA_BWAMEM2_BWAMEME } from './alignment/align_bwa_bwamem2_bwameme'
include { ALIGN_SENTIEON } from './alignment/align_sentieon'
include { ALIGN_BWA_BWAMEM2_BWAMEME } from './align_bwa_bwamem2_bwameme'
include { ALIGN_SENTIEON } from './align_sentieon'
include { SAMTOOLS_VIEW } from '../../modules/nf-core/samtools/view/main'
include { ALIGN_MT } from './alignment/align_MT'
include { ALIGN_MT as ALIGN_MT_SHIFT } from './alignment/align_MT'
include { CONVERT_MT_BAM_TO_FASTQ } from './mitochondria/convert_mt_bam_to_fastq'
include { ALIGN_MT } from './align_MT'
include { ALIGN_MT as ALIGN_MT_SHIFT } from './align_MT'
include { CONVERT_MT_BAM_TO_FASTQ } from './convert_mt_bam_to_fastq'

workflow ALIGN {
take:
Expand Down
4 changes: 2 additions & 2 deletions subworkflows/local/annotate_genome_snvs.nf
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,8 @@ include { TABIX_TABIX as TABIX_VEP } from '../../modules/nf-core/ta
include { TABIX_TABIX as TABIX_BCFTOOLS_CONCAT } from '../../modules/nf-core/tabix/tabix/main'
include { TABIX_TABIX as TABIX_BCFTOOLS_VIEW } from '../../modules/nf-core/tabix/tabix/main'
include { GATK4_SELECTVARIANTS } from '../../modules/nf-core/gatk4/selectvariants/main'
include { ANNOTATE_CADD } from './annotation/annotate_cadd'
include { ANNOTATE_RHOCALLVIZ } from './annotation/annotate_rhocallviz'
include { ANNOTATE_CADD } from './annotate_cadd'
include { ANNOTATE_RHOCALLVIZ } from './annotate_rhocallviz'

workflow ANNOTATE_GENOME_SNVS {

Expand Down
2 changes: 1 addition & 1 deletion subworkflows/local/annotate_mt_snvs.nf
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ include { TABIX_BGZIPTABIX as ZIP_TABIX_HMTNOTE_MT } from '../../modules/n
include { ENSEMBLVEP_VEP as ENSEMBLVEP_MT } from '../../modules/nf-core/ensemblvep/vep/main'
include { HAPLOGREP2_CLASSIFY as HAPLOGREP2_CLASSIFY_MT } from '../../modules/nf-core/haplogrep2/classify/main'
include { VCFANNO as VCFANNO_MT } from '../../modules/nf-core/vcfanno/main'
include { ANNOTATE_CADD } from './annotation/annotate_cadd'
include { ANNOTATE_CADD } from './annotate_cadd'
include { TABIX_BGZIPTABIX as ZIP_TABIX_VCFANNO_MT } from '../../modules/nf-core/tabix/bgziptabix/main'
include { HMTNOTE_ANNOTATE } from '../../modules/nf-core/hmtnote/annotate/main'

Expand Down
10 changes: 5 additions & 5 deletions subworkflows/local/call_snv.nf
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,11 @@
// call Single-nucleotide Varinats
//

include { CALL_SNV_DEEPVARIANT } from './variant_calling/call_snv_deepvariant'
include { CALL_SNV_SENTIEON } from './variant_calling/call_snv_sentieon'
include { CALL_SNV_MT } from './variant_calling/call_snv_MT'
include { CALL_SNV_MT as CALL_SNV_MT_SHIFT } from './variant_calling/call_snv_MT'
include { POSTPROCESS_MT_CALLS } from './variant_calling/postprocess_MT_calls'
include { CALL_SNV_DEEPVARIANT } from './call_snv_deepvariant'
include { CALL_SNV_SENTIEON } from './call_snv_sentieon'
include { CALL_SNV_MT } from './call_snv_MT'
include { CALL_SNV_MT as CALL_SNV_MT_SHIFT } from './call_snv_MT'
include { POSTPROCESS_MT_CALLS } from './postprocess_MT_calls'
include { GATK4_SELECTVARIANTS } from '../../modules/nf-core/gatk4/selectvariants/main'

workflow CALL_SNV {
Expand Down
10 changes: 5 additions & 5 deletions subworkflows/local/call_structural_variants.nf
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,12 @@
// A nested subworkflow to call structural variants.
//

include { CALL_SV_MANTA } from './variant_calling/call_sv_manta'
include { CALL_SV_MT } from './variant_calling/call_sv_MT'
include { CALL_SV_TIDDIT } from './variant_calling/call_sv_tiddit'
include { CALL_SV_MANTA } from './call_sv_manta'
include { CALL_SV_MT } from './call_sv_MT'
include { CALL_SV_TIDDIT } from './call_sv_tiddit'
include { SVDB_MERGE } from '../../modules/nf-core/svdb/merge/main'
include { CALL_SV_GERMLINECNVCALLER } from './variant_calling/call_sv_germlinecnvcaller'
include { CALL_SV_CNVNATOR } from './variant_calling/call_sv_cnvnator'
include { CALL_SV_GERMLINECNVCALLER } from './call_sv_germlinecnvcaller'
include { CALL_SV_CNVNATOR } from './call_sv_cnvnator'
include { TABIX_TABIX } from '../../modules/nf-core/tabix/tabix/main'

workflow CALL_STRUCTURAL_VARIANTS {
Expand Down
49 changes: 49 additions & 0 deletions subworkflows/local/utils_nfcore_raredisease_pipeline/main.nf
Original file line number Diff line number Diff line change
Expand Up @@ -102,8 +102,19 @@ workflow PIPELINE_INITIALISATION {
}
.set { ch_samplesheet }

ch_samples = ch_samplesheet.map { meta, fastqs ->
new_id = meta.sample
new_meta = meta - meta.subMap('lane', 'read_group') + [id:new_id]
return new_meta
}.unique()

ch_case_info = ch_samples.toList().map { createCaseChannel(it) }


emit:
samplesheet = ch_samplesheet
samples = ch_samples
case_info = ch_case_info
versions = ch_versions
}

Expand Down Expand Up @@ -160,6 +171,44 @@ workflow PIPELINE_COMPLETION {
FUNCTIONS
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
*/

def boolean isNonZeroNonEmpty(value) {
return (value instanceof String && value != "" && value != "0") ||
(value instanceof Number && value != 0)
}

// Function to get a list of metadata (e.g. case id) for the case [ meta ]
def createCaseChannel(List rows) {
def case_info = [:]
def probands = [] as Set
def upd_children = [] as Set
def father = ""
def mother = ""

rows.each { item ->
if (item?.phenotype == 2) {
probands << item.sample
}
if (isNonZeroNonEmpty(item?.paternal) && isNonZeroNonEmpty(item?.maternal)) {
upd_children << item.sample
}
if (isNonZeroNonEmpty(item?.paternal)) {
father = item.paternal
}
if (isNonZeroNonEmpty(item?.maternal)) {
mother = item.maternal
}
}

case_info.father = father
case_info.mother = mother
case_info.probands = probands.toList()
case_info.upd_children = upd_children.toList()
case_info.id = rows[0].case_id

return case_info
}

//
// Check and validate pipeline parameters
//
Expand Down
11 changes: 3 additions & 8 deletions workflows/raredisease.nf
Original file line number Diff line number Diff line change
Expand Up @@ -175,19 +175,14 @@ workflow RAREDISEASE {

take:
ch_samplesheet // channel: samplesheet read in from --input
ch_samples
ch_case_info

main:

ch_versions = Channel.empty()
ch_multiqc_files = Channel.empty()

ch_samples = ch_samplesheet.map { meta, fastqs ->
new_id = meta.sample
new_meta = meta - meta.subMap('lane', 'read_group') + [id:new_id]
return new_meta
}.unique()

ch_case_info = ch_samples.toList().map { CustomFunctions.createCaseChannel(it) }

//
// Initialize file channels for PREPARE_REFERENCES subworkflow
//
Expand Down
Loading