diff --git a/pom.xml b/pom.xml
index c40ea47e..5385fb7e 100644
--- a/pom.xml
+++ b/pom.xml
@@ -4,7 +4,7 @@
com.bina.varsim
varsim
- 0.7.6
+ 0.7.7
jar
varsim
diff --git a/quickstart.sh b/quickstart.sh
index 5f635f3f..d07db869 100755
--- a/quickstart.sh
+++ b/quickstart.sh
@@ -4,7 +4,7 @@ set -x
b37_source="ftp://ftp.1000genomes.ebi.ac.uk/vol1/ftp/technical/reference/phase2_reference_assembly_sequence/hs37d5.fa.gz"
dbsnp_source="ftp://ftp.ncbi.nih.gov/snp/organisms/human_9606_b147_GRCh37p13/VCF/All_20160601.vcf.gz"
-varsim_version="0.7.1"
+varsim_version="0.7.7"
samtools_version="1.3.1"
# Download varsim
diff --git a/src/main/java/com/bina/varsim/constants/Constant.java b/src/main/java/com/bina/varsim/constants/Constant.java
index 9873628b..2ec272a7 100644
--- a/src/main/java/com/bina/varsim/constants/Constant.java
+++ b/src/main/java/com/bina/varsim/constants/Constant.java
@@ -5,4 +5,5 @@
*/
public class Constant {
public static final int SVLEN = 100;
+ public static final int MAX_WARNING_REPEAT = 100;
}
diff --git a/src/main/java/com/bina/varsim/util/VCFparser.java b/src/main/java/com/bina/varsim/util/VCFparser.java
index c99de778..8722f980 100644
--- a/src/main/java/com/bina/varsim/util/VCFparser.java
+++ b/src/main/java/com/bina/varsim/util/VCFparser.java
@@ -16,6 +16,7 @@
import java.rmi.UnexpectedException;
import java.util.*;
+import static com.bina.varsim.constants.Constant.MAX_WARNING_REPEAT;
import static com.bina.varsim.types.VCFInfo.getType;
public class VCFparser extends GzFileParser {
@@ -28,6 +29,7 @@ public class VCFparser extends GzFileParser {
private String sampleId = null;
private boolean isPassFilterRequired = false;
private boolean chromLineSeen = false;
+ private int illegalPhasingWarningCount = 0;
public VCFparser() {
sampleIndex = 10; // the first sample
@@ -179,7 +181,14 @@ boolean isPhased(String geno, byte[] vals, ChrString chr) {
}
if (strangePhase) {
- log.warn("Unrecognized phasing '" + geno + "'.");
+ if (illegalPhasingWarningCount < MAX_WARNING_REPEAT) {
+ log.warn("Unrecognized phasing '" + geno + "'.");
+ illegalPhasingWarningCount++;
+ if (illegalPhasingWarningCount == MAX_WARNING_REPEAT) {
+ log.warn("Reached max number of warnings (" + MAX_WARNING_REPEAT +
+ ") for unrecognized phasing. No more warnings.");
+ }
+ }
vals[0] = -1;
vals[1] = -1;
isPhased = false;