Skip to content

Commit

Permalink
Merge pull request #20 from ADerr/2016-04-26_singlecell
Browse files Browse the repository at this point in the history
Added reporting of "Total aligned UMIs" and "Total de-duped UMIs" to
  • Loading branch information
ADerr authored Jun 15, 2016
2 parents 546d097 + 6ac2216 commit 6bc10b2
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions src/java/umms/core/utils/InDropPreprocess.java
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,8 @@ public InDropPreprocess(HashMap<String,ArrayList<File>> bamFiles,
File outFile;
int readsIn = 0;
int readsOut = 0;
int totalAlignedUmis = 0;
int totalDedupedUmis = 0;

/* First, build the exon interval map */
HashMap<String, HashMap<String, IntervalTree<String>>> eMap = buildExonIntervalMap(annotations, wExt, stranded, task);
Expand Down Expand Up @@ -138,8 +140,12 @@ public InDropPreprocess(HashMap<String,ArrayList<File>> bamFiles,
// check if read start overlaps any transcript in the annotations:
Vector<String> oLaps = readStartOverlap(r, eMap);
if (!oLaps.isEmpty()) {
// increment the totalAlignedUmis counter:
totalAlignedUmis+=1;
// if so, extract the cell barcode and UMI, and add counts for the overlapping transcript(s)
if (updateUmiCounts(r,oLaps,umiCount)) {
// only update the totalDedupedUmis counter when writing an alignment:
totalDedupedUmis+=1;
/* write this read out as the exemplar read for this cell/transcript/UMI */
bamWriter.addAlignment(r);
writeCount+=1;
Expand Down Expand Up @@ -171,6 +177,7 @@ public InDropPreprocess(HashMap<String,ArrayList<File>> bamFiles,
}
}
logger.info("Preprocessing complete: Total reads in: "+readsIn+" Total reads out: "+readsOut);
logger.info("Total aligned UMIs: "+totalAlignedUmis+" Total de-duped UMIs: "+totalDedupedUmis);
}

public HashMap<String,ArrayList<File>> getPreprocessedFiles() {
Expand Down

0 comments on commit 6bc10b2

Please sign in to comment.