added isBiallelic() to the AllelicVariant interface and to rodDbSNP implementation. We probably don't really know how to deal with non-biallelic sites just as yet...
git-svn-id: file:///humgen/gsa-scr1/gsa-engineering/svn_contents/trunk@294 348d0f76-0448-11de-a6fe-93d51630548a
This commit is contained in:
parent
2e89d5e46f
commit
551ce9130f
|
|
@ -119,4 +119,12 @@ public interface AllelicVariant extends Comparable<ReferenceOrderedDatum> {
|
|||
* @return
|
||||
*/
|
||||
int getPloidy() throws IllegalStateException;
|
||||
|
||||
/** Returns true if the site has at most two known or observed alleles (ref and non-ref), or false if there are > 2 allelic variants known or observed. When
|
||||
* the implementing class is a genotype, alleles should be always counted including the reference allele whether it was observed in the particular
|
||||
* individual or not: i.e. if the reference is 'C', then both 'CA' and 'AA' genotypes must be reported as bi-allelic, while 'AT' is <i>not</i> bi-allelic (since there are
|
||||
* two allelic variants, 'A' and 'T' <i>in addition</i> to the (known) reference variant 'C').
|
||||
* @return
|
||||
*/
|
||||
boolean isBiallelic() ;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -222,4 +222,10 @@ public class rodDbSNP extends ReferenceOrderedDatum implements AllelicVariant {
|
|||
// TODO Auto-generated method stub
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isBiallelic() {
|
||||
// TODO Auto-generated method stub
|
||||
return observed.indexOf('/')==observed.lastIndexOf('/');
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue