use of gridss.analysis.CigarDetailMetrics in project gridss by PapenfussLab.
the class IdsvSamFileMetricsTest method wrapper_inner_metrics.
@Test
public void wrapper_inner_metrics() {
IdsvMetrics im = new IdsvMetrics();
InsertSizeMetrics ism = new InsertSizeMetrics();
MapqMetrics mqm = new MapqMetrics();
List<CigarDetailMetrics> sc = new ArrayList<CigarDetailMetrics>();
InsertSizeDistribution isd = new InsertSizeDistribution(new int[] { 1 }, new double[] { 1 });
IdsvSamFileMetrics metrics = new IdsvSamFileMetrics(ism, im, mqm, isd, sc);
assertEquals(im, metrics.getIdsvMetrics());
assertEquals(isd, metrics.getInsertSizeDistribution());
assertEquals(ism, metrics.getInsertSizeMetrics());
assertEquals(sc, metrics.getCigarDetailMetrics());
assertEquals(mqm, metrics.getMapqMetrics());
}
use of gridss.analysis.CigarDetailMetrics in project gridss by PapenfussLab.
the class ScoringComparisonTest method printSoftClipComparison.
private void printSoftClipComparison(VariantScoringModel model1, VariantScoringModel model2) {
List<CigarDetailMetrics> sc = CigarSizeDistributionTest.data_778();
IdsvSamFileMetrics metrics = new IdsvSamFileMetrics(null, null, null, null, sc);
System.out.println("Split Read:");
System.out.println("mapq1,mapq2,sclength,score1,score2");
for (int i = 0; i < mapq.length; i++) {
int mapq1 = mapq[i];
for (int j = i; j < mapq.length; j++) {
int mapq2 = mapq[j];
for (int scLength = 0; scLength < sc.size(); scLength += 5) {
System.out.println(String.format("%d,%d,%d,%f,%f", mapq1, mapq2, scLength, model1.scoreSplitRead(metrics, scLength, mapq1, mapq2), model2.scoreSplitRead(metrics, scLength, mapq1, mapq2)));
}
}
}
System.out.println("SoftClip:");
System.out.println("mapq1,sclength,score1,score2");
for (int i = 0; i < mapq.length; i++) {
int mapq1 = mapq[i];
for (int scLength = 0; scLength < sc.size(); scLength += 5) {
System.out.println(String.format("%d,%d,%f,%f", mapq1, scLength, model1.scoreSoftClip(metrics, scLength, mapq1), model2.scoreSoftClip(metrics, scLength, mapq1)));
}
}
}
Aggregations