Thanks to visit codestin.com
Credit goes to github.com

Skip to content
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
9 changes: 8 additions & 1 deletion assets/vep_plugin_files_schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,14 @@
"properties": {
"vep_files": {
"type": "string",
"format": "file-path",
"anyOf": [
{
"format": "file-path"
},
{
"format": "directory-path"
}
],
"exists": true,
"errorMessage": "Path to vep plugin files and their indices"
}
Expand Down
14 changes: 8 additions & 6 deletions conf/modules/align_MT.config
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ process {
}

withName: '.*ALIGN_MT:GATK4_MERGEBAMALIGNMENT_MT' {
ext.args = '--CREATE_INDEX true --MAX_GAPS -1 --SORT_ORDER queryname --INCLUDE_SECONDARY_ALIGNMENTS false --PAIRED_RUN false --VALIDATION_STRINGENCY LENIENT'
ext.args = '--TMP_DIR . --CREATE_INDEX true --MAX_GAPS -1 --SORT_ORDER queryname --INCLUDE_SECONDARY_ALIGNMENTS false --PAIRED_RUN false --VALIDATION_STRINGENCY LENIENT'
ext.prefix = { "${meta.id}_merged" }
}

Expand All @@ -52,12 +52,13 @@ process {
"--RGLB lib",
"--RGPL ${params.platform}",
"--RGPU barcode",
"--RGSM ${meta.id}"
"--RGSM ${meta.id}",
"--TMP_DIR ./temp_folder"
].join(' ').trim() }
}

withName: '.*ALIGN_MT:PICARD_MARKDUPLICATES_MT' {
ext.args = '--VALIDATION_STRINGENCY LENIENT --CREATE_INDEX true'
ext.args = '--TMP_DIR . --VALIDATION_STRINGENCY LENIENT --CREATE_INDEX true'
ext.prefix = { "${meta.id}_markduplicates" }
}

Expand Down Expand Up @@ -99,7 +100,7 @@ process {
}

withName: '.*ALIGN_MT_SHIFT:GATK4_MERGEBAMALIGNMENT_MT' {
ext.args = '--CREATE_INDEX true --MAX_GAPS -1 --SORT_ORDER queryname --INCLUDE_SECONDARY_ALIGNMENTS false --PAIRED_RUN false --VALIDATION_STRINGENCY LENIENT'
ext.args = '--TMP_DIR . --CREATE_INDEX true --MAX_GAPS -1 --SORT_ORDER queryname --INCLUDE_SECONDARY_ALIGNMENTS false --PAIRED_RUN false --VALIDATION_STRINGENCY LENIENT'
ext.prefix = { "${meta.id}_merged_shifted" }
}

Expand All @@ -109,12 +110,13 @@ process {
"--RGLB lib",
"--RGPL ${params.platform}",
"--RGPU barcode",
"--RGSM ${meta.id}"
"--RGSM ${meta.id}",
"--TMP_DIR ."
].join(' ').trim() }
}

withName: '.*ALIGN_MT_SHIFT:PICARD_MARKDUPLICATES_MT' {
ext.args = '--VALIDATION_STRINGENCY LENIENT --CREATE_INDEX true'
ext.args = '--TMP_DIR . --VALIDATION_STRINGENCY LENIENT --CREATE_INDEX true'
ext.prefix = { "${meta.id}_markduplicates_shifted" }
}

Expand Down
1 change: 1 addition & 0 deletions conf/modules/align_bwa_bwamem2.config
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@ process {
}

withName: '.*ALIGN:ALIGN_BWA_BWAMEM2:MARKDUPLICATES' {
ext.args = "--TMP_DIR ."
ext.prefix = { "${meta.id}_sorted_md" }
publishDir = [
enabled: !params.save_mapped_as_cram,
Expand Down
36 changes: 17 additions & 19 deletions conf/modules/annotate_cadd.config
Original file line number Diff line number Diff line change
Expand Up @@ -16,28 +16,26 @@
//

process {
if (params.cadd_resources != null) {
withName: '.*:ANNOTATE_CADD.*' {
ext.when = { ( !(workflow.profile.tokenize(',').intersect(['test', 'test_one_sample']).size() >= 1) || workflow.stubRun) }
}
withName: '.*:ANNOTATE_CADD.*' {
ext.when = { ( !(workflow.profile.tokenize(',').intersect(['test', 'test_one_sample']).size() >= 1) || workflow.stubRun) }
}

withName: '.*:ANNOTATE_CADD:BCFTOOLS_VIEW' {
ext.args = { "--output-type z --types indels" }
ext.prefix = { "${vcf.simpleName}_indels" }
}
withName: '.*:ANNOTATE_CADD:BCFTOOLS_VIEW' {
ext.args = { "--output-type z --types indels" }
ext.prefix = { "${vcf.simpleName}_indels" }
}

withName: '.*:ANNOTATE_CADD:CADD' {
ext.args = { "-g ${params.genome}" }
ext.prefix = { "${vcf.simpleName}_cadd" }
}
withName: '.*:ANNOTATE_CADD:CADD' {
ext.args = { "-g ${params.genome}" }
ext.prefix = { "${vcf.simpleName}_cadd" }
}

withName: '.*:ANNOTATE_CADD:TABIX_CADD' {
ext.args = { "--force --sequence 1 --begin 2 --end 2" }
}
withName: '.*:ANNOTATE_CADD:TABIX_CADD' {
ext.args = { "--force --sequence 1 --begin 2 --end 2" }
}

withName: '.*:ANNOTATE_CADD:BCFTOOLS_ANNOTATE' {
ext.args = { "--columns Chrom,Pos,Ref,Alt,-,CADD --output-type z" }
ext.prefix = { "${input.simpleName}_ann" }
}
withName: '.*:ANNOTATE_CADD:BCFTOOLS_ANNOTATE' {
ext.args = { "--columns Chrom,Pos,Ref,Alt,-,CADD --output-type z" }
ext.prefix = { "${input.simpleName}_ann" }
}
}
1 change: 1 addition & 0 deletions conf/modules/call_mobile_elements.config
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ process {
}

withName: '.*CALL_MOBILE_ELEMENTS:BCFTOOLS_REHEADER_ME' {
ext.args = "--temp-prefix ."
ext.args2 = { '--output-type v' }
ext.prefix = { "${meta.id}_${meta.interval}_retroseq_reheader" }
}
Expand Down
4 changes: 3 additions & 1 deletion conf/modules/call_repeat_expansions.config
Original file line number Diff line number Diff line change
Expand Up @@ -24,11 +24,12 @@ process {
}

withName: '.*CALL_REPEAT_EXPANSIONS:EXPANSIONHUNTER' {
ext.args = { ("${meta.sex}" == 1) ? '--sex male' : '--sex female' }
ext.args = { ("${meta.sex}" == '1') ? '--sex male' : '--sex female' }
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Was this broken? From the schema it looks like sex needs to be an integer and not a string.

"type": "integer",

I guess that there is a risk that the old ("${meta.sex}" == 1) simply checks for the boolean. Anyway, can you confirm that this sets the gender correctly for male and female?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Schema does expect the value to be an integer, but in meta everything is of string type.. I retrieved the type of the values in our meta and this is what it looks like..
[id:java.lang.String, sample:java.lang.String, lane:java.lang.String, sex:java.lang.String, phenotype:java.lang.String, paternal:java.lang.String, maternal:java.lang.String, case_id:java.lang.String, num_lanes:java.lang.String, read_group:java.lang.String, single_end:java.lang.Boolean]

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I see, didn't know that :)
In that case we should look into whether this needs changing this as well

meta.sex.equals(1) ? '--sex male' : '--sex female',

Worked for my testing previously though
Also it might be worth looking into whether this function needs changing
def create_case_channel(List rows) {

ext.prefix = { "${meta.id}_exphunter" }
}

withName: '.*CALL_REPEAT_EXPANSIONS:BCFTOOLS_REHEADER_EXP' {
ext.args = "--temp-prefix ."
ext.prefix = { "${meta.id}_reheader" }
}

Expand Down Expand Up @@ -66,6 +67,7 @@ process {

withName: '.*CALL_REPEAT_EXPANSIONS:COMPRESS_STRANGER' {
ext.prefix = { "${meta.id}_repeat_expansion" }
ext.args = '--output-type z'
publishDir = [
path: { "${params.outdir}/repeat_expansions" },
mode: params.publish_dir_mode,
Expand Down
2 changes: 1 addition & 1 deletion conf/modules/call_snv.config
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ process {
}

withName: '.*CALL_SNV:GATK4_SELECTVARIANTS' {
ext.args = "--exclude-intervals ${params.mito_name}"
ext.args = { "--exclude-intervals ${params.mito_name}" }
ext.prefix = { "${meta.id}_nomito" }
publishDir = [
path: { "${params.outdir}/call_snv/genome" },
Expand Down
1 change: 1 addition & 0 deletions conf/modules/call_sv_MT.config
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ process {

if (!params.skip_eklipse){
withName: '.*CALL_SV_MT:EKLIPSE' {
ext.args = "-tmp ."
publishDir = [
path: { "${params.outdir}/call_sv/mitochondria" },
mode: params.publish_dir_mode,
Expand Down
12 changes: 6 additions & 6 deletions conf/modules/convert_mt_bam_to_fastq.config
Original file line number Diff line number Diff line change
Expand Up @@ -18,19 +18,19 @@
process {

withName: '.*ALIGN:CONVERT_MT_BAM_TO_FASTQ:GATK4_PRINTREADS_MT' {
beforeScript = {"mkdir ./tmp"}
ext.args = [
ext.args = { [
"-L ${params.mito_name}",
"--read-filter MateOnSameContigOrNoMappedMateReadFilter",
"--read-filter MateUnmappedAndUnmappedReadFilter"
].join(" ").trim()
"--read-filter MateUnmappedAndUnmappedReadFilter",
"--tmp-dir ."
].join(" ").trim() }
}

withName: '.*ALIGN:CONVERT_MT_BAM_TO_FASTQ:GATK4_REVERTSAM_MT' {
ext.args = '--OUTPUT_BY_READGROUP false --VALIDATION_STRINGENCY LENIENT --ATTRIBUTE_TO_CLEAR FT --ATTRIBUTE_TO_CLEAR CO --SORT_ORDER queryname --RESTORE_ORIGINAL_QUALITIES false'
ext.args = '--TMP_DIR . --OUTPUT_BY_READGROUP false --VALIDATION_STRINGENCY LENIENT --ATTRIBUTE_TO_CLEAR FT --ATTRIBUTE_TO_CLEAR CO --SORT_ORDER queryname --RESTORE_ORIGINAL_QUALITIES false'
}

withName: '.*ALIGN:CONVERT_MT_BAM_TO_FASTQ:GATK4_SAMTOFASTQ_MT' {
ext.args = '--VALIDATION_STRINGENCY LENIENT'
ext.args = '--VALIDATION_STRINGENCY LENIENT --TMP_DIR .'
}
}
2 changes: 1 addition & 1 deletion conf/modules/postprocess_MT_calls.config
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
process {

withName: '.*POSTPROCESS_MT_CALLS:GATK4_MERGEVCFS_LIFT_UNLIFT_MT' {
ext.prefix = { "${meta.id}_merged" }
ext.prefix = { "${meta.id}_merged_liftunlift" }
}

withName: '.*POSTPROCESS_MT_CALLS:GATK4_VARIANTFILTRATION_MT' {
Expand Down
4 changes: 4 additions & 0 deletions conf/modules/qc_bam.config
Original file line number Diff line number Diff line change
Expand Up @@ -25,10 +25,12 @@ process {
}

withName: '.*QC_BAM:PICARD_COLLECTMULTIPLEMETRICS' {
ext.args = "--TMP_DIR ."
ext.prefix = { "${meta.id}_multiplemetrics" }
}

withName: '.*QC_BAM:PICARD_COLLECTHSMETRICS' {
ext.args = "--TMP_DIR ."
ext.when = { !params.target_bed.equals(null) }
ext.prefix = { "${meta.id}_hsmetrics" }
}
Expand Down Expand Up @@ -65,11 +67,13 @@ process {
}

withName: '.*QC_BAM:PICARD_COLLECTWGSMETRICS' {
ext.args = "--TMP_DIR ."
ext.when = { params.analysis_type.equals("wgs") && !params.aligner.equals("sentieon") }
ext.prefix = { "${meta.id}_wgsmetrics" }
}

withName: '.*QC_BAM:PICARD_COLLECTWGSMETRICS_Y' {
ext.args = "--TMP_DIR ."
ext.when = { params.analysis_type.equals("wgs") && !params.aligner.equals("sentieon") }
ext.prefix = { "${meta.id}_wgsmetrics_y" }
}
Expand Down
28 changes: 15 additions & 13 deletions workflows/raredisease.nf
Original file line number Diff line number Diff line change
Expand Up @@ -312,17 +312,19 @@ workflow RAREDISEASE {
}

// Read and store paths in the vep_plugin_files file
ch_vep_extra_files_unsplit.splitCsv ( header:true )
.map { row ->
f = file(row.vep_files[0])
if(f.isFile() || f.isDirectory()){
return [f]
} else {
error("\nVep database file ${f} does not exist.")
if (params.vep_plugin_files) {
ch_vep_extra_files_unsplit.splitCsv ( header:true )
.map { row ->
f = file(row.vep_files[0])
if(f.isFile() || f.isDirectory()){
return [f]
} else {
error("\nVep database file ${f} does not exist.")
}
}
}
.collect()
.set {ch_vep_extra_files}
.collect()
.set {ch_vep_extra_files}
}

// Input QC
if (!params.skip_fastqc) {
Expand Down Expand Up @@ -760,13 +762,13 @@ def create_case_channel(List rows) {
if (item.phenotype == 2) {
probands.add(item.sample)
}
if ( (item.paternal!=0) && (item.paternal!="") && (item.maternal!=0) && (item.maternal!="") ) {
if ( (item.paternal!="0") && (item.paternal!="") && (item.maternal!="0") && (item.maternal!="") ) {
upd_children.add(item.sample)
}
if ( (item.paternal!=0) && (item.paternal!="") ) {
if ( (item.paternal!="0") && (item.paternal!="") ) {
father = item.paternal
}
if ( (item.maternal!=0) && (item.maternal!="") ) {
if ( (item.maternal!="0") && (item.maternal!="") ) {
mother = item.maternal
}
}
Expand Down