now implements AllelicVariant

git-svn-id: file:///humgen/gsa-scr1/gsa-engineering/svn_contents/trunk@1246 348d0f76-0448-11de-a6fe-93d51630548a
This commit is contained in:
ebanks 2009-07-15 14:06:25 +00:00
parent d369136bda
commit 513d43b5f3
1 changed files with 23 additions and 4 deletions

View File

@ -4,9 +4,7 @@ import org.broadinstitute.sting.utils.GenomeLoc;
import org.broadinstitute.sting.utils.GenomeLocParser;
import org.broadinstitute.sting.utils.Utils;
import java.util.HashMap;
import java.util.Map;
import java.util.Scanner;
import java.util.*;
import java.util.regex.MatchResult;
import java.util.regex.Pattern;
@ -18,7 +16,7 @@ import java.util.regex.Pattern;
* Time: 10:47:14 AM
* To change this template use File | Settings | File Templates.
*/
public class rodGFF extends BasicReferenceOrderedDatum {
public class rodGFF extends BasicReferenceOrderedDatum implements AllelicVariant {
private String contig, source, feature, strand, frame;
private long start, stop;
private double score;
@ -154,4 +152,25 @@ public class rodGFF extends BasicReferenceOrderedDatum {
setValues(contig, source, feature, start, stop, score, strand, frame, attributes);
return true;
}
public String getRefBasesFWD() { return null; }
public char getRefSnpFWD() throws IllegalStateException { return 0; }
public String getAltBasesFWD() { return null; }
public char getAltSnpFWD() throws IllegalStateException { return 0; }
public boolean isReference() { return ! isSNP(); }
public boolean isSNP() { return score == Double.NaN || score > 5.0; }
public boolean isInsertion() { return false; }
public boolean isDeletion() { return false; }
public boolean isIndel() { return false; }
public double getMAF() { return 0; }
public double getHeterozygosity() { return 0; }
public boolean isGenotype() { return true; }
public double getVariationConfidence() { return score; }
public double getConsensusConfidence() { return score; }
public List<String> getGenotype() throws IllegalStateException {
return Arrays.asList(feature);
}
public int getPloidy() throws IllegalStateException { return 2; }
public boolean isBiallelic() { return true; }
}