Skip to content

Commit

Permalink
Merge pull request #109 from yunfeiguo/v0.7.7
Browse files Browse the repository at this point in the history
v0.7.7
  • Loading branch information
marghoob authored Mar 4, 2017
2 parents 4aeabe8 + fb11d2c commit b810218
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 3 deletions.
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

<groupId>com.bina.varsim</groupId>
<artifactId>varsim</artifactId>
<version>0.7.6</version>
<version>0.7.7</version>
<packaging>jar</packaging>

<name>varsim</name>
Expand Down
2 changes: 1 addition & 1 deletion quickstart.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
1 change: 1 addition & 0 deletions src/main/java/com/bina/varsim/constants/Constant.java
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,5 @@
*/
public class Constant {
public static final int SVLEN = 100;
public static final int MAX_WARNING_REPEAT = 100;
}
11 changes: 10 additions & 1 deletion src/main/java/com/bina/varsim/util/VCFparser.java
Original file line number Diff line number Diff line change
Expand Up @@ -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<Variant> {
Expand All @@ -28,6 +29,7 @@ public class VCFparser extends GzFileParser<Variant> {
private String sampleId = null;
private boolean isPassFilterRequired = false;
private boolean chromLineSeen = false;
private int illegalPhasingWarningCount = 0;

public VCFparser() {
sampleIndex = 10; // the first sample
Expand Down Expand Up @@ -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;
Expand Down

0 comments on commit b810218

Please sign in to comment.