Skip to content

Commit

Permalink
adjust threshold for number of solid kmers
Browse files Browse the repository at this point in the history
  • Loading branch information
kmnip committed Dec 24, 2022
1 parent a3f10ea commit 4743d22
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 5 deletions.
4 changes: 3 additions & 1 deletion src/rnabloom/RNABloom.java
Original file line number Diff line number Diff line change
Expand Up @@ -3960,7 +3960,9 @@ public ArrayList<BitSequence> correctLongReadsMultithreaded(String[] inputFastxP
boolean trimArtifact,
boolean storeReads) throws InterruptedException, IOException, Exception {

int minNumSolidKmers = Math.max(0, (int) Math.floor((minSeqLen-k+1) * percentIdentity / k));
int minNumSolidKmers = Math.max(0, (int) Math.floor(minSeqLen/100.0));
//int minNumSolidKmers = Math.max(0, (int) Math.floor((minSeqLen-k+1) * percentIdentity / k));

long numReads = 0;
ArrayBlockingQueue<Sequence2> outputQueue = new ArrayBlockingQueue<>(maxSampleSize);

Expand Down
10 changes: 6 additions & 4 deletions src/rnabloom/util/GraphUtils.java
Original file line number Diff line number Diff line change
Expand Up @@ -3097,10 +3097,12 @@ public static ArrayList<Kmer> correctLongSequenceWindowed(ArrayList<Kmer> kmers,
int windowSize) {

int numNeeded = minNumSolidKmers;
for (Kmer kmer : kmers) {
if (kmer.count >= minKmerCov) {
if (--numNeeded <= 0) {
break;
if (numNeeded > 0) {
for (Kmer kmer : kmers) {
if (kmer.count >= minKmerCov) {
if (--numNeeded <= 0) {
break;
}
}
}
}
Expand Down

0 comments on commit 4743d22

Please sign in to comment.