diff --git a/java/src/org/broadinstitute/sting/gatk/refdata/SimpleIndelROD.java b/java/src/org/broadinstitute/sting/gatk/refdata/SimpleIndelROD.java new file mode 100755 index 000000000..6cb8c7cda --- /dev/null +++ b/java/src/org/broadinstitute/sting/gatk/refdata/SimpleIndelROD.java @@ -0,0 +1,43 @@ +package org.broadinstitute.sting.gatk.refdata; + +import org.broadinstitute.sting.utils.GenomeLoc; +import org.broadinstitute.sting.utils.GenomeLocParser; + +import java.util.*; + +public class SimpleIndelROD extends TabularROD implements Genotype { + + public SimpleIndelROD(String name) { + super(name); + } + + public GenomeLoc getLocation() { + return GenomeLocParser.createGenomeLoc(this.get("0"), Long.parseLong(this.get("1"))); + } + + public List getFWDAlleles() { + String str = this.get("3"); + return Arrays.asList(str.substring(0, str.indexOf(":"))); + } + + public String getFWDRefBases() { return ""; } + public char getRef() { return 'N'; } + public boolean isPointGenotype() { return false; } + public boolean isIndelGenotype() { return true; } + public boolean isSNP() { return false; } + public boolean isReference() { return false; } + public boolean isInsertion() { return this.get("3").charAt(0) == '+'; } + public boolean isDeletion() { return this.get("3").charAt(0) == '-'; } + public boolean isIndel() { return false; } + public double getVariantConfidence() { return 0.0; } + public double getConsensusConfidence() { return 0.0; } + public boolean isBiallelic() { return true; } + public boolean isHom() { return false; } + public boolean isHet() { return false; } + + public String toString() { + StringBuffer sb = new StringBuffer(); + sb.append(getLocation() + "\t" + getFWDAlleles().get(0)); + return sb.toString(); + } + } \ No newline at end of file