[med-svn] [Git][med-team/bbmap][master] 4 commits: routine-update: New upstream version
Andreas Tille (@tille)
gitlab at salsa.debian.org
Tue Sep 20 08:55:47 BST 2022
Andreas Tille pushed to branch master at Debian Med / bbmap
Commits:
36c17def by Andreas Tille at 2022-09-20T09:47:38+02:00
routine-update: New upstream version
- - - - -
32ffdc22 by Andreas Tille at 2022-09-20T09:47:39+02:00
New upstream version 38.99+dfsg
- - - - -
79987e17 by Andreas Tille at 2022-09-20T09:47:51+02:00
Update upstream source from tag 'upstream/38.99+dfsg'
Update to upstream version '38.99+dfsg'
with Debian dir eafe61a578220a5623e61cac3303a8af9c5e9c7f
- - - - -
5a9190b3 by Andreas Tille at 2022-09-20T09:51:32+02:00
routine-update: Ready to upload to unstable
- - - - -
17 changed files:
- README.md
- bbcms.sh
- bbmap.sh
- current/bloom/KCountArray.java
- current/bloom/KCountArray3.java
- current/bloom/KCountArray4.java
- current/bloom/KCountArray4MT.java
- current/bloom/KCountArray5MT.java
- current/bloom/KCountArray6MT.java
- current/bloom/KCountArray7MT.java
- current/bloom/KCountArray7MTA.java
- current/bloom/KCountArray8MT.java
- current/jgi/KmerNormalize.java
- current/shared/Parser.java
- current/shared/Shared.java
- current/shared/TrimRead.java
- debian/changelog
Changes:
=====================================
README.md
=====================================
@@ -3,4 +3,4 @@
# Language: Java, Bash
# Information about documentation is in /docs/readme.txt.
-# Version 38.98
+# Version 38.99
=====================================
bbcms.sh
=====================================
@@ -3,7 +3,7 @@
usage(){
echo "
Written by Brian Bushnell
-Last modified August 8, 2022
+Last modified September 15, 2022
Description: Error corrects reads and/or filters by depth, storing
kmer counts in a count-min sketch (a Bloom filter variant).
@@ -64,8 +64,8 @@ cells= Option to set the number of cells manually. By default this
to set this is to ensure deterministic output.
seed=0 This will change the hash function used. Useful if running
iteratively with a very full table. -1 uses a random seed.
-lockedincrement=t Increases counting accuracy for a slight speed penalty.
- Could have low performance on very low-complexity sequence.
+symmetricwrite=t (sw) Increases counting accuracy for a slight speed penalty.
+ Could be slow on very low-complexity sequence.
Depth filtering parameters:
mincount=0 If positive, reads with kmer counts below mincount will
=====================================
bbmap.sh
=====================================
@@ -4,7 +4,7 @@ usage(){
echo "
BBMap
Written by Brian Bushnell, from Dec. 2010 - present
-Last modified February 24, 2022
+Last modified September 15, 2022
Description: Fast and accurate splice-aware read aligner.
Please read bbmap/docs/guides/BBMapGuide.txt for more information.
=====================================
current/bloom/KCountArray.java
=====================================
@@ -144,8 +144,30 @@ public abstract class KCountArray implements Serializable {
public abstract void write(long key, int value);
- public void increment(long key){incrementAndReturn(key, 1);}
- public void decrement(long key){decrementAndReturn(key, 1);}
+ //TODO: Consider adding a boolean for return old value.
+ public final void increment(long key){increment(key, 1);}
+ public final void decrement(long key){decrement(key, 1);}
+
+ /** Returns nothing for simplicity. */
+ public abstract void increment(long key, int incr);
+
+ /** Returns unincremented value */
+ public abstract int incrementAndReturnUnincremented(long key, int incr);
+
+// /** Returns unincremented value */
+// public final int incrementAndReturnUnincremented(Kmer kmer, int incr){
+// return incrementAndReturnUnincremented(kmer.xor(), incr);
+// }
+
+ //For long kmers.
+ public int incrementAndReturnUnincremented(long[] keys, int incr){
+ throw new RuntimeException("Unimplemented.");
+ }
+
+ /** Optional method. */
+ public void decrement(long key, int incr){
+ throw new RuntimeException("This class "+getClass().getName()+" does not support decrement.");
+ }
public final int readPrecise(long key, int k, boolean makeCanonical){
assert(k<=32);
@@ -200,26 +222,6 @@ public abstract class KCountArray implements Serializable {
}
}
}
-
- /** Returns incremented value. Optional method. */
- public abstract int incrementAndReturn(long key, int incr);
-
- /** Returns decremented value. Optional method. */
- public int decrementAndReturn(long key, int incr){
- throw new RuntimeException("This class "+getClass().getName()+" does not support decrementAndReturn.");
- }
-
- /** Returns unincremented value */
- public abstract int incrementAndReturnUnincremented(long key, int incr);
-
-// /** Returns unincremented value */
-// public final int incrementAndReturnUnincremented(Kmer kmer, int incr){
-// return incrementAndReturnUnincremented(kmer.xor(), incr);
-// }
-
- public int incrementAndReturnUnincremented(long[] keys, int incr){
- throw new RuntimeException("Unimplemented.");
- }
public abstract long[] transformToFrequency();
public final long[] transformToFrequency(int[][] matrix){
=====================================
current/bloom/KCountArray3.java
=====================================
@@ -54,7 +54,7 @@ public class KCountArray3 extends KCountArray {
// static int count138=0;
@Override
- public int incrementAndReturn(long key, int incr){
+ public void increment(long key, int incr){
if(verbose){System.err.println("*** Incrementing "+key);}
// if(key==138){
// assert(count138==0) : count138;
@@ -73,7 +73,7 @@ public class KCountArray3 extends KCountArray {
word=(value<<cellShift)|(word&~((valueMask)<<cellShift));
array[index]=word;
if(verbose){System.err.println("Returning "+value);}
- return (int)value;
+ //return (int)value;
}
/** Returns unincremented value */
=====================================
current/bloom/KCountArray4.java
=====================================
@@ -117,7 +117,7 @@ public class KCountArray4 extends KCountArray {
}
@Override
- public int incrementAndReturn(final long rawKey, int incr){
+ public void increment(final long rawKey, int incr){
// verbose=(rawKey==32662670693L);
if(verbose){System.err.println("\n*** Incrementing raw key "+rawKey+" ***");}
// verbose=true;
@@ -128,11 +128,11 @@ public class KCountArray4 extends KCountArray {
key2=hash(key2, 0);
int x=incrementHashedIfAtMost(key2, incr, maxValue-1);
assert(x>=incr) : "original=?, new should be >="+(incr)+", new="+read(rawKey)+", max="+maxValue+", key="+rawKey;
- return x;
+ //return x;
}
final int min=read(rawKey);
- if(min>=maxValue){return maxValue;}
+ if(min>=maxValue){return /*maxValue*/;}
assert(key2==rawKey);
for(int i=0; i<hashes; i++){
@@ -147,7 +147,7 @@ public class KCountArray4 extends KCountArray {
}
// assert(read(rawKey)==min+incr) : "original="+min+", new should be "+(min+incr)+", new="+read(rawKey)+", max="+maxValue;
// assert(false);
- return min(min+incr, maxValue);
+ //return min(min+incr, maxValue);
}
/** Returns unincremented value */
=====================================
current/bloom/KCountArray4MT.java
=====================================
@@ -138,7 +138,11 @@ public class KCountArray4MT extends KCountArray {
// }
@Override
- public void increment(final long rawKey){
+ public void increment(final long rawKey, int amt){
+ for(int i=0; i<amt; i++){increment0(rawKey, 1);}
+ }
+
+ public void increment0(final long rawKey, int amt){
if(verbose){System.err.println("\n*** Incrementing raw key "+rawKey+" ***");}
long key2=rawKey;
@@ -215,11 +219,6 @@ public class KCountArray4MT extends KCountArray {
}
}
- @Override
- public int incrementAndReturn(long key, int incr){
- throw new RuntimeException("Operation not supported.");
- }
-
/** Returns unincremented value */
@Override
public int incrementAndReturnUnincremented(long key, int incr){
=====================================
current/bloom/KCountArray5MT.java
=====================================
@@ -122,8 +122,13 @@ public class KCountArray5MT extends KCountArray {
throw new RuntimeException("Not allowed for this class.");
}
+ //Slow
@Override
- public void increment(final long rawKey){
+ public void increment(final long rawKey, int amt){
+ for(int i=0; i<amt; i++){increment0(rawKey);}
+ }
+
+ public void increment0(final long rawKey){
if(verbose){System.err.println("\n*** Incrementing raw key "+rawKey+" ***");}
buffer[bufferlen]=hash(rawKey, 0);
@@ -154,11 +159,6 @@ public class KCountArray5MT extends KCountArray {
}
}
- @Override
- public int incrementAndReturn(long key, int incr){
- throw new RuntimeException("Operation not supported.");
- }
-
/** Returns unincremented value */
@Override
public int incrementAndReturnUnincremented(long key, int incr){
=====================================
current/bloom/KCountArray6MT.java
=====================================
@@ -127,8 +127,13 @@ public class KCountArray6MT extends KCountArray {
throw new RuntimeException("Not allowed for this class.");
}
+ //Slow
@Override
- public void increment(final long rawKey){
+ public void increment(final long rawKey, int amt){
+ for(int i=0; i<amt; i++){increment0(rawKey);}
+ }
+
+ public void increment0(final long rawKey){
if(verbose){System.err.println("\n*** Incrementing raw key "+rawKey+" ***");}
long key1=hash(rawKey, 3);
@@ -156,11 +161,6 @@ public class KCountArray6MT extends KCountArray {
}
}
- @Override
- public int incrementAndReturn(long key, int incr){
- throw new RuntimeException("Operation not supported.");
- }
-
/** Returns unincremented value */
@Override
public int incrementAndReturnUnincremented(long key, int incr){
=====================================
current/bloom/KCountArray7MT.java
=====================================
@@ -158,8 +158,13 @@ public class KCountArray7MT extends KCountArray {
}
}
+ //Slow
@Override
- public void increment(final long rawKey){
+ public void increment(final long rawKey, int amt){
+ for(int i=0; i<amt; i++){increment0(rawKey);}
+ }
+
+ public void increment0(final long rawKey){
if(verbose){System.err.println("\n*** Incrementing raw key "+rawKey+" ***");}
long key2=rawKey;
@@ -236,11 +241,6 @@ public class KCountArray7MT extends KCountArray {
}
}
- @Override
- public int incrementAndReturn(long key, int incr){
- throw new RuntimeException("Operation not supported.");
- }
-
/** Returns unincremented value */
@Override
public int incrementAndReturnUnincremented(long key, int incr){
=====================================
current/bloom/KCountArray7MTA.java
=====================================
@@ -266,33 +266,43 @@ public final class KCountArray7MTA extends KCountArray {
}
@Override
- public final void increment(final long rawKey){
- if(verbose){System.err.println("\n*** Incrementing raw key "+rawKey+" ***");}
-
- if(prefilter!=null){
- int x=prefilter.read(rawKey);
- if(x<prefilterLimit){return;}
- }
-
- if(useLocks){incrementLocked(rawKey);}
- else{incrementUnlocked(rawKey);}
+ public final void increment(final long rawKey, final int amt){
+// if(verbose){System.err.println("\n*** Incrementing raw key "+rawKey+" ***");}
+//
+// if(prefilter!=null){
+// int x=prefilter.read(rawKey);
+// if(x<prefilterLimit){return;/* x;*/}
+// }
+//
+// if(useLocks){incrementLocked(rawKey, amt);}
+// else{incrementUnlocked(rawKey, amt);}
+ incrementAndReturnUnincremented(rawKey, amt);
}
- private void incrementUnlocked(long rawKey){
+ /*
+ private void incrementUnlocked(long rawKey, int amt){
long key2=rawKey;
+// int min=maxValue;
for(int i=0; i<hashes; i++){
key2=hash(key2, i);
if(verbose){System.err.println("key2="+key2+", value="+readHashed(key2));}
- incrementHashedLocal(key2);
+// min=min(min, incrementHashedLocal(key2, amt));
+ incrementHashedLocal(key2, amt);
key2=Long.rotateRight(key2, hashBits);
}
+// return min;
}
- private void incrementLocked(long rawKey){
+ private void incrementLocked(long rawKey, int amt){
+ assert(amt>0) : "Don't increment by zero, and negatives should use decrement amt="+amt;
final Lock lock=getLock(rawKey);
lock.lock();
final int min=read(rawKey);
- if(min>=maxValue){
+ final long newMinL=Tools.min(min+amt, maxValue);
+ final int newMin=(int)newMinL;
+ assert(newMin==newMinL && newMin>0) : newMin+", "+newMinL+", "+min+", "+amt;
+ if(newMin<=min){
+ assert(newMin==min) : min;
lock.unlock();
return;
}
@@ -300,35 +310,32 @@ public final class KCountArray7MTA extends KCountArray {
for(int i=0; i<hashes; i++){
key2=hash(key2, i);
if(verbose){System.err.println("key2="+key2+", value="+readHashed(key2));}
- incrementHashedLocal_ifAtMost(key2, min);
+ //incrementHashedLocal_ifAtMost(key2, min);
+ incrementHashedLocal_toAtLeast(key2, newMin);
key2=Long.rotateRight(key2, hashBits);
}
lock.unlock();
+// return max(min, newMin);
}
+ */
@Override
- public final void decrement(final long rawKey){
+ public final void decrement(final long rawKey, int amt){
if(verbose){System.err.println("\n*** Decrementing raw key "+rawKey+" ***");}
- assert(prefilter!=null);
+ assert(prefilter!=null); //Why?
long key2=rawKey;
+// int min=maxValue;
for(int i=0; i<hashes; i++){
key2=hash(key2, i);
if(verbose){System.err.println("key2="+key2+", value="+readHashed(key2));}
-// assert(readHashed(key2)==0);
-
-// int bnum=(int)(key2&arrayMask);
- decrementHashedLocal(key2);
-// assert(read(rawKey)<=min+incr) : "i="+i+", original="+min+", new should be <="+(min+incr)+", new="+read(rawKey)+", max="+maxValue+", key="+rawKey;
-// assert(readHashed(key2)>=min+incr) : "i="+i+", original="+min+", new should be <="+(min+incr)+", new="+read(rawKey)+", max="+maxValue+", key="+rawKey;
+
+ decrementHashedLocal(key2, amt);
+// min=min(min, decrementHashedLocal(key2, amt));
key2=Long.rotateRight(key2, hashBits);
}
- }
-
- @Override
- public int incrementAndReturn(long key, int incr){
- throw new RuntimeException("Operation not supported.");
+// return min;
}
@Override
@@ -346,6 +353,7 @@ public final class KCountArray7MTA extends KCountArray {
}
private int incrementAndReturnUnincrementedLocked(final long rawKey, final int incr){
+ assert(incr>0) : incr;
final Lock lock=getLock(rawKey);
lock.lock();
final int min=read(rawKey);
@@ -353,12 +361,13 @@ public final class KCountArray7MTA extends KCountArray {
lock.unlock();
return min;
}
+ final int newMin=(int)Tools.min(min+(long)incr, maxValue);
long key2=rawKey;
int value=maxValue;
for(int i=0; i<hashes; i++){
key2=hash(key2, i);
if(verbose){System.err.println("key2="+key2+", value="+readHashed(key2));}
- int x=incrementHashedLocalAndReturnUnincremented_ifAtMost(key2, incr, min);
+ int x=incrementHashedLocalAndReturnUnincremented_toAtLeast(key2, newMin);
value=min(value, x);
key2=Long.rotateRight(key2, hashBits);
}
@@ -395,11 +404,6 @@ public final class KCountArray7MTA extends KCountArray {
for(int keynum=0; keynum<rawKeys.length; keynum++){
key2=hash(key2^rawKeys[keynum], i);
if(verbose){System.err.println("key2="+key2+", value="+readHashed(key2));}
- // assert(readHashed(key2)==0);
-
- // int bnum=(int)(key2&arrayMask);
- // assert(read(rawKey)<=min+incr) : "i="+i+", original="+min+", new should be <="+(min+incr)+", new="+read(rawKey)+", max="+maxValue+", key="+rawKey;
- // assert(readHashed(key2)>=min+incr) : "i="+i+", original="+min+", new should be <="+(min+incr)+", new="+read(rawKey)+", max="+maxValue+", key="+rawKey;
}
int x=incrementHashedLocalAndReturnUnincremented(key2, incr);
value=min(value, x);
@@ -640,7 +644,7 @@ public final class KCountArray7MTA extends KCountArray {
return lock;
}
- private int incrementHashedLocal(long key){
+ private int incrementHashedLocal(long key, int amt){
final int num=(int)(key&arrayMask);
final AtomicIntegerArray array=matrix[num];
key=(key>>>arrayBits)%(cellMod);
@@ -652,14 +656,34 @@ public final class KCountArray7MTA extends KCountArray {
assert(index>=0) : key+", "+cellMod+", "+cellBits+", "+valueMask+", "+arrayMask+", "+index+", "+num;
word=array.get(index);
value=((word>>>cellShift)&valueMask);
- value=min(value+1, maxValue);
+ value=(int)min(value+(long)amt, maxValue);
word2=(value<<cellShift)|(word&~((valueMask)<<cellShift));
}while(word!=word2 && !array.compareAndSet(index, word, word2));
// if(value==1){cellsUsedPersonal.incrementAndGet(num);}
return value;
}
- private int incrementHashedLocal_ifAtMost(long key, final int thresh){
+// private int incrementHashedLocal_ifAtMost(long key, final int thresh){
+// final int num=(int)(key&arrayMask);
+// final AtomicIntegerArray array=matrix[num];
+// key=(key>>>arrayBits)%(cellMod);
+//// key=(key>>>(arrayBits+1))%(cellMod);
+// int index=(int)(key>>>indexShift);
+// int cellShift=(int)(cellBits*key);
+// int value, word, word2;
+// do{
+// assert(index>=0) : key+", "+cellMod+", "+cellBits+", "+valueMask+", "+arrayMask+", "+index+", "+num;
+// word=array.get(index);
+// value=((word>>>cellShift)&valueMask);
+// if(value>thresh){return value;}//Too high; don't increment
+// value=min(value+1, maxValue);
+// word2=(value<<cellShift)|(word&~((valueMask)<<cellShift));
+// }while(word!=word2 && !array.compareAndSet(index, word, word2));
+// return value;
+// }
+
+ private int incrementHashedLocal_toAtLeast(long key, final int newMin){
+ assert(newMin<=maxValue);
final int num=(int)(key&arrayMask);
final AtomicIntegerArray array=matrix[num];
key=(key>>>arrayBits)%(cellMod);
@@ -671,7 +695,7 @@ public final class KCountArray7MTA extends KCountArray {
assert(index>=0) : key+", "+cellMod+", "+cellBits+", "+valueMask+", "+arrayMask+", "+index+", "+num;
word=array.get(index);
value=((word>>>cellShift)&valueMask);
- if(value>thresh){return value;}//Too high; don't increment
+ if(value>=newMin){return value;}//Too high; don't increment
value=min(value+1, maxValue);
word2=(value<<cellShift)|(word&~((valueMask)<<cellShift));
}while(word!=word2 && !array.compareAndSet(index, word, word2));
@@ -697,8 +721,28 @@ public final class KCountArray7MTA extends KCountArray {
return value;
}
- private int incrementHashedLocalAndReturnUnincremented_ifAtMost(long key, int incr, final int thresh){
- assert(incr>=0);
+// private int incrementHashedLocalAndReturnUnincremented_ifAtMost(long key, int incr, final int thresh){
+// assert(incr>=0);
+// final int num=(int)(key&arrayMask);
+// final AtomicIntegerArray array=matrix[num];
+// key=(key>>>arrayBits)%(cellMod);
+//// key=(key>>>(arrayBits+1))%(cellMod);
+// int index=(int)(key>>>indexShift);
+// int cellShift=(int)(cellBits*key);
+// int value, word, word2;
+// do{
+// word=array.get(index);
+// value=((word>>>cellShift)&valueMask);
+// if(value>thresh){return value;}//Too high; don't increment
+// int value2=min(value+incr, maxValue);
+// word2=(value2<<cellShift)|(word&~((valueMask)<<cellShift));
+// }while(word!=word2 && !array.compareAndSet(index, word, word2));
+//// if(value==1){cellsUsedPersonal.incrementAndGet(num);}
+// return value;
+// }
+
+ private int incrementHashedLocalAndReturnUnincremented_toAtLeast(long key, int newMin){
+ assert(newMin>0 && newMin<=maxValue) : newMin;
final int num=(int)(key&arrayMask);
final AtomicIntegerArray array=matrix[num];
key=(key>>>arrayBits)%(cellMod);
@@ -706,18 +750,18 @@ public final class KCountArray7MTA extends KCountArray {
int index=(int)(key>>>indexShift);
int cellShift=(int)(cellBits*key);
int value, word, word2;
+ final int value2s=newMin<<cellShift;
do{
word=array.get(index);
value=((word>>>cellShift)&valueMask);
- if(value>thresh){return value;}//Too high; don't increment
- int value2=min(value+incr, maxValue);
- word2=(value2<<cellShift)|(word&~((valueMask)<<cellShift));
+ if(value>=newMin){return value;}//Too high; don't increment
+ word2=value2s|(word&~((valueMask)<<cellShift));
}while(word!=word2 && !array.compareAndSet(index, word, word2));
// if(value==1){cellsUsedPersonal.incrementAndGet(num);}
return value;
}
- private int decrementHashedLocal(long key){
+ private int decrementHashedLocal(long key, int amt){
final int num=(int)(key&arrayMask);
final AtomicIntegerArray array=matrix[num];
key=(key>>>arrayBits)%(cellMod);
@@ -728,7 +772,7 @@ public final class KCountArray7MTA extends KCountArray {
do{
word=array.get(index);
value=((word>>>cellShift)&valueMask);
- value=max(value-1, 0);
+ value=max(value-amt, 0);
word2=(value<<cellShift)|(word&~((valueMask)<<cellShift));
}while(word!=word2 && !array.compareAndSet(index, word, word2));
// if(value==1){cellsUsedPersonal.incrementAndGet(num);}
=====================================
current/bloom/KCountArray8MT.java
=====================================
@@ -181,8 +181,13 @@ public class KCountArray8MT extends KCountArray {
}
}
+ //Slow
@Override
- public void increment(final long rawKey){
+ public void increment(final long rawKey, int amt){
+ for(int i=0; i<amt; i++){increment0(rawKey);}
+ }
+
+ public void increment0(final long rawKey){
if(verbose){System.err.println("\n*** Incrementing raw key "+rawKey+" ***");}
if(prefilter!=null){
int pre=prefilter.read(rawKey);
@@ -263,11 +268,6 @@ public class KCountArray8MT extends KCountArray {
}
}
- @Override
- public int incrementAndReturn(long key, int incr){
- throw new RuntimeException("Operation not supported.");
- }
-
/** Returns unincremented value */
@Override
public int incrementAndReturnUnincremented(long key, int incr){
=====================================
current/jgi/KmerNormalize.java
=====================================
@@ -698,6 +698,19 @@ public class KmerNormalize {
targetDepthF, targetDepthF, targetDepthF, maxDepth, minDepth, minKmersOverMinDepth, depthPercentile, tossErrorReadsF, rbb, discardBadOnlyF,
highPercentile, lowPercentile, errorDetectRatio, hthresh, lthresh, fixSpikes, countup, renameReads);
}else{
+
+// assert(false) : "=auto"+", m="+memory+", cb="+cbits+", cl="+cells+", pcb="+precbits+
+// "\n pcl="+precells+", bp="+buildpasses+", h="+hashes+", ph="+prehashes+", k="+k+
+// "\n ="+maxReads+", ="+tablereads+", ="+minq+", ="+buildStepsize+
+// "\n ="+in1+", ="+in2+
+// "\n ="+outKeep1+", ="+outToss1+", ="+outLow1+", ="+outMid1+", ="+outHigh1+", ="+outUnc1+
+// "\n ="+outKeep2+", ="+outToss2+", ="+outLow2+", ="+outMid2+", ="+outHigh2+", ="+outUnc2+
+// "\n ="+khistFile+", ="+rhistFile+", ="+peakFile+", ="+extra+
+// "\n ="+targetDepthF+", ="+targetDepthF+", ="+targetDepthF+", ="+maxDepth+", ="+minDepth+
+// "\n ="+minKmersOverMinDepth+", ="+depthPercentile+", ="+tossErrorReadsF+", ="+rbb+", ="+discardBadOnlyF+
+// "\n ="+highPercentile+", ="+lowPercentile+", ="+errorDetectRatio+", ="+hthresh+", ="+lthresh+
+// "\n ="+fixSpikes+", ="+countup+", ="+renameReads;
+
CORRECT_ERRORS_THIS_PASS=(USE_ECC1 || USE_ECCF);
TRIM_LEFT_THIS_PASS=(TRIM_LEFT);
TRIM_RIGHT_THIS_PASS=(TRIM_RIGHT);
@@ -869,13 +882,16 @@ public class KmerNormalize {
if(khistFile!=null || peakFile!=null){USE_KHISTOGRAM=true;}
if(rhistFile!=null){USE_RHISTOGRAM=true;}
- final int maxCount=(int)(cbits>16 ? Integer.MAX_VALUE : (1L<<cbits)-1);
+ final int maxCount=(int)(cbits>16 ? Shared.MAX_ARRAY_LEN-1 : (1L<<cbits)-1);
assert(maxCount>0);
- HIST_LEN_PRINT=Tools.max(1, Tools.min(HIST_LEN_PRINT, maxCount+1));
+
+// assert(false) : maxCount+", "+HIST_LEN_PRINT+", "+HIST_LEN+", "+THREAD_HIST_LEN;
+
+ HIST_LEN_PRINT=Tools.max(2, Tools.min(HIST_LEN_PRINT, maxCount+1));
assert(HIST_LEN_PRINT<=Integer.MAX_VALUE) : HIST_LEN_PRINT+", "+Integer.MAX_VALUE;
HIST_LEN=(int)Tools.min(maxCount+1, Tools.max(HIST_LEN_PRINT, HIST_LEN));
THREAD_HIST_LEN=Tools.min(THREAD_HIST_LEN, HIST_LEN);
-
+
khistogram=new AtomicLongArray(HIST_LEN);
if(USE_RHISTOGRAM && rhistFile!=null){
rhistogram=new AtomicLongArray(HIST_LEN);
=====================================
current/shared/Parser.java
=====================================
@@ -439,7 +439,7 @@ public class Parser {
}
public boolean parseMapping(String arg, String a, String b){
- if(a.equals("idfilter") || a.equals("identityfilter") || a.equals("minidfilter") || a.equals("minidentityfilter") || a.equals("minid")){
+ if(a.equals("idfilter") || a.equals("identityfilter") || a.equals("minidfilter") || a.equals("minidentityfilter")){
minIdFilter=Float.parseFloat(b);
if(minIdFilter>1f){minIdFilter/=100;}
assert(minIdFilter<=1f) : "idfilter should be between 0 and 1.";
@@ -737,7 +737,8 @@ public class Parser {
TaxTree.protFull=true;
}
- else if(a.equalsIgnoreCase("lockedincrement")){
+ else if(a.equalsIgnoreCase("lockedincrement") || a.equalsIgnoreCase("symmetricwrite")
+ || a.equalsIgnoreCase("symmetric") || a.equalsIgnoreCase("sw")){
if("auto".equalsIgnoreCase(b)){
KCountArray.LOCKED_INCREMENT=true;
KCountArray.SET_LOCKED_INCREMENT=false;
=====================================
current/shared/Shared.java
=====================================
@@ -125,8 +125,8 @@ public class Shared {
public static final int GAPCOST=Tools.max(1, GAPLEN/64);
public static final byte GAPC='-';
- public static String BBMAP_VERSION_STRING="38.98";
- public static String BBMAP_VERSION_NAME="Mistletoe";
+ public static String BBMAP_VERSION_STRING="38.99";
+ public static String BBMAP_VERSION_NAME="Hackberry";
public static boolean TRIM_READ_COMMENTS=false;
public static boolean TRIM_RNAME=false; //For mapped sam reads
=====================================
current/shared/TrimRead.java
=====================================
@@ -680,7 +680,7 @@ public final class TrimRead implements Serializable {
public static int trimReadWithMatch(final Read r, final SamLine sl,
int leftTrimAmount, int rightTrimAmount, int minFinalLength, long scafLen, boolean trimClip){
if(r.bases==null || (leftTrimAmount<1 && rightTrimAmount<1 && !trimClip)){return 0;}
- if(!r.containsNonM() && !trimClip){
+ if(!r.containsNonM() && !trimClip){//TODO: H not handled
return trimReadWithMatchFast(r, sl, leftTrimAmount, rightTrimAmount, minFinalLength);
}
=====================================
debian/changelog
=====================================
@@ -1,3 +1,9 @@
+bbmap (38.99+dfsg-1) unstable; urgency=medium
+
+ * New upstream version
+
+ -- Andreas Tille <tille at debian.org> Tue, 20 Sep 2022 09:48:07 +0200
+
bbmap (38.98+dfsg-1) unstable; urgency=medium
* New upstream version
View it on GitLab: https://salsa.debian.org/med-team/bbmap/-/compare/346038b3cda2e049556d42992e92585b82c151f4...5a9190b335ec247db353f0cbae661938eef1a627
--
View it on GitLab: https://salsa.debian.org/med-team/bbmap/-/compare/346038b3cda2e049556d42992e92585b82c151f4...5a9190b335ec247db353f0cbae661938eef1a627
You're receiving this email because of your account on salsa.debian.org.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://alioth-lists.debian.net/pipermail/debian-med-commit/attachments/20220920/7feca900/attachment-0001.htm>
More information about the debian-med-commit
mailing list