bug: need to upper case chars so that == works throughout

git-svn-id: file:///humgen/gsa-scr1/gsa-engineering/svn_contents/trunk@1684 348d0f76-0448-11de-a6fe-93d51630548a
This commit is contained in:
ebanks 2009-09-22 18:20:43 +00:00
parent 575da25fde
commit 682b765536
1 changed files with 2 additions and 1 deletions

View File

@ -65,7 +65,7 @@ public class RodGeliText extends BasicReferenceOrderedDatum implements Variation
throw new IOException("Invalid rodVariant row found -- too few elements. Expected 18+, got " + parts.length);
if (!parts[0].startsWith("#")) {
loc = GenomeLocParser.createGenomeLoc(parts[0], Long.valueOf(parts[1]));
refBase = parts[2].charAt(0);
refBase = Character.toUpperCase(parts[2].charAt(0));
depth = Integer.valueOf(parts[3]);
maxMappingQuality = Integer.valueOf(parts[4]);
@ -148,6 +148,7 @@ public class RodGeliText extends BasicReferenceOrderedDatum implements Variation
}
public char getAltSnpFWD() throws IllegalStateException {
// both ref and bestGenotype have been uppercased, so it's safe to use ==
char c = (bestGenotype.charAt(0) == refBase) ? bestGenotype.charAt(1) : bestGenotype.charAt(0);
//System.out.printf("%s : %c and %c%n", bestGenotype, refBase, c);
return c;