Made sure all RODs have a (good) toString() method - and use it in the Venn walker. (thanks, Mark)

git-svn-id: file:///humgen/gsa-scr1/gsa-engineering/svn_contents/trunk@1339 348d0f76-0448-11de-a6fe-93d51630548a
This commit is contained in:
ebanks 2009-07-30 14:53:27 +00:00
parent 9cd53d3273
commit 4366ce16e0
3 changed files with 16 additions and 6 deletions

View File

@ -50,4 +50,12 @@ public class KGenomesSNPROD extends TabularROD implements SNPCallFromGenotypes {
public int nHomVarGenotypes() { return -1; }
public List<Genotype> getGenotypes() { return null; }
public int length() { return 1; }
public String toString() {
StringBuffer sb = new StringBuffer();
sb.append(getLocation().getContig() + "\t" + getLocation().getStart() + "\t");
sb.append(getRefSnpFWD() + "\t" + getGenotype().get(0) + "\t");
sb.append(getMAF() + "\t0\t0\t0\t" + getVariationConfidence());
return sb.toString();
}
}

View File

@ -39,4 +39,11 @@ public class SangerSNPROD extends TabularROD implements SNPCallFromGenotypes {
public int nHetGenotypes() { return -1; }
public int nHomVarGenotypes() { return -1; }
public List<Genotype> getGenotypes() { return null; }
public String toString() {
StringBuffer sb = new StringBuffer();
sb.append(getLocation().getContig() + "\t" + getLocation().getStart() + "\t");
sb.append(getRefBasesFWD() + "\t" + getAltBasesFWD());
return sb.toString();
}
}

View File

@ -79,12 +79,7 @@ public class VennCallSetsWalker extends RefWalker<Integer, Integer> {
static void printVariant(PrintWriter writer, AllelicVariant variant) {
if ( variant != null )
writer.println(variant.getLocation().getContig() + "\t"
+ variant.getLocation().getStart() + "\t"
+ variant.getRefSnpFWD() + "\t"
+ variant.getGenotype().get(0) + "\t"
+ variant.getMAF() + "\t0\t0\t0\t"
+ variant.getVariationConfidence());
writer.println(variant.toString());
}
/**