print output as a GFF line.
still need to add printing GFF intervals for stretches of confident reference calls. does the GFF ROD class handle intervals?? We'll find out. >:) git-svn-id: file:///humgen/gsa-scr1/gsa-engineering/svn_contents/trunk@225 348d0f76-0448-11de-a6fe-93d51630548a
This commit is contained in:
parent
b752960586
commit
875802e8fc
|
|
@ -174,7 +174,8 @@ public class AlleleFrequencyMetricsWalker extends LocusWalker<AlleleFrequencyEst
|
|||
{
|
||||
// Print RESULT data for confident calls
|
||||
//if ((alleleFreq.lodVsRef >= 5) || (alleleFreq.lodVsRef <= -5)) { System.out.print(alleleFreq.asTabularString()); }
|
||||
out.print(alleleFreq.asTabularString());
|
||||
//out.print(alleleFreq.asTabularString());
|
||||
if ((alleleFreq.lodVsRef >= 5) || (alleleFreq.lodVsRef <= -5)) { System.out.print(alleleFreq.asGFFString()); }
|
||||
|
||||
if (this.num_loci_total % 1000 == 0) { printMetrics(); }
|
||||
|
||||
|
|
|
|||
|
|
@ -353,7 +353,7 @@ public class AlleleFrequencyWalker extends LocusWalker<AlleleFrequencyEstimate,
|
|||
public Integer reduce(AlleleFrequencyEstimate alleleFreq, Integer sum)
|
||||
{
|
||||
// Print RESULT data for confident calls
|
||||
if ((alleleFreq.lodVsRef >= 5) || (alleleFreq.lodVsRef <= -5)) { System.out.print(alleleFreq.asTabularString()); }
|
||||
if ((alleleFreq.lodVsRef >= 5) || (alleleFreq.lodVsRef <= -5)) { System.out.print(alleleFreq.asGFFString()); }
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -29,6 +29,20 @@ public class AlleleFrequencyEstimate {
|
|||
this.notes = "";
|
||||
}
|
||||
|
||||
public String asGFFString()
|
||||
{
|
||||
String[] tokens;
|
||||
tokens = location.split(":");
|
||||
return String.format("%s\tCALLER\tVARIANT\t%s\t%s\t%f\t.\t.\tREF \"%c\"\t;\tALT \"%c\"\t;\tFREQ %f\n",
|
||||
tokens[0],
|
||||
tokens[1],
|
||||
tokens[1],
|
||||
lodVsRef,
|
||||
ref,
|
||||
alt,
|
||||
qhat);
|
||||
}
|
||||
|
||||
public String asTabularString() {
|
||||
return String.format("RESULT %s %c %c %f %f %f %f %d %s\n",
|
||||
location,
|
||||
|
|
|
|||
Loading…
Reference in New Issue