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

Method run

src/rnabloom/RNABloom.java:3699–3859  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

3697 }
3698
3699 @Override
3700 public void run() {
3701 //boolean stranded = graph.isStranded();
3702
3703 try {
3704 String[] nameSeqPair;
3705 while((nameSeqPair = itr.next()) != null) {
3706 ++numReads;
3707 String seq = reverseComplement ? reverseComplement(nameSeqPair[1]) : nameSeqPair[1];
3708 boolean kept = false;
3709
3710 if (seq.length() >= k) {
3711 String name = nameSeqPair[0];
3712
3713 boolean hasPolyA = false;
3714
3715 if (minPolyATailLengthRequired > 0) {
3716 Interval tailRegion = polyaFinder.findPolyATail(seq);
3717 if (strandSpecific) {
3718 if (tailRegion != null && tailRegion.end < seq.length()) {
3719 seq = seq.substring(0, tailRegion.end);
3720 hasPolyA = true;
3721 }
3722 }
3723 else {
3724 Interval headRegion = polyaFinder.findPolyTHead(seq);
3725
3726 if (tailRegion != null && headRegion == null) {
3727 if (tailRegion.end < seq.length()) {
3728 seq = seq.substring(0, tailRegion.end);
3729 }
3730 hasPolyA = true;
3731 }
3732 else if (tailRegion == null && headRegion != null) {
3733 if (headRegion.start > 0) {
3734 seq = seq.substring(headRegion.start);
3735 }
3736 seq = reverseComplement(seq);
3737 hasPolyA = true;
3738 }
3739 else if (tailRegion != null && headRegion != null) {
3740// boolean hasPas = polyaFinder.hasPolyASignal(seq, tailRegion.start);
3741// boolean hasPasRC = polyaFinder.hasPolyASignalRC(seq, headRegion.end);
3742//
3743// if (hasPas && !hasPasRC) {
3744// if (headRegion.end < tailRegion.end) {
3745// // remove polyT head
3746// seq = seq.substring(headRegion.end, tailRegion.end);
3747// hasPolyA = true;
3748// }
3749// }
3750// else if (!hasPas && hasPasRC) {
3751// if (headRegion.start < tailRegion.start) {
3752// // remove polyA tail
3753// seq = reverseComplement(seq.substring(headRegion.start, tailRegion.start));
3754// hasPolyA = true;
3755// }
3756// }

Callers

nothing calls this directly

Calls 10

findPolyATailMethod · 0.80
findPolyTHeadMethod · 0.80
assembleValidKmersMethod · 0.80
nextMethod · 0.65
reverseComplementMethod · 0.45
sizeMethod · 0.45
getKmersMethod · 0.45

Tested by

no test coverage detected