toString method

git-svn-id: file:///humgen/gsa-scr1/gsa-engineering/svn_contents/trunk@2512 348d0f76-0448-11de-a6fe-93d51630548a
This commit is contained in:
depristo 2010-01-06 15:01:20 +00:00
parent 1c90e6a954
commit 5ce11c3dad
1 changed files with 7 additions and 3 deletions

View File

@ -31,7 +31,7 @@ public class VCFGenotypeRecord implements Genotype, SampleBacked {
public static final String UNFILTERED = "."; public static final String UNFILTERED = ".";
public static final double MAX_QUAL_VALUE = 99.0; public static final double MAX_QUAL_VALUE = 99.0;
// what kind of phasing this genotype has // what kind of phasing this genotype has
public enum PHASE { public enum PHASE {
UNPHASED, PHASED, PHASED_SWITCH_PROB, UNKNOWN UNPHASED, PHASED, PHASED_SWITCH_PROB, UNKNOWN
@ -150,7 +150,7 @@ public class VCFGenotypeRecord implements Genotype, SampleBacked {
if ( encoding.getType() == VCFGenotypeEncoding.TYPE.UNCALLED ) if ( encoding.getType() == VCFGenotypeEncoding.TYPE.UNCALLED )
continue; continue;
if ( encoding.getType() != VCFGenotypeEncoding.TYPE.SINGLE_BASE || if ( encoding.getType() != VCFGenotypeEncoding.TYPE.SINGLE_BASE ||
encoding.getBases().charAt(0) != ref ) encoding.getBases().charAt(0) != ref )
return true; return true;
} }
return false; return false;
@ -212,11 +212,15 @@ public class VCFGenotypeRecord implements Genotype, SampleBacked {
} }
first = false; first = false;
} }
} }
return str; return str;
} }
@Override public String toString() {
return String.format("[VCFGenotype %s %s %s %s]", getLocation(), mSampleName, this.mGenotypeAlleles, mFields);
}
public boolean isEmptyGenotype() { public boolean isEmptyGenotype() {
for ( VCFGenotypeEncoding encoding : mGenotypeAlleles ) { for ( VCFGenotypeEncoding encoding : mGenotypeAlleles ) {
if ( encoding.getType() != VCFGenotypeEncoding.TYPE.UNCALLED ) if ( encoding.getType() != VCFGenotypeEncoding.TYPE.UNCALLED )