Skip to content

Commit

Permalink
Merge pull request #388 from genomic-medicine-sweden/patch
Browse files Browse the repository at this point in the history
Patch release v1.1.1
  • Loading branch information
ramprasadn authored Jul 26, 2023
2 parents 1a66422 + 5c89cd1 commit c371602
Show file tree
Hide file tree
Showing 8 changed files with 39 additions and 17 deletions.
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,12 @@
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/)
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## 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
4 changes: 2 additions & 2 deletions assets/multiqc_config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@ custom_logo_url: https://github.com/nf-core/raredisease/
custom_logo_title: "nf-core/raredisease"

report_comment: >
This report has been generated by the <a href="https://github.com/nf-core/raredisease/1.1.0" target="_blank">nf-core/raredisease</a>
This report has been generated by the <a href="https://github.com/nf-core/raredisease/1.1.1" target="_blank">nf-core/raredisease</a>
analysis pipeline. For information about how to interpret these results, please see the
<a href="https://nf-co.re/raredisease/1.1.0/output" target="_blank">documentation</a>.
<a href="https://nf-co.re/raredisease/1.1.1/output" target="_blank">documentation</a>.
report_section_order:
"nf-core-raredisease-methods-description":
order: -1000
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
2 changes: 1 addition & 1 deletion nextflow.config
Original file line number Diff line number Diff line change
Expand Up @@ -271,7 +271,7 @@ manifest {
description = """call and score variants from WGS/WES of rare disease patients"""
mainScript = 'main.nf'
nextflowVersion = '!>=23.04.0'
version = '1.1.0'
version = '1.1.1'
doi = ''
}

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

0 comments on commit c371602

Please sign in to comment.