Skip to content

Commit

Permalink
Merge branch 'release/1.0.3'
Browse files Browse the repository at this point in the history
  • Loading branch information
SolomonShorser-OICR committed Mar 10, 2016
2 parents afe296d + 89f6efc commit a532dfb
Show file tree
Hide file tree
Showing 5 changed files with 23 additions and 4 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
# CHANGELOG

## 1.0.3
- Changed pre-processing to replace leading M with MT in the CHROM field. This was causing bcf-tools norm to fail.
At least one Broad INDEL had M (which is not valid) instead of MT, so it will be fixed at workflow run-time.

## 1.0.2
- Fixed the git_move.py script to move files in git better.

Expand Down
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@

<groupId>com.github.seqware</groupId>
<artifactId>OxoGWrapper</artifactId>
<version>1.0.2</version>
<version>1.0.3</version>
<packaging>jar</packaging>

<name>OxoGWrapper</name>
Expand Down
17 changes: 16 additions & 1 deletion src/main/java/com/github/seqware/OxoGWrapperWorkflow.java
Original file line number Diff line number Diff line change
Expand Up @@ -209,13 +209,28 @@ private Job preProcessIndelVCF(Job parent, Pipeline workflowName, String vcfName
String extractedSNVVCFName = this.aliquotID+ "_"+ workflowName+"_somatic.indel.pass-filtered.bcftools-norm.extracted-snvs.vcf";
String fixedIndel = vcfName.replace("indel.", "indel.fixed.").replace(".gz", ""); //...because the fixed indel will not be a gz file - at least not immediately.
Job bcfToolsNormJob = this.getWorkflow().createBashJob("normalize "+workflowName+" Indels");
String sedTab = "\\\"$(echo -e '\\t')\\\"";
String runBCFToolsNormCommand = "sudo chmod a+rw -R /datastore/vcf/ && ( docker run --rm --name normalize_indel_"+workflowName+" "
+ " -v "+outDir+"/"+vcfName+":/datastore/datafile.vcf.gz "
+ " -v "+outDir+"/"+":/outdir/:rw "
+ " -v /refdata/:/ref/"
+ " compbio/ngseasy-base:a1.0-002 /bin/bash -c \""
+ " bgzip -d -c /datastore/datafile.vcf.gz \\\n"
+ " | sed -e s/\\\"$(echo -e '\\t\\t')\\\"/\\\"$(echo -e '\\t')\\\".\\\"$(echo -e '\\t')\\\"./g -e s/\\\"$(echo -e '\\t')\\\"$/\\\"$(echo -e '\\t')\\\"./g -e 's/\\(##.*\\);$/\\1/g' \\\n"
//The goal is a sed call that looks like this, where the "t" is a tab...
//sed -e 's/t$/t./g' -e 's/tt/t.t/g' -e 's/\([^t]\)tt\([^t]\)/\1t.t\2/g' -e 's/tt/t.t/g' -e -e 's/^Mt/MTt/g' -e 's/\\(##.*\\);$/\\1/g'
//First, replace a tab at the end of a line with a tab and a dot because the dot was miossing.
//Second, replace any two tabs next to each other with tab-dot-tab because the dot was missing in between them.
//Third, replace any two tabs that are still beside each other and are book-ended by non-tabs with
//the original leading/trailing characters and two tabs with a dot in between.
//Fourth, replace any remaining sequential tabs with tab-dot-tab.
//Fifth, replace any leading M with MT
//Sixth, get rid of trailing semi-colons in header lines.
+ " | sed -e s/"+sedTab+"$/"+sedTab+"./g"
+ " -e s/"+sedTab+sedTab+"/"+sedTab+"."+sedTab+"/g"
+ " -e s/\\([^"+sedTab+"]\\)"+sedTab+sedTab+"\\([^"+sedTab+"]\\)/\\1"+sedTab+"."+sedTab+"\\2/g"
+ " -e s/"+sedTab+sedTab+"/"+sedTab+"."+sedTab+"/g"
+ " -e 's/^M\\([[:blank:]]\\)/MT\\1/g'"
+ " -e 's/\\(##.*\\);$/\\1/g' \\\n"
+ " > /outdir/"+fixedIndel+" && \\\n"
+ " bcftools norm -c w -m -any -Oz -f /ref/"+this.refFile+" /outdir/"+fixedIndel+" "
+ " > /outdir/"+normalizedINDELName
Expand Down
2 changes: 1 addition & 1 deletion workflow.properties
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
workflow-name=OxoGWrapper
workflow-version=1.0.2
workflow-version=1.0.3
workflow-description=This workflow performs filtering and annotation on VCFs, and will also produce mini-BAMs based on the original BAMs.
2 changes: 1 addition & 1 deletion workflow/metadata.xml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<bundle version="1.0.2">
<bundle version="1.0.3">
<workflow name="OxoGWrapper" version="${workflow-version}" seqware_version="${seqware-version}"
basedir="${workflow_bundle_dir}/Workflow_Bundle_OxoGWrapper/${workflow-version}">
<description>${workflow-description}</description>
Expand Down

0 comments on commit a532dfb

Please sign in to comment.