use of uk.ac.babraham.SeqMonk.DataTypes.Sequence.HiCHitCollection in project SeqMonk by s-andrews.
the class HeatmapMatrix method getTotalCounts.
private void getTotalCounts(int[] cisCounts, int[] transCounts) {
for (int p = 0; p < probes.length; p++) {
if (p % 100 == 0) {
Enumeration<ProgressListener> en = listeners.elements();
while (en.hasMoreElements()) {
en.nextElement().progressUpdated("Getting probe total counts", p, probes.length);
}
if (cancel) {
return;
}
}
HiCHitCollection hits = dataSet.getHiCReadsForProbe(probes[p].probe);
String[] names = hits.getChromosomeNamesWithHits();
for (int c = 0; c < names.length; c++) {
if (names[c].equals(probes[p].probe.chromosome().name())) {
cisCounts[p] = hits.getSourcePositionsForChromosome(names[c]).length;
} else {
transCounts[p] += hits.getSourcePositionsForChromosome(names[c]).length;
}
}
}
}
Aggregations