package jgi; import dna.AminoAcid; import shared.Timer; import stream.Read; import template.BBTool_ST; /** * @author Brian Bushnell * @date Mar 16, 2015 * */ public class RemoveBadBarcodes extends BBTool_ST { /*--------------------------------------------------------------*/ /*---------------- Initialization ----------------*/ /*--------------------------------------------------------------*/ /** * Code entrance from the command line. * Must be overridden; the commented body is an example. * @param args Command line arguments */ public static void main(String[] args){ Timer t=new Timer(); RemoveBadBarcodes bbt=new RemoveBadBarcodes(args); bbt.process(t); } /** * @param args */ public RemoveBadBarcodes(String[] args) { super(args); } @Override protected void setDefaults(){} @Override public boolean parseArgument(String arg, String a, String b) { return false; } @Override protected boolean processReadPair(Read r1, Read r2) { String id=r1.id; int loc=(id==null ? -1 : id.lastIndexOf(':')); if(loc<0 || loc>=id.length()-1){ noBarcode++; return false; } for(int i=loc+1; i