Skip to content

Commit 4743d22

Browse files
committed
adjust threshold for number of solid kmers
1 parent a3f10ea commit 4743d22

File tree

2 files changed

+9
-5
lines changed

2 files changed

+9
-5
lines changed

src/rnabloom/RNABloom.java

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3960,7 +3960,9 @@ public ArrayList<BitSequence> correctLongReadsMultithreaded(String[] inputFastxP
39603960
boolean trimArtifact,
39613961
boolean storeReads) throws InterruptedException, IOException, Exception {
39623962

3963-
int minNumSolidKmers = Math.max(0, (int) Math.floor((minSeqLen-k+1) * percentIdentity / k));
3963+
int minNumSolidKmers = Math.max(0, (int) Math.floor(minSeqLen/100.0));
3964+
//int minNumSolidKmers = Math.max(0, (int) Math.floor((minSeqLen-k+1) * percentIdentity / k));
3965+
39643966
long numReads = 0;
39653967
ArrayBlockingQueue<Sequence2> outputQueue = new ArrayBlockingQueue<>(maxSampleSize);
39663968

src/rnabloom/util/GraphUtils.java

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3097,10 +3097,12 @@ public static ArrayList<Kmer> correctLongSequenceWindowed(ArrayList<Kmer> kmers,
30973097
int windowSize) {
30983098

30993099
int numNeeded = minNumSolidKmers;
3100-
for (Kmer kmer : kmers) {
3101-
if (kmer.count >= minKmerCov) {
3102-
if (--numNeeded <= 0) {
3103-
break;
3100+
if (numNeeded > 0) {
3101+
for (Kmer kmer : kmers) {
3102+
if (kmer.count >= minKmerCov) {
3103+
if (--numNeeded <= 0) {
3104+
break;
3105+
}
31043106
}
31053107
}
31063108
}

0 commit comments

Comments
 (0)