diff -Nru bbmap-38.89+dfsg/current/assemble/BubblePopper.java bbmap-38.90+dfsg/current/assemble/BubblePopper.java --- bbmap-38.89+dfsg/current/assemble/BubblePopper.java 2021-01-14 19:11:25.000000000 +0000 +++ bbmap-38.90+dfsg/current/assemble/BubblePopper.java 2021-02-03 19:55:32.000000000 +0000 @@ -636,9 +636,13 @@ } } } - if(verbose){System.err.println("Mid nodes concur.");} - assert(leftDest<0 || leftDest==center.id); //TODO: This triggered once nondeterministially + if(leftDest>=0 && leftDest!=center.id){return false;}//workaround for actual assertion failure + assert(leftDest<0 || leftDest==center.id) : + leftDest+", "+center.id; //TODO: This triggered once nondeterministially; determine why + if(rightDest>=0 && rightDest!=center.id){return false;}//workaround for potential assertion failure assert(rightDest<0 || rightDest==dest.id); + + if(verbose){System.err.println("Mid nodes concur.");} return leftDest>=0 && rightDest>=0; } diff -Nru bbmap-38.89+dfsg/current/clump/KmerReduce.java bbmap-38.90+dfsg/current/clump/KmerReduce.java --- bbmap-38.89+dfsg/current/clump/KmerReduce.java 2021-01-26 18:42:56.000000000 +0000 +++ bbmap-38.90+dfsg/current/clump/KmerReduce.java 2021-02-03 19:43:01.000000000 +0000 @@ -12,6 +12,7 @@ import fileIO.ReadWrite; import jgi.BBMerge; import kmer.KmerTableSet; +import shared.KillSwitch; import shared.Parse; import shared.Parser; import shared.PreParser; @@ -351,7 +352,7 @@ /*--------------------------------------------------------------*/ public byte[] toBytes(final long kmer){ - byte[] dest=new byte[k]; + byte[] dest=KillSwitch.allocByte1D(k); fill(kmer, dest, 0); return dest; } diff -Nru bbmap-38.89+dfsg/current/consensus/BaseGraph.java bbmap-38.90+dfsg/current/consensus/BaseGraph.java --- bbmap-38.89+dfsg/current/consensus/BaseGraph.java 2020-05-22 22:45:04.000000000 +0000 +++ bbmap-38.90+dfsg/current/consensus/BaseGraph.java 2021-02-03 19:43:22.000000000 +0000 @@ -8,6 +8,7 @@ import aligner.FlatAligner2; import dna.AminoAcid; import prok.GeneCaller; +import shared.KillSwitch; import shared.Tools; import shared.TrimRead; import stream.FASTQ; @@ -606,7 +607,7 @@ insCount=0; // System.err.println("rpos\tdw\trw\tiw"); - final byte[] temp=new byte[2]; + final byte[] temp=KillSwitch.allocByte1D(2); for(int i=0; i=0; i--){ int temp=code&3; @@ -642,7 +643,7 @@ final int stop=frame+blen; final int alen=blen/3; - byte[] out=new byte[alen]; + byte[] out=KillSwitch.allocByte1D(alen); for(int i=2+frame, j=0; i argList=new ArrayList(); { + if(deterministic){argList.add("deterministic");} argList.add("k="+map_k); argList.add("idtag=t"); argList.add("printunmappedcount"); @@ -2866,6 +2868,7 @@ ArrayList argList=new ArrayList(); { + if(deterministic){argList.add("deterministic");} if(ordered){argList.add("ordered");} argList.add("quickmatch"); argList.add("k="+map_k); @@ -2999,6 +3002,7 @@ final String outPre=(outPrefix==null ? outDir : (tmpDir==null ? outDir : tmpDir)+outPrefix); { + if(deterministic){argList.add("deterministic");} if(ordered){argList.add("ordered");} argList.add("minratio=.9"); argList.add("maxindel=3"); @@ -3873,9 +3877,11 @@ private String out1=null; /** Secondary output reads file */ private String out2=null; - + private boolean deleteTemp=true; + private boolean deterministic=true; + private boolean ordered=false; private boolean dryrun=false; diff -Nru bbmap-38.89+dfsg/current/shared/Shared.java bbmap-38.90+dfsg/current/shared/Shared.java --- bbmap-38.89+dfsg/current/shared/Shared.java 2021-01-28 18:27:03.000000000 +0000 +++ bbmap-38.90+dfsg/current/shared/Shared.java 2021-02-03 19:49:03.000000000 +0000 @@ -124,8 +124,8 @@ public static final int GAPCOST=Tools.max(1, GAPLEN/64); public static final byte GAPC='-'; - public static String BBMAP_VERSION_STRING="38.89"; - public static String BBMAP_VERSION_NAME="Kmer Sets"; + public static String BBMAP_VERSION_STRING="38.90"; + public static String BBMAP_VERSION_NAME="Byte Safety"; public static boolean TRIM_READ_COMMENTS=false; public static boolean TRIM_RNAME=false; //For mapped sam reads diff -Nru bbmap-38.89+dfsg/current/sketch/Sketch.java bbmap-38.90+dfsg/current/sketch/Sketch.java --- bbmap-38.89+dfsg/current/sketch/Sketch.java 2020-01-29 16:51:45.000000000 +0000 +++ bbmap-38.90+dfsg/current/sketch/Sketch.java 2021-02-03 19:57:25.000000000 +0000 @@ -9,6 +9,7 @@ import dna.AminoAcid; import fileIO.ReadWrite; +import shared.KillSwitch; import shared.Tools; import structures.AbstractBitSet; import structures.ByteBuilder; @@ -699,7 +700,7 @@ toHeader(bb); bb.append("\n"); byte[] temp=null; - if(CODING==A48){temp=new byte[12];} + if(CODING==A48){temp=KillSwitch.allocByte1D(12);} for(int i=0; i=QUALCACHE.length){ - byte[] r=new byte[len]; + byte[] r=KillSwitch.allocByte1D(len); Arrays.fill(r, (byte)30); return r; } if(QUALCACHE[len]==null){ synchronized(QUALCACHE){ if(QUALCACHE[len]==null){ - QUALCACHE[len]=new byte[len]; + QUALCACHE[len]=KillSwitch.allocByte1D(len); Arrays.fill(QUALCACHE[len], (byte)30); } } diff -Nru bbmap-38.89+dfsg/current/structures/ByteBuilder.java bbmap-38.90+dfsg/current/structures/ByteBuilder.java --- bbmap-38.89+dfsg/current/structures/ByteBuilder.java 2021-01-26 18:42:54.000000000 +0000 +++ bbmap-38.90+dfsg/current/structures/ByteBuilder.java 2021-02-03 19:59:45.000000000 +0000 @@ -20,17 +20,17 @@ private static final long serialVersionUID = -4786450129730831665L; public ByteBuilder(){ - array=new byte[32]; + array=KillSwitch.allocByte1D(32); } public ByteBuilder(int initial){ assert(initial>=1); - array=new byte[initial]; + array=KillSwitch.allocByte1D(initial); } public ByteBuilder(Object o){ String s=o.toString(); - array=new byte[s.length()+1]; + array=KillSwitch.allocByte1D(s.length()+1); append(s); } @@ -560,7 +560,7 @@ if(array.length<=maxLen){return;} // assert(length<=maxLen) : length+", "+array.length+", "+maxLen; if(length<1){ - array=new byte[maxLen]; + array=KillSwitch.allocByte1D(maxLen); }else{ array=KillSwitch.copyOf(array, maxLen); length=Tools.min(length, maxLen); @@ -645,7 +645,7 @@ public byte[] array; public int length=0; - private final byte[] numbuffer=new byte[40]; + private final byte[] numbuffer=KillSwitch.allocByte1D(40); public static final byte[] numbers=new byte[] {'0', '1', '2', '3', '4', '5', '6', '7', '8', '9'}; public static final byte[] nullBytes="null".getBytes(); diff -Nru bbmap-38.89+dfsg/current/structures/Quantizer.java bbmap-38.90+dfsg/current/structures/Quantizer.java --- bbmap-38.89+dfsg/current/structures/Quantizer.java 2021-01-26 18:42:53.000000000 +0000 +++ bbmap-38.90+dfsg/current/structures/Quantizer.java 2021-02-03 19:43:00.000000000 +0000 @@ -1,5 +1,6 @@ package structures; +import shared.KillSwitch; import shared.Parse; import shared.Tools; import stream.Read; @@ -64,7 +65,7 @@ } private static final byte[] makeQualityRemapArray(byte[] quantizeArray) { - byte[] array=new byte[128]; + byte[] array=KillSwitch.allocByte1D(128); for(int i=0; i Fri, 05 Feb 2021 15:49:08 +0530 + bbmap (38.89+dfsg-1) unstable; urgency=medium * Team Upload. diff -Nru bbmap-38.89+dfsg/docs/changelog.txt bbmap-38.90+dfsg/docs/changelog.txt --- bbmap-38.89+dfsg/docs/changelog.txt 2021-01-28 22:58:59.000000000 +0000 +++ bbmap-38.90+dfsg/docs/changelog.txt 2021-02-03 19:44:16.000000000 +0000 @@ -890,12 +890,16 @@ Split Parse class off from Tools. 38.89 Added support for degenerate amino acid symbols B, J, Z. +38.90 +Added workaround for BubblePopper 640 assertion failure. +RQCFilter deterministic mode added for mapping phases. +Wrapped instances of byte array instantiation in allocByte1D. TODO: Variant whitelist for callvariants TODO: filtervcf multiple position interval support. TODO: refnames flag in seal should clearly indicate it outputs on file per ref file. Also kmers should be unified per reference. -TODO: BubblePopper 640 assertion fired (shijie). +TODO: Understand how BubblePopper 640 assertion can occur. TODO: ApplyVariants fails silently if the header mismatches in certain ways - e.g. "NC123" versus "NC123 virus". TODO: make universal flag document including e.g. cq (changequality). TODO: bzip2 fails on JGI cloud, though lbzip2 works. Test bzip2 on Cori. diff -Nru bbmap-38.89+dfsg/kmutate.sh bbmap-38.90+dfsg/kmutate.sh --- bbmap-38.89+dfsg/kmutate.sh 2021-01-27 18:37:49.000000000 +0000 +++ bbmap-38.90+dfsg/kmutate.sh 2021-02-03 19:53:52.000000000 +0000 @@ -5,10 +5,10 @@ Written by Brian Bushnell Last modified January 26, 2021 -Description: Generates mutants of kmers in input data, allowing specified -numbers of substitutions, insertions, and deletions. Intended for -pattern-matching with BBDuk or Seal, analyzing barcodes and other short -synthetic oligos, and so forth. Input may be fasta or fastq, compressed or raw. +Description: Given a reference, generates a kmer spectrum including a +specified number of substitutions, insertions, and deletions. The output is +useful for analyzing barcodes or other short oligos, and filtering using +BBDuk or Seal. Input may be fasta or fastq, compressed or raw. See also kcompress, kmercountexact, and bbkmerset. Usage: kmutate.sh in= out= k= edist= diff -Nru bbmap-38.89+dfsg/README.md bbmap-38.90+dfsg/README.md --- bbmap-38.89+dfsg/README.md 2021-01-28 23:19:01.000000000 +0000 +++ bbmap-38.90+dfsg/README.md 2021-02-03 19:50:49.000000000 +0000 @@ -1,6 +1,6 @@ # BBTools bioinformatics tools, including BBMap. -# Author: Brian Bushnell, Jon Rood, Shijie Yao +# Author: Brian Bushnell, Jon Rood, Shijie Yao, Jasper Toscani Field # Language: Java, Bash # Information about documentation is in /docs/readme.txt. -# Version 38.89 +# Version 38.90 diff -Nru bbmap-38.89+dfsg/rqcfilter2.sh bbmap-38.90+dfsg/rqcfilter2.sh --- bbmap-38.89+dfsg/rqcfilter2.sh 2021-01-27 18:37:49.000000000 +0000 +++ bbmap-38.90+dfsg/rqcfilter2.sh 2021-02-03 19:51:05.000000000 +0000 @@ -3,7 +3,7 @@ usage(){ echo " Written by Brian Bushnell -Last modified January 26, 2021 +Last modified February 3, 2021 Description: RQCFilter2 is a revised version of RQCFilter that uses a common path for all dependencies. The dependencies are available at http://portal.nersc.gov/dna/microbial/assembly/bushnell/RQCFilterData.tar diff -Nru bbmap-38.89+dfsg/tadpole.sh bbmap-38.90+dfsg/tadpole.sh --- bbmap-38.89+dfsg/tadpole.sh 2020-06-13 00:17:04.000000000 +0000 +++ bbmap-38.90+dfsg/tadpole.sh 2021-02-03 19:51:34.000000000 +0000 @@ -3,7 +3,7 @@ usage(){ echo " Written by Brian Bushnell -Last modified May 28, 2020 +Last modified February 3, 2021 Description: Uses kmer counts to assemble contigs, extend sequences, or error-correct reads. Tadpole has no upper bound for kmer length,