Convenience printing
git-svn-id: file:///humgen/gsa-scr1/gsa-engineering/svn_contents/trunk@968 348d0f76-0448-11de-a6fe-93d51630548a
This commit is contained in:
parent
06e5a765f8
commit
9ebcd6546d
|
|
@ -79,7 +79,7 @@ public class HardyWeinbergEquilibrium extends BasicVariantAnalysis {
|
|||
List<String> s = new ArrayList<String>();
|
||||
s.add(String.format("n_calls %d", nSites));
|
||||
s.add(String.format("n_violations %d", nViolations));
|
||||
s.add(String.format("violations_rate %.2f", (100.0*nSites) / nViolations));
|
||||
s.add(String.format("violations_rate %.2f", (100.0*nViolations) / nSites));
|
||||
return s;
|
||||
}
|
||||
}
|
||||
|
|
@ -75,10 +75,12 @@ public class PairwiseDistanceAnalysis extends BasicVariantAnalysis {
|
|||
|
||||
List<String> s = new ArrayList<String>();
|
||||
s.add(String.format("snps counted for pairwise distance: %d", pairWiseDistances.size()));
|
||||
int cumulative = 0;
|
||||
for ( int i = 0; i < pairWiseBoundries.length; i++ ) {
|
||||
int maxDist = pairWiseBoundries[i];
|
||||
int count = pairCounts[i];
|
||||
s.add(String.format("snps within %8d bp: %d", maxDist, count));
|
||||
cumulative += count;
|
||||
s.add(String.format("snps within %8d bp: %d %d", maxDist, count, cumulative));
|
||||
}
|
||||
|
||||
return s;
|
||||
|
|
|
|||
|
|
@ -26,17 +26,10 @@ public class VariantDBCoverage extends BasicVariantAnalysis {
|
|||
if (inDB && inEval) nOverlapping++;
|
||||
}
|
||||
|
||||
public int nDBSites() {
|
||||
return nDBObs;
|
||||
}
|
||||
|
||||
public int nEvalSites() {
|
||||
return nEvalObs;
|
||||
}
|
||||
|
||||
public int nOverlappingSites() {
|
||||
return nOverlapping;
|
||||
}
|
||||
public int nDBSites() { return nDBObs; }
|
||||
public int nEvalSites() { return nEvalObs; }
|
||||
public int nOverlappingSites() { return nOverlapping; }
|
||||
public int nNovelSites() { return Math.abs(nEvalSites() - nOverlappingSites()); }
|
||||
|
||||
/**
|
||||
* What fraction of the evaluated site variants were also found in the db?
|
||||
|
|
@ -70,6 +63,7 @@ public class VariantDBCoverage extends BasicVariantAnalysis {
|
|||
s.add(String.format("n_db_sites %d", nDBSites()));
|
||||
s.add(String.format("n_eval_sites %d", nEvalSites()));
|
||||
s.add(String.format("n_overlapping_sites %d", nOverlappingSites()));
|
||||
s.add(String.format("n_novel_sites %d", nNovelSites()));
|
||||
s.add(String.format("per_eval_sites_in_db %.2f", 100*fractionEvalSitesCoveredByDB()));
|
||||
s.add(String.format("per_db_sites_in_eval %.2f", 100*fractionDBSitesDiscoveredInEval()));
|
||||
return s;
|
||||
|
|
|
|||
|
|
@ -103,6 +103,8 @@ public class VariantEvalWalker extends RefWalker<Integer, Integer> {
|
|||
public Integer map(RefMetaDataTracker tracker, char ref, LocusContext context) {
|
||||
// Iterate over each analysis, and update it
|
||||
AllelicVariant eval = (AllelicVariant)tracker.lookup("eval", null);
|
||||
|
||||
//if ( eval!=null ) System.out.printf("Eval: %f %d %b%n", eval.getVariationConfidence(), minDiscoveryQ, eval.getVariationConfidence() < minDiscoveryQ);
|
||||
if ( eval != null && eval.getVariationConfidence() < minDiscoveryQ )
|
||||
eval = null;
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue