diff --git a/README.md b/README.md
index a1c38b9..5eac148 100644
--- a/README.md
+++ b/README.md
@@ -1,7 +1,7 @@
-ConsensusFixer 0.3
+ConsensusFixer 0.4
***
@@ -21,6 +21,7 @@ Please get the latest binary at [releases](https://github.com/cbg-ethz/Consensus
### FEATURES:
- Calls consensus sequence with a minimal coverage `-mcc INT`
- Integrates consensus sequence into given reference `-r ref.fasta`
+ - Optionally insert dashes '-' instead of bases from the reference.
- Include insertions with a minimal coverage of `-mic INT`
- Optionally, only include in-frame insertions `-f`
- Calls amibiguous bases (wobbles) if relative base abundance is above `-plurality DOUBLE`
@@ -57,6 +58,7 @@ Please open an issue on github
-m : Majority vote respecting pluralityN first, otherwise allow wobbles.
-f : Only allow in frame insertions.
-d : Remove gaps if they are >= pluralityN.
+ -dash : Use '-' instead of bases from the reference.
-s : Single core mode with low memory footprint.
```
diff --git a/makefile b/makefile
new file mode 100644
index 0000000..8733c20
--- /dev/null
+++ b/makefile
@@ -0,0 +1,7 @@
+all:a
+ mvn clean package
+
+a:
+ mvn -DartifactId=samtools -DgroupId=net.sf -Dversion=1.9.6 -Dpackaging=jar -Dfile=src/main/resources/jars/sam-1.96.jar -DgeneratePom=false install:install-file
+
+
diff --git a/pom.xml b/pom.xml
index 4b4ea9d..a4f11c6 100644
--- a/pom.xml
+++ b/pom.xml
@@ -4,7 +4,7 @@
ch.ethz.bsse
consensusfixer
- 0.3
+ 0.4
jar
ConsensusFixer
@@ -52,7 +52,7 @@
- org.dstovall
+ com.jolira
onejar-maven-plugin
1.4.4
diff --git a/src/main/java/ch/ethz/bsse/cf/Startup.java b/src/main/java/ch/ethz/bsse/cf/Startup.java
index d33e05f..cc7421a 100644
--- a/src/main/java/ch/ethz/bsse/cf/Startup.java
+++ b/src/main/java/ch/ethz/bsse/cf/Startup.java
@@ -76,6 +76,8 @@ public static void main(String[] args) throws IOException {
private boolean progressiveInsertion;
@Option(name = "-pis")
private int progressiveInsertionSize = 300;
+ @Option(name = "-dash")
+ private boolean dashForReference = false;
private void setInputOutput() {
if (output == null) {
@@ -106,6 +108,7 @@ private void setMainParameters() {
Globals.MAXIMUM_INSERTION = this.maximumInsertion;
Globals.PROGRESSIVE_INSERTION = this.progressiveInsertion;
Globals.PROGRESSIVE_INSERTION_SIZE = this.progressiveInsertionSize;
+ Globals.INSERT_DASHES_FOR_REFERENCE = this.dashForReference;
StatusUpdate.SILENT = this.silent;
}
@@ -186,6 +189,7 @@ public void doMain(String[] args) throws IOException {
System.err.println(" -mi \t\t\t: Only the insertion with the maximum frequency greater than mic is incorporated.");
System.err.println(" -pi \t\t\t: Progressive insertion mode, respecting mic.");
System.err.println(" -pis INT\t\t: Window size for progressive insertion mode (default: 300).");
+ System.err.println(" -dash \t\t: Use '-' instead of bases from the reference.");
System.err.println(" -s \t\t\t: Single core mode with low memory footprint.");
System.err.println("");
System.err.println(" -------------------------");
diff --git a/src/main/java/ch/ethz/bsse/cf/informationholder/Globals.java b/src/main/java/ch/ethz/bsse/cf/informationholder/Globals.java
index ec7e478..a0c0ad1 100644
--- a/src/main/java/ch/ethz/bsse/cf/informationholder/Globals.java
+++ b/src/main/java/ch/ethz/bsse/cf/informationholder/Globals.java
@@ -45,6 +45,7 @@ public class Globals {
public static int MIN_CONS_COV;
public static int MIN_INS_COV;
public static int PROGRESSIVE_INSERTION_SIZE;
+ public static boolean INSERT_DASHES_FOR_REFERENCE;
public static char[] GENOME;
public static final Map> DELETION_MAP_PASSES = new ConcurrentHashMap<>();
public static final Map DELETION_MAP = new ConcurrentHashMap<>();
diff --git a/src/main/java/ch/ethz/bsse/cf/utils/Alignment.java b/src/main/java/ch/ethz/bsse/cf/utils/Alignment.java
index 7f75a51..c2781e5 100644
--- a/src/main/java/ch/ethz/bsse/cf/utils/Alignment.java
+++ b/src/main/java/ch/ethz/bsse/cf/utils/Alignment.java
@@ -143,7 +143,11 @@ public static void saveConsensus() {
if (Globals.CONSENSUS_MAP.containsKey(i)) {
consensusSequence.append(Globals.CONSENSUS_MAP.get(i));
} else {
- consensusSequence.append(Globals.GENOME[i]);
+ if (Globals.INSERT_DASHES_FOR_REFERENCE){
+ consensusSequence.append('-');
+ } else {
+ consensusSequence.append(Globals.GENOME[i]);
+ }
}
if (insertionMap.containsKey(i) && !insertionMap.get(i).isEmpty()) {
if (Globals.MAXIMUM_INSERTION) {