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
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,12 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

### `Fixed`

## v1.1.1 - Abu (Patch) [2023-07-26]

### `Fixed`

- Avoids errors thrown by bcftools concat due to sample names in input vcf files not being in same order [#388](https://github.com/nf-core/raredisease/pull/388)

## v1.1.0 - Abu [2023-07-21]

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

withName: '.*ANALYSE_MT:MERGE_ANNOTATE_MT:BCFTOOLS_MERGE_MT' {
ext.args = '--output-type z'
ext.prefix = { "${meta.id}_merge_mt" }
}

Expand Down
3 changes: 1 addition & 2 deletions conf/modules/raredisease.config
Original file line number Diff line number Diff line change
Expand Up @@ -71,9 +71,8 @@ process {
//

process {
withName: '.*RAREDISEASE:BCFTOOLS_CONCAT' {
withName: '.*RAREDISEASE:GATK4_MERGEVCFS' {
ext.prefix = { "${meta.id}_mito_genome_merged" }
ext.args = " -a "
}
}

Expand Down
19 changes: 19 additions & 0 deletions lib/WorkflowRaredisease.groovy
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,25 @@ class WorkflowRaredisease {

}

//
// Replace spaces in vcf INFO fields with underscore
//
public static String replaceSpacesInInfoColumn(vcf_file, parent_dir, base_name) {
def outfile = new File(parent_dir + '/' + base_name + '_formatted.vcf')
def writer = outfile.newWriter()
vcf_file.eachLine { line ->
if (line.startsWith("#")) {
writer << line + "\n"
} else {
def split_str = line.tokenize("\t")
split_str[7] = split_str.getAt(7).replaceAll(" ","_")
writer << split_str.join("\t") + "\n"
}
}
writer.close()
return outfile
}

//
// Get workflow summary for MultiQC
//
Expand Down
6 changes: 5 additions & 1 deletion subworkflows/local/mitochondria/merge_annotate_MT.nf
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,11 @@ workflow MERGE_ANNOTATE_MT {

// HMTNOTE ANNOTATE
HMTNOTE_ANNOTATE(VCFANNO_MT.out.vcf)
ZIP_TABIX_HMTNOTE(HMTNOTE_ANNOTATE.out.vcf)
HMTNOTE_ANNOTATE.out.vcf.map{meta, vcf ->
return [meta, WorkflowRaredisease.replaceSpacesInInfoColumn(vcf, vcf.parent.toString(), vcf.baseName)]
}
.set { ch_hmtnote_reformatted }
ZIP_TABIX_HMTNOTE(ch_hmtnote_reformatted)

// Prepare output
ch_vcf_out = ZIP_TABIX_HMTNOTE.out.gz_tbi.map{meta, vcf, tbi -> return [meta, vcf] }
Expand Down
15 changes: 4 additions & 11 deletions workflows/raredisease.nf
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ include { FILTER_VEP as FILTER_VEP_SV } from '../modules/local/filter_
// MODULE: Installed directly from nf-core/modules
//

include { BCFTOOLS_CONCAT } from '../modules/nf-core/bcftools/concat/main'
include { GATK4_MERGEVCFS } from '../modules/nf-core/gatk4/mergevcfs/main'
include { CUSTOM_DUMPSOFTWAREVERSIONS } from '../modules/nf-core/custom/dumpsoftwareversions/main'
include { FASTQC } from '../modules/nf-core/fastqc/main'
include { GATK4_SELECTVARIANTS } from '../modules/nf-core/gatk4/selectvariants/main'
Expand Down Expand Up @@ -483,16 +483,9 @@ workflow RAREDISEASE {
.groupTuple()
.set { ch_merged_vcf }

ANNOTATE_SNVS.out.tbi
.concat(ANALYSE_MT.out.tbi)
.groupTuple()
.set { ch_merged_tbi }

ch_merged_vcf.join(ch_merged_tbi, failOnMismatch:true, failOnDuplicate:true).set {ch_concat_in}

BCFTOOLS_CONCAT (ch_concat_in)
ch_snv_annotate = BCFTOOLS_CONCAT.out.vcf
ch_versions = ch_versions.mix(BCFTOOLS_CONCAT.out.versions)
GATK4_MERGEVCFS (ch_merged_vcf, ch_genome_dictionary)
ch_snv_annotate = GATK4_MERGEVCFS.out.vcf
ch_versions = ch_versions.mix(GATK4_MERGEVCFS.out.versions)
}

ANN_CSQ_PLI_SNV (
Expand Down