MCPcopy Create free account
hub / github.com/BirolLab/RNA-Bloom / getLengthNormalizedReadCounts

Method getLengthNormalizedReadCounts

src/rnabloom/olc/Layout.java:4480–4505  ·  view source on GitHub ↗
(String pafPath, Set<String> skipSet)

Source from the content-addressed store, hash-verified

4478 }
4479
4480 public HashMap<String, Float> getLengthNormalizedReadCounts(String pafPath, Set<String> skipSet) throws IOException {
4481 HashMap<String, Float> counts = new HashMap<>();
4482
4483 PafReader reader = new PafReader(pafPath);
4484 String prevName = null;
4485 ArrayList<StrandedOverlap> targets = new ArrayList<>();
4486 for (PafRecord r = new PafRecord(); reader.hasNext();) {
4487 reader.next(r);
4488
4489 if (!r.qName.equals(prevName)) {
4490 updateCounts(targets, counts);
4491 targets = new ArrayList<>();
4492 prevName = r.qName;
4493 }
4494
4495 if (!skipSet.contains(r.tName)) {
4496 targets.add(pafToStrandedOverlap(r));
4497 }
4498 }
4499 reader.close();
4500
4501 // process the last batch of records
4502 updateCounts(targets, counts);
4503
4504 return counts;
4505 }
4506
4507 public static void main(String[] args) {
4508 try {

Callers 1

extractGreedyPathsMethod · 0.95

Calls 8

hasNextMethod · 0.95
nextMethod · 0.95
updateCountsMethod · 0.95
pafToStrandedOverlapMethod · 0.95
closeMethod · 0.95
containsMethod · 0.80
addMethod · 0.65
equalsMethod · 0.45

Tested by

no test coverage detected