rem stringlengths 0 477k | add stringlengths 0 313k | context stringlengths 6 599k |
|---|---|---|
ambigMap.put(key, aSym); | public void addAmbiguity(Symbol aSym) throws IllegalSymbolException { validate(aSym); ambig.add(aSym); } | |
int words = 2 << ( | int words = 1 << ( | public DataStore buildDataStore( File storeFile, SequenceDB seqDB, Packing packing, int wordLength, int threshold ) throws IllegalAlphabetException, IOException, BioException { ByteArrayOutputStream packingStream = new ByteArrayOutputStream(); ObjectOutputStream packingSerializer = new... |
public void putLong(long val) | public void putLong(long pos, long l) | public void putLong(long val) throws IndexOutOfBoundsException, IOException { putLong(position, val); position += Constants.BYTES_IN_LONG; } |
putLong(position, val); position += Constants.BYTES_IN_LONG; | int offset = getOffset(pos); int index = getIndex(pos); MappedByteBuffer buffer = getBuffer(index); buffer.putLong(offset, l); | public void putLong(long val) throws IndexOutOfBoundsException, IOException { putLong(position, val); position += Constants.BYTES_IN_LONG; } |
Integer.valueOf(rank), Integer.valueOf(this.rank) | new Integer(rank), new Integer(this.rank) | public void setRank(int rank) throws ChangeVetoException { if(!this.hasListeners(Note.RANK)) { this.rank = rank; } else { ChangeEvent ce = new ChangeEvent( this, Note.RANK, Integer.valueOf(rank), Integer.... |
featureHolder = new SimpleSequenceFeatureHolder(FeatureFilter.top_level); | featureHolder = new SimpleFeatureHolder(FeatureFilter.top_level); | protected SimpleFeatureHolder getFeatureHolder() { if(featureHolder == null) { featureHolder = new SimpleSequenceFeatureHolder(FeatureFilter.top_level); } return featureHolder; } |
char [] cbuf = new char [1]; | while (true) { reader.mark(1); int c = reader.read(); | public boolean readSequence(BufferedReader reader, SymbolParser symParser, SeqIOListener listener) throws IllegalSymbolException, IOException, ParseException { ((ParseErrorSource)(listener)).addParseErrorListener(this); String line; StreamParser sparser = null; boolean hasMoreSequenc... |
while (true) { reader.mark(1); | if (c == -1) { hasMoreSequence = false; break; } | public boolean readSequence(BufferedReader reader, SymbolParser symParser, SeqIOListener listener) throws IllegalSymbolException, IOException, ParseException { ((ParseErrorSource)(listener)).addParseErrorListener(this); String line; StreamParser sparser = null; boolean hasMoreSequenc... |
if (reader.read() == -1) { hasMoreSequence = false; break; } | if (Character.isWhitespace((char) c)) { hasInternalWhitespace = true; continue; } | public boolean readSequence(BufferedReader reader, SymbolParser symParser, SeqIOListener listener) throws IllegalSymbolException, IOException, ParseException { ((ParseErrorSource)(listener)).addParseErrorListener(this); String line; StreamParser sparser = null; boolean hasMoreSequenc... |
reader.read(cbuf, 0, 1); | if (hasInternalWhitespace) System.err.println("Warning: whitespace found between sequence entries"); | public boolean readSequence(BufferedReader reader, SymbolParser symParser, SeqIOListener listener) throws IllegalSymbolException, IOException, ParseException { ((ParseErrorSource)(listener)).addParseErrorListener(this); String line; StreamParser sparser = null; boolean hasMoreSequenc... |
if (Character.isWhitespace(cbuf[0])) { hasInternalWhitespace = true; continue; } else { if (hasInternalWhitespace) System.err.println("Warning: whitespace found between sequence entries"); reader.reset(); break; } } | reader.reset(); break; } | public boolean readSequence(BufferedReader reader, SymbolParser symParser, SeqIOListener listener) throws IllegalSymbolException, IOException, ParseException { ((ParseErrorSource)(listener)).addParseErrorListener(this); String line; StreamParser sparser = null; boolean hasMoreSequenc... |
listener.endSequence(); return hasMoreSequence; } else if (line.startsWith("SQ")) { listener.addSequenceProperty("XX", ""); | public boolean readSequence(BufferedReader reader, SymbolParser symParser, SeqIOListener listener) throws IllegalSymbolException, IOException, ParseException { ((ParseErrorSource)(listener)).addParseErrorListener(this); String line; StreamParser sparser = null; boolean hasMoreSequenc... | |
sparser = symParser.parseStream(listener); } else { if (sparser == null) { String tag = line.substring(0, 2); String rest = null; if (line.length() > 5) { rest = line.substring(5); } listener.addSequenceProperty(tag, rest); } else { if (! elideSymbols) processSequenceLine(line, sparser); } } } | listener.endSequence(); return hasMoreSequence; } else if (line.startsWith("SQ")) { listener.addSequenceProperty("XX", ""); | public boolean readSequence(BufferedReader reader, SymbolParser symParser, SeqIOListener listener) throws IllegalSymbolException, IOException, ParseException { ((ParseErrorSource)(listener)).addParseErrorListener(this); String line; StreamParser sparser = null; boolean hasMoreSequenc... |
if (sparser != null) sparser.close(); | sparser = symParser.parseStream(listener); } else { if (sparser == null) { String tag = line.substring(0, 2); String rest = null; if (line.length() > 5) { rest = line.substring(5); } listener.addSequenceProperty(tag, rest); } else { if (! elideSymbols) processSequenceLine(line, sparser); } } } | public boolean readSequence(BufferedReader reader, SymbolParser symParser, SeqIOListener listener) throws IllegalSymbolException, IOException, ParseException { ((ParseErrorSource)(listener)).addParseErrorListener(this); String line; StreamParser sparser = null; boolean hasMoreSequenc... |
throw new IOException("Premature end of stream or missing end tag ' | if (sparser != null) sparser.close(); throw new IOException("Premature end of stream or missing end tag ' | public boolean readSequence(BufferedReader reader, SymbolParser symParser, SeqIOListener listener) throws IllegalSymbolException, IOException, ParseException { ((ParseErrorSource)(listener)).addParseErrorListener(this); String line; StreamParser sparser = null; boolean hasMoreSequenc... |
public static final SeqFileFormer makeFormer(String format) | public static final SeqFileFormer makeFormer(final String format) | public static final SeqFileFormer makeFormer(String format) throws BioException { // If there is no Factory for this format load the class // dynamically if (! factories.containsKey(format)) { try { // Load the class, causing its static block to insert // a Factory instance into the SeqFileFormerFactor... |
Collections.sort(subs, Feature.byLocationOrder); | Collections.sort(subs, Feature.byEmblOrder); | public static void getSeqIOEvents(final Sequence seq, final SeqIOListener listener) throws BioException { try { // Inform listener of sequence start listener.startSequence(); // Pass name to listener listener.setName(seq.getName()); // Pass URN to listener listener.setURI(se... |
for (Iterator ki = t.annotation.keys().iterator(); ki.hasNext();) | List keys = new ArrayList(); keys.addAll(t.annotation.keys()); Collections.sort(keys); for (Iterator ki = keys.iterator(); ki.hasNext();) | public static void getSeqIOEvents(final Sequence seq, final SeqIOListener listener) throws BioException { try { // Inform listener of sequence start listener.startSequence(); // Pass name to listener listener.setName(seq.getName()); // Pass URN to listener listener.setURI(se... |
public ABIFParser(InputStream in) throws IOException { this(new ABIFParser.DataStream(in)); | public ABIFParser(File f) throws IOException { this(new ABIFParser.RandomAccessFile(f)); | public ABIFParser(InputStream in) throws IOException { this(new ABIFParser.DataStream(in)); } |
String endpoint = "http: String endpoint2 = "http: String endpoint3 = "http: | public static void main(String[] args) { try {// String endpoint = "http://213.167.155.148/WSFinanceDataGetTypes/WSFinanceDataGetTypes_GetTypes_SoapPort.asmx";// String endpoint2 = "http://213.167.155.148/WSFinanceDataGetState2/WSFinanceDataGetState2_GetState_SoapPort.asmx";// String endpoint3 = "http://213.167... | |
String endpoint = "http: String endpoint2 = "http: String endpoint3 = "http: | public static void main(String[] args) { try {// String endpoint = "http://213.167.155.148/WSFinanceDataGetTypes/WSFinanceDataGetTypes_GetTypes_SoapPort.asmx";// String endpoint2 = "http://213.167.155.148/WSFinanceDataGetState2/WSFinanceDataGetState2_GetState_SoapPort.asmx";// String endpoint3 = "http://213.167... | |
System.out.println("STARTING TYPE HANDLING"); | /*System.out.println("STARTING TYPE HANDLING"); | public static void main(String[] args) { try {// String endpoint = "http://213.167.155.148/WSFinanceDataGetTypes/WSFinanceDataGetTypes_GetTypes_SoapPort.asmx";// String endpoint2 = "http://213.167.155.148/WSFinanceDataGetState2/WSFinanceDataGetState2_GetState_SoapPort.asmx";// String endpoint3 = "http://213.167... |
} | }*/ | public static void main(String[] args) { try {// String endpoint = "http://213.167.155.148/WSFinanceDataGetTypes/WSFinanceDataGetTypes_GetTypes_SoapPort.asmx";// String endpoint2 = "http://213.167.155.148/WSFinanceDataGetState2/WSFinanceDataGetState2_GetState_SoapPort.asmx";// String endpoint3 = "http://213.167... |
channelWrapper.setClientWrapper(clientWrapper); | public void execute() { ChannelWrapper channelWrapper = new ChannelWrapper(logger, channel, executor); ClientWrapper clientWrapper = new ClientWrapper(channelWrapper, client); executor.initClientSession(clientWrapper); try { while (true) { try { Message msg = channel.receiveFromRDBMS(client); logger.d... | |
this.channel = channel; this.client = client; | public ClientWrapper(Channel channel, Client client) { super(); // TODO Auto-generated constructor stub } | |
return c.newInstance(params); | Object o = c.newInstance(params); contents.put(params, o); return o; | public Object buildObject(Class clazz, Object[] params) { try { // Load the class Class[] types = new Class[params.length]; // Find its constructor with given params for (int i = 0; i < params.length; i++) types[i] = params[i].getClass(); Constructor c =... |
public NestedKernel(SVMKernel k) { setNestedKernel(k); } | public NestedKernel() {} | public NestedKernel(SVMKernel k) { setNestedKernel(k); } |
StAXContentHandler oldHandler = current.handler; | public void endElement(String nsURI, String localName, String qName) throws SAXException { current.handler.endElement(nsURI, localName, qName, null); current.count--; while (current.count == 0 && stack.size() > 1) { StAXContentHandler oldHandler = current.handler; ... | |
((changeType == null) || (changeType.isMatchingType(Annotation.PROPERTY)) | (Annotation.PROPERTY.isMatchingType(changeType) || changeType.isMatchingType(Annotation.PROPERTY)) | protected ChangeSupport getChangeSupport(ChangeType changeType) { ChangeSupport changeSupport = super.getChangeSupport(changeType); if( ((changeType == null) || (changeType.isMatchingType(Annotation.PROPERTY)) && (propertyForwarder == null)) ) { propertyForwarder = new PropertyForwar... |
(propertyForwarder == null)) | propertyForwarder == null | protected ChangeSupport getChangeSupport(ChangeType changeType) { ChangeSupport changeSupport = super.getChangeSupport(changeType); if( ((changeType == null) || (changeType.isMatchingType(Annotation.PROPERTY)) && (propertyForwarder == null)) ) { propertyForwarder = new PropertyForwar... |
parseLocation(featureBuf.toString(), featureTemplate); | public void featureData(String line) throws BioException { switch (featureStatus) { case LOCATION: featureBuf.append(line); if (countChar(featureBuf, '(') == countChar(featureBuf, ')')) { parseLocation(featureBuf.toString(), featureTemplate); // Save the original location in the feature's // annotati... | |
parseLocation(featureBuf.toString(), featureTemplate); | public void featureData(String line) throws BioException { switch (featureStatus) { case LOCATION: featureBuf.append(line); if (countChar(featureBuf, '(') == countChar(featureBuf, ')')) { parseLocation(featureBuf.toString(), featureTemplate); // Save the original location in the feature's // annotati... | |
public ParseErrorEvent(Object theSource, String theMessage) | public ParseErrorEvent(Object theSource) | public ParseErrorEvent(Object theSource, String theMessage) { super(theSource); this.mMessage = theMessage; } |
super(theSource); this.mMessage = theMessage; | this(theSource, null); | public ParseErrorEvent(Object theSource, String theMessage) { super(theSource); this.mMessage = theMessage; } |
public boolean contains(Location l) { for (Iterator i = this.members.iterator(); i.hasNext(); ) if (((RichLocation)i.next()).contains(l)) return true; | public boolean contains(int p) { for (Iterator i = this.members.iterator(); i.hasNext(); ) if (((RichLocation)i.next()).contains(p)) return true; | public boolean contains(Location l) { for (Iterator i = this.members.iterator(); i.hasNext(); ) if (((RichLocation)i.next()).contains(l)) return true; return false; } |
if (l==null) throw new IllegalArgumentException("Location cannot be null"); | public Location intersection(Location l) { if (l==null) throw new IllegalArgumentException("Location cannot be null"); if (!(l instanceof RichLocation)) l = RichLocation.Tools.enrich(l); RichLocation them = (RichLocation)l; if (!this.overlaps(l)) return RichLocation.EMPTY_LOCATIO... | |
RichLocation them = (RichLocation)l; if (!this.overlaps(l)) return RichLocation.EMPTY_LOCATION; List newmembers = new ArrayList(); for (Iterator i = this.members.iterator(); i.hasNext(); ) { RichLocation rl = (RichLocation)i.next(); if (rl.overlaps(l)) newmembers.add(rl.intersection(l)); | if (l instanceof EmptyRichLocation) { return l.intersection(this); } else { if (!this.overlaps(l)) return RichLocation.EMPTY_LOCATION; if (l instanceof CompoundRichLocation) { } else { } List newmembers = new ArrayList(); for (Iterator i = this.members.iterator(); i.hasNext(); ) { RichLocation rl = (RichLocation)i.n... | public Location intersection(Location l) { if (l==null) throw new IllegalArgumentException("Location cannot be null"); if (!(l instanceof RichLocation)) l = RichLocation.Tools.enrich(l); RichLocation them = (RichLocation)l; if (!this.overlaps(l)) return RichLocation.EMPTY_LOCATIO... |
if (newmembers.size()>1) return new CompoundRichLocation(getJoinTerm(),newmembers); else return (RichLocation)newmembers.get(0); | public Location intersection(Location l) { if (l==null) throw new IllegalArgumentException("Location cannot be null"); if (!(l instanceof RichLocation)) l = RichLocation.Tools.enrich(l); RichLocation them = (RichLocation)l; if (!this.overlaps(l)) return RichLocation.EMPTY_LOCATIO... | |
public boolean isContiguous() { Iterator i = this.members.iterator(); RichLocation prev = (RichLocation)i.next(); do { RichLocation curr = (RichLocation)i.next(); if (!prev.overlaps(curr)) return false; prev = curr; } while (i.hasNext()); return true; } | public boolean isContiguous() { return this.members.size()<=1; } | public boolean isContiguous() { Iterator i = this.members.iterator(); RichLocation prev = (RichLocation)i.next(); // we're guaranteed two locations at least do { RichLocation curr = (RichLocation)i.next(); if (!prev.overlaps(curr)) return false; prev = curr; ... |
for (Iterator i = this.members.iterator(); i.hasNext(); ) if (((RichLocation)i.next()).overlaps(l)) return true; | for (Iterator i = this.members.iterator(); i.hasNext(); ) { RichLocation rl = (RichLocation)i.next(); if (rl.overlaps(l)) return true; } | public boolean overlaps(Location l) { for (Iterator i = this.members.iterator(); i.hasNext(); ) if (((RichLocation)i.next()).overlaps(l)) return true; return false; } |
if (this.members.isEmpty()) return this; | public Location translate(int dist) { List newmembers = new ArrayList(); for (Iterator i = this.members.iterator(); i.hasNext(); ) { RichLocation rl = (RichLocation)i.next(); newmembers.add(rl.translate(dist)); } return new CompoundRichLocation(getJoinTerm(),newmemb... | |
if (l==null) throw new IllegalArgumentException("Location cannot be null"); | if (this.members.isEmpty()) return l; | public Location union(Location l) { if (l==null) throw new IllegalArgumentException("Location cannot be null"); if (!(l instanceof RichLocation)) l = RichLocation.Tools.enrich(l); List newmembers = new ArrayList(); newmembers.addAll(this.members); newmembers.add(l); return ... |
List newmembers = new ArrayList(); newmembers.addAll(this.members); newmembers.add(l); return new CompoundRichLocation(getJoinTerm(),newmembers); | if (l instanceof EmptyRichLocation) { return l.union(this); } else { if (l instanceof CompoundRichLocation) { Location result = this; for (Iterator i = l.blockIterator(); i.hasNext(); ) { result = result.union((Location)i.next()); } return result; } else { List newmembers = new ArrayList(); newmembers.addAll(this.m... | public Location union(Location l) { if (l==null) throw new IllegalArgumentException("Location cannot be null"); if (!(l instanceof RichLocation)) l = RichLocation.Tools.enrich(l); List newmembers = new ArrayList(); newmembers.addAll(this.members); newmembers.add(l); return ... |
gATools = new GATools(); | protected void setUp() throws Exception { super.setUp(); /**don't really need to do this but hey, why not*/ gATools = new GATools(); } | |
gATools = null; | protected void tearDown() throws Exception { gATools = null; super.tearDown(); } | |
if(alphaName.equals("DNA")) { | if(alphaName.startsWith("DNA")) { | public AnonymousSeqImpl(SymbolList resList) throws IllegalAlphabetException { String alphaName = resList.alphabet().getName(); seqType = null; if(alphaName.equals("DNA")) { seqType = SeqType.DNA; } else if(alphaName.equals("RNA")) { seqType = SeqType.RNA; } else if(alphaName.equals("PROTEIN")... |
} else if(alphaName.equals("RNA")) { | } else if(alphaName.startsWith("RNA")) { | public AnonymousSeqImpl(SymbolList resList) throws IllegalAlphabetException { String alphaName = resList.alphabet().getName(); seqType = null; if(alphaName.equals("DNA")) { seqType = SeqType.DNA; } else if(alphaName.equals("RNA")) { seqType = SeqType.RNA; } else if(alphaName.equals("PROTEIN")... |
} else if(alphaName.equals("PROTEIN")) { | } else if(alphaName.startsWith("PROTEIN")) { | public AnonymousSeqImpl(SymbolList resList) throws IllegalAlphabetException { String alphaName = resList.alphabet().getName(); seqType = null; if(alphaName.equals("DNA")) { seqType = SeqType.DNA; } else if(alphaName.equals("RNA")) { seqType = SeqType.RNA; } else if(alphaName.equals("PROTEIN")... |
throw new BioError("Can't happen unless the decoder is returning non-DNA symbols", ise); | throw new BioError(ise,"Can't happen unless the decoder is returning non-DNA symbols"); | protected final void createAndSetBaseCallAlignment(List dna, List offsets, List[] probs) { try { Map baseCalls = new SmallMap(9); baseCalls.put(Chromatogram.DNA, out.createImmutableSymbolList(DNATools.getDNA(), dna)); baseCalls.put(Chromatogram.OFFSETS... |
throw new BioError("Can't happen", iae); | throw new BioError(iae,"Can't happen"); | protected final void createAndSetBaseCallAlignment(List dna, List offsets, List[] probs) { try { Map baseCalls = new SmallMap(9); baseCalls.put(Chromatogram.DNA, out.createImmutableSymbolList(DNATools.getDNA(), dna)); baseCalls.put(Chromatogram.OFFSETS... |
if( eqIdx == -1 ) { continue; } | protected void parseComments() throws IOException { skipTo(header.comments_offset); byte[] raw = new byte[(int)header.comments_size - 1]; din.read(raw, 0, raw.length); BufferedReader r = new BufferedReader( new InputStreamReader( ... | |
throw new BioError("Can't happen unless getProbabilityAlphabet() has been misdefined."); | throw new BioError(ise,"Can't happen unless getProbabilityAlphabet() has been misdefined."); | protected void parseBases() throws IOException, UnsupportedChromatogramFormatException { skipTo(header.bases_offset); int count = (int) header.bases; List[] probs = new ArrayList[7]; for (int i = 0 ; i < probs.length ; i++) probs[i] = new ArrayList(count); ... |
int[] maxVal = new int[] { Integer.MIN_VALUE, Integer.MIN_VALUE, Integer.MIN_VALUE, Integer.MIN_VALUE }; if (header.sample_size == 1) { for (int i = 0 ; i < count ; i++) { for (int n = 0 ; n < 4 ; n++) { trace[n][i] = din.readUnsignedByte(); maxVal[n] = Math.max(trace[n][i], maxVal[n]); offset++; | int[] maxVal = new int[] { Integer.MIN_VALUE, Integer.MIN_VALUE, Integer.MIN_VALUE, Integer.MIN_VALUE }; if (header.sample_size == 1) { for (int i = 0 ; i < count ; i++) { for (int n = 0 ; n < 4 ; n++) { trace[n][i] = din.readUnsignedByte(); maxVal[n] = Math.max(trace[n][i], maxVal[n]); offset++; } } } else if (header... | protected void parseSamples() throws IOException { int count = (int) header.samples; int[][] trace = new int[4][count]; int[] maxVal = new int[] { Integer.MIN_VALUE, Integer.MIN_VALUE, Integer.MIN_VALUE, Integer.MIN_VALUE }; if (h... |
} } else if (header.sample_size == 2) { for (int i = 0 ; i < count ; i++) { for (int n = 0 ; n < 4 ; n++) { trace[n][i] = din.readUnsignedShort(); maxVal[n] = Math.max(trace[n][i], maxVal[n]); offset += 2; | try { out.setTrace(DNATools.a(), trace[0], maxVal[0]); out.setTrace(DNATools.c(), trace[1], maxVal[1]); out.setTrace(DNATools.g(), trace[2], maxVal[2]); out.setTrace(DNATools.t(), trace[3], maxVal[3]); } catch (IllegalSymbolException ise) { throw new BioError(ise,"Can't happen"); | protected void parseSamples() throws IOException { int count = (int) header.samples; int[][] trace = new int[4][count]; int[] maxVal = new int[] { Integer.MIN_VALUE, Integer.MIN_VALUE, Integer.MIN_VALUE, Integer.MIN_VALUE }; if (h... |
} } try { out.setTrace(DNATools.a(), trace[0], maxVal[0]); out.setTrace(DNATools.c(), trace[1], maxVal[1]); out.setTrace(DNATools.g(), trace[2], maxVal[2]); out.setTrace(DNATools.t(), trace[3], maxVal[3]); } catch (IllegalSymbolException ise) { throw new BioError("Can't happen", ise); } | protected void parseSamples() throws IOException { int count = (int) header.samples; int[][] trace = new int[4][count]; int[] maxVal = new int[] { Integer.MIN_VALUE, Integer.MIN_VALUE, Integer.MIN_VALUE, Integer.MIN_VALUE }; if (h... | |
throw new BioError("Can't happen unless there's a misdefinition of getProbabilityAlphabet() or IntegerAlphabet", ise); | throw new BioError(ise,"Can't happen unless there's a misdefinition of getProbabilityAlphabet() or IntegerAlphabet"); | protected void parseBases() throws IOException, UnsupportedChromatogramFormatException { skipTo(header.bases_offset); int count = (int) header.bases; List[] probs = new ArrayList[7]; for (int i = 0 ; i < 7 ; i++) probs[i] = new ArrayList(count); List offset... |
int[] maxVal = new int[] { Integer.MIN_VALUE, Integer.MIN_VALUE, Integer.MIN_VALUE, Integer.MIN_VALUE }; for (int n = 0 ; n < 4 ; n++) readSamplesInto(trace[n]); int[] p_sample1 = new int[] { 0, 0, 0, 0 }; int[] p_sample2 = new int[] { 0, 0, 0, 0 }; for (int n = 0 ; n < 4 ; n++) { for (int i = 1 ; i < trace[n].lengt... | int[] maxVal = new int[] { Integer.MIN_VALUE, Integer.MIN_VALUE, Integer.MIN_VALUE, Integer.MIN_VALUE }; for (int n = 0 ; n < 4 ; n++) readSamplesInto(trace[n]); int[] p_sample1 = new int[] { 0, 0, 0, 0 }; int[] p_sample2 = new int[] { 0, 0, 0, 0 }; for (int n = 0 ; n < 4 ; n++) { for (int i = 0 ; i < trace[n].lengt... | protected void parseSamples() throws IOException, UnsupportedChromatogramFormatException { skipTo(header.samples_offset); // load values from file int count = (int)header.samples; int[][] trace = new int[4][count]; int[] maxVal = new int[] { Integer.MIN_VAL... |
public static IntegerAlphabet.SubIntegerAlphabet getProbabilityAlphabet() { return PROBABILITY_ALPHABET; } | getProbabilityAlphabet() { return PROBABILITY_ALPHABET; } | public static IntegerAlphabet.SubIntegerAlphabet getProbabilityAlphabet() { return PROBABILITY_ALPHABET; } |
Alphabet alpha = model.emissionAlphabet(); | Alphabet modelAlpha = model.emissionAlphabet(); Alphabet alpha = (Alphabet) (modelAlpha.getAlphabets().get(0)); | public static void main(String args[]) throws Exception { if(args.length != 2) { throw new Exception("Use: ViterbiAlign model.xml sequence.fa"); } try { // parse the arguments URL baseURL = new URL("file:"); URL modelURL = new URL(baseURL, args[0]); File seqFile = new File(args[1... |
SymbolList [] rl = { seq }; | SymbolList [] rl = { SymbolListViews.orderNSymbolList(seq, modelAlpha.getAlphabets().size() ) }; | public static void main(String args[]) throws Exception { if(args.length != 2) { throw new Exception("Use: ViterbiAlign model.xml sequence.fa"); } try { // parse the arguments URL baseURL = new URL("file:"); URL modelURL = new URL(baseURL, args[0]); File seqFile = new File(args[1... |
dm.delegate(new StAXContentHandlerBase()); | dm.delegate(xffenv.getDetailsHandler()); | public void startElement(String nsURI, String localName, String qName, Attributes attrs, DelegationManager dm) throws SAXException { level++; if (level == 1) { // This was our initial startElement. String id = attrs.getValue("id"); if (id != null) { try { setFeature... |
if (ref != null) { | if (! ref.equals("")) { | private void configureBean(Object bean, Element el, Map refs) throws AppException { Class clazz = bean.getClass(); Node child = el.getFirstChild(); while (child != null) { if (child instanceof Element) { Element echild = (Element) child; String tag = echild.getTagName(); if (tag.equals("string")) ... |
return sym == getAlphabet().getGapSymbol() ? 1.0 : 0.0; | return 1.0; | public double getWeight(Symbol sym) throws IllegalSymbolException { return sym == getAlphabet().getGapSymbol() ? 1.0 : 0.0; } |
List symL = ((BasisSymbol) sym).getSymbols(); | List symL = sym.getSymbols(); | public void registerWithTrainer(DistributionTrainerContext dtc) { for(Iterator i = conditionedDistributions().iterator(); i.hasNext(); ) { dtc.registerDistribution((Distribution) i.next()); } dtc.registerTrainer(this, new IgnoreCountsTrainer() { public void addCount( DistributionTrainerConte... |
List symL = ((BasisSymbol) sym).getSymbols(); | List symL = sym.getSymbols(); | public void addCount( DistributionTrainerContext dtc, AtomicSymbol sym, double count ) throws IllegalSymbolException { List symL = ((BasisSymbol) sym).getSymbols(); int lb1 = symL.size() - 1; Symbol firstS; if(lb1 == 1) { firstS = (Symbol) symL.get(0)... |
List symL = ((BasisSymbol) sym).getSymbols(); | List symL = sym.getSymbols(); | public double getCount( DistributionTrainerContext dtc, AtomicSymbol sym ) throws IllegalSymbolException { List symL = ((BasisSymbol) sym).getSymbols(); int lb1 = symL.size() - 1; Symbol firstS; if(lb1 == 1) { firstS = (Symbol) symL.get(0); } else { ... |
property_class.equals( RESULT_PROPERTY) || property_class.equals( XREF_PROPERTY) ) ) | property_class.equals( RESULT_PROPERTY) || property_class.equals( XREF_PROPERTY) || property_class.equals( QUALIFIER)) ) | public AGAVEProperty(String property_class, String prop, String data_type, String value) { if( property_class != null && !( property_class.equals( SCI_PROPERTY) || property_class.equals( RESULT_PROPERTY) || property_class.equals( XREF_PROPERTY) ) ) throw new RuntimeException("unkownn para... |
try { return new FuzzyPointLocation(this.min + dist, this.max + dist, this.resolver); } catch (IndexOutOfBoundsException ioe) { ioe.printStackTrace(); } return this; | return new FuzzyPointLocation(this.min + dist, this.max + dist, this.resolver); | public Location translate(int dist) { if (dist == 0) return this; try { return new FuzzyPointLocation(this.min + dist, this.max + dist, this.resolver); } catch (IndexOutOfBoundsException ioe) { ioe.printStackTrace(); } return this; } |
public final Symbol getAmbiguity(Set syms) throws IllegalSymbolException { | public Symbol getAmbiguity(Set syms) throws IllegalSymbolException { | public final Symbol getAmbiguity(Set syms) throws IllegalSymbolException { return AlphabetManager.createSymbol( '*', "?", Annotation.EMPTY_ANNOTATION, syms, this ); } |
'*', "?", Annotation.EMPTY_ANNOTATION, | '*', Annotation.EMPTY_ANNOTATION, | public final Symbol getAmbiguity(Set syms) throws IllegalSymbolException { return AlphabetManager.createSymbol( '*', "?", Annotation.EMPTY_ANNOTATION, syms, this ); } |
'*', "?", Annotation.EMPTY_ANNOTATION, | '*', Annotation.EMPTY_ANNOTATION, | public final Symbol getSymbol(List syms) throws IllegalSymbolException { List alphas = getAlphabets(); if(alphas.size() != syms.size()) { throw new IllegalSymbolException( "Can't retrieve symbol as symbol list is the wrong length " + syms.size() + ":" + alphas.size() ); } ... |
for(int i = 1; i < this.length(); i++){ | for(int i = 1; i < this.length() + 1; i++){ | public SymbolList getQuality(){ SimpleSymbolList qual = new SimpleSymbolList(IntegerAlphabet.getSubAlphabet(0,99)); for(int i = 1; i < this.length(); i++){ try{ qual.addSymbol(PhredTools.integerSymbolFromPhred(this.symbolAt(i))); }catch(IllegalSymbolException ise){ throw new BioError( ... |
AnnotationBuilder annBuilder = new AnnotationBuilder( new AnnotationType.AnyOfType( new PropertyConstraint.IsCollectionOf( java.util.ArrayList.class, PropertyConstraint.ANY ) ) ); | AnnotationBuilder annBuilder = new AnnotationBuilder(AnnotationType.ANY); | public static void main(String[] args) throws Exception { BufferedReader reader = new BufferedReader( new FileReader( new File(args[0]) ) ); LineSplitParser lsp = LineSplitParser.EMBL; AnnotationBuilder annBuilder = new AnnotationBuilder( new AnnotationType.AnyOfType... |
System.err.println("*** Constructing DistributedSequence: " + id); | DistributedSequence(String id, DistributedSequenceDB db, DistDataSource seqSource, Set featureSources) { System.err.println("*** Constructing DistributedSequence: " + id); this.id = id; this.seqSource = seqSource; this.featureSources = featureSources; this.db = db; installListener(); } | |
} else if (line.startsWith(GenbankFormat.END_SEQUENCE_TAG)) { streamParser.close(); | protected void processLine(String line) throws ParseException, IllegalSymbolException { if (line.startsWith(GenbankFormat.FEATURE_TAG)) { status = FEATURES; this.saveSeqAnno(); } else if (line.startsWith(GenbankFormat.START_SEQUENCE_TAG)) { status = SEQUENCE; this.saveSeqAnno(); } else if (status... | |
StreamParser sParser = null; boolean hasAnotherSequence = true; | boolean hasAnotherSequence = true; boolean hasInternalWhitespace = false; | public boolean readSequence(BufferedReader reader, SymbolParser symParser, SeqIOListener listener) throws IllegalSymbolException, IOException, ParseException { GenbankContext ctx = new GenbankContext(symParser, listener); String line; StreamParser sParser = null; // FIXME? - Is sParser ever not null? KJ bo... |
if(line.length() == 0) { continue; } | if (line.startsWith(END_SEQUENCE_TAG)) { ctx.processLine(line); | public boolean readSequence(BufferedReader reader, SymbolParser symParser, SeqIOListener listener) throws IllegalSymbolException, IOException, ParseException { GenbankContext ctx = new GenbankContext(symParser, listener); String line; StreamParser sParser = null; // FIXME? - Is sParser ever not null? KJ bo... |
if (line.startsWith(END_SEQUENCE_TAG)) { if(sParser != null) { sParser.close(); sParser = null; } | char [] cbuf = new char [1]; while (true) { reader.mark(1); | public boolean readSequence(BufferedReader reader, SymbolParser symParser, SeqIOListener listener) throws IllegalSymbolException, IOException, ParseException { GenbankContext ctx = new GenbankContext(symParser, listener); String line; StreamParser sParser = null; // FIXME? - Is sParser ever not null? KJ bo... |
reader.mark(2); if (reader.read() == -1) { hasAnotherSequence = false; } else { reader.reset(); | if (reader.read() == -1) { hasAnotherSequence = false; break; } reader.read(cbuf, 0, 1); if (Character.isWhitespace(cbuf[0])) { hasInternalWhitespace = true; continue; } else { if (hasInternalWhitespace) System.err.println("Warning: whitespace found between sequence entries"); reader.reset(); break; } | public boolean readSequence(BufferedReader reader, SymbolParser symParser, SeqIOListener listener) throws IllegalSymbolException, IOException, ParseException { GenbankContext ctx = new GenbankContext(symParser, listener); String line; StreamParser sParser = null; // FIXME? - Is sParser ever not null? KJ bo... |
for (int i = 0; i < l.size(); i++) { | for (int i = 0; i < length; i++) { | public static final Sequence generateSequence(String name, Distribution d, int length){ if(d instanceof OrderNDistribution){ return generateOrderNSequence(name, (OrderNDistribution)d, length); } SymbolList sl = null; List l = new ArrayList(length); for (int i = 0; i < l.size(); i++) { l.add(d... |
String note ; | public void characters(char[] ch, int start, int length) throws SAXException { try{ String note ; staxenv.featureTemplate.annotation.setProperty("note", new String(ch) ); }catch (ChangeVetoException cve) { throw new SAXException(" change veto exception ") ; } } | |
trip = trip==null?null:trip; | public Ontology parse(BufferedReader in, OntologyFactory of) throws IOException, OntologyException { String name = ""; String description = ""; Ontology onto = null; for( String line = in.readLine(); line != null; line = in.readLine() ) { line = line.trim(); if(line.length() >... | |
DASSequence(URL dataSourceURL, String seqID) | DASSequence(DASSequenceDB db, URL dataSourceURL, String seqID) | DASSequence(URL dataSourceURL, String seqID) throws BioException { this(dataSourceURL, seqID, null); } |
this(dataSourceURL, seqID, null); | this(db, dataSourceURL, seqID, null); | DASSequence(URL dataSourceURL, String seqID) throws BioException { this(dataSourceURL, seqID, null); } |
if (refSymbols != null) return refSymbols; try { URL epURL = new URL(dataSourceURL, "dna?ref=" + seqID); HttpURLConnection huc = (HttpURLConnection) epURL.openConnection(); huc.connect(); int status = huc.getHeaderFieldInt("X-DAS-Status", 0); if (status == 0) throw new BioError("Not a DAS server"); else if (status != ... | SymbolList sl = null; if (refSymbols != null) { sl = (SymbolList) refSymbols.get(); | protected SymbolList getSymbols() { if (refSymbols != null) return refSymbols; try { URL epURL = new URL(dataSourceURL, "dna?ref=" + seqID); HttpURLConnection huc = (HttpURLConnection) epURL.openConnection(); huc.connect(); int status = huc.getHeaderFieldInt("X-DAS-Status", 0); if (status ==... |
return refSymbols; | if (sl == null) { if (structure.countFeatures() == 0) { sl = getTrueSymbols(); } else { AssembledSymbolList asl = new AssembledSymbolList(); asl.setLength(length); for (Iterator i = structure.features(); i.hasNext(); ) { ComponentFeature cf = (ComponentFeature) i.next(); asl.putComponent(cf.getLocation(), cf); } sl = ... | protected SymbolList getSymbols() { if (refSymbols != null) return refSymbols; try { URL epURL = new URL(dataSourceURL, "dna?ref=" + seqID); HttpURLConnection huc = (HttpURLConnection) epURL.openConnection(); huc.connect(); int status = huc.getHeaderFieldInt("X-DAS-Status", 0); if (status ==... |
public Symbol getAmbiguity(Set syms) | public final Symbol getAmbiguity(Set syms) | public Symbol getAmbiguity(Set syms) throws IllegalSymbolException { if (syms.size() == 0) { return getGapSymbol(); } else if (syms.size() == 1) { Symbol sym = (Symbol) syms.iterator().next(); validate(sym); return sym; } else { for (Iterator i = syms.iterator(); i.hasNext(); ) { ... |
for (Iterator i = syms.iterator(); i.hasNext(); ) { validate((Symbol) i.next()); } return AlphabetManager.createSymbol( | Symbol s = (Symbol) ambCache.get(syms); if(s == null) { for (Iterator i = syms.iterator(); i.hasNext(); ) { validate((Symbol) i.next()); } s = AlphabetManager.createSymbol( | public Symbol getAmbiguity(Set syms) throws IllegalSymbolException { if (syms.size() == 0) { return getGapSymbol(); } else if (syms.size() == 1) { Symbol sym = (Symbol) syms.iterator().next(); validate(sym); return sym; } else { for (Iterator i = syms.iterator(); i.hasNext(); ) { ... |
ambCache.put(new HashSet(syms), s); } return s; | public Symbol getAmbiguity(Set syms) throws IllegalSymbolException { if (syms.size() == 0) { return getGapSymbol(); } else if (syms.size() == 1) { Symbol sym = (Symbol) syms.iterator().next(); validate(sym); return sym; } else { for (Iterator i = syms.iterator(); i.hasNext(); ) { ... | |
return new SimpleBasisSymbol(Annotation.EMPTY_ANNOTATION, Collections.EMPTY_LIST); | return new SimpleBasisSymbol(ann, new ListTools.Doublet(DNATools.c(), DNATools.n())); | protected Symbol createSymbol(Annotation ann) throws Exception { return new SimpleBasisSymbol(Annotation.EMPTY_ANNOTATION, Collections.EMPTY_LIST); } |
public SimplePopulation(){ this(""); | public SimplePopulation(String name) { super(name); this.orgs = new HashMap(); | public SimplePopulation(){ this(""); } |
public AbstractPopulation(String name){ this.name = name; | public AbstractPopulation() { this(""); | public AbstractPopulation(String name){ this.name = name; } |
int end) | int length) | public void characters(char[] ch, int start, int end) throws SAXException; |
int end) | int length) | public void ignorableWhitespace(char[] ch, int start, int end) throws SAXException; |
LineSplitParser lsp = LineSplitParser.EMBL; | public static void main(String[] args) throws Exception { BufferedReader reader = new BufferedReader( new FileReader( new File(args[0]) ) ); LineSplitParser lsp = LineSplitParser.EMBL; TagValueListener listener = null; if(args.length > 1 && args[1].startsWith("val")) { li... | |
listener = new AnnotationBuilder(AnnotationType.ANY); | listener = new AnnotationBuilder(Formats.EMBL_TYPE); | public static void main(String[] args) throws Exception { BufferedReader reader = new BufferedReader( new FileReader( new File(args[0]) ) ); LineSplitParser lsp = LineSplitParser.EMBL; TagValueListener listener = null; if(args.length > 1 && args[1].startsWith("val")) { li... |
TagDelegator td = new TagDelegator(listener); LineSplitParser ftParser = new LineSplitParser(); ftParser.setSplitOffset(15); ftParser.setTrimTag(true); ftParser.setTrimValue(true); ftParser.setContinueOnEmptyTag(true); ftParser.setMergeSameTag(false); TagValueListener ftListener = new FeatureTableListener(listener); ... | public static void main(String[] args) throws Exception { BufferedReader reader = new BufferedReader( new FileReader( new File(args[0]) ) ); LineSplitParser lsp = LineSplitParser.EMBL; TagValueListener listener = null; if(args.length > 1 && args[1].startsWith("val")) { li... | |
while(parser.read(reader, lsp, td)) { | while(parser.read(reader, pl.getParser(), pl.getListener())) { | public static void main(String[] args) throws Exception { BufferedReader reader = new BufferedReader( new FileReader( new File(args[0]) ) ); LineSplitParser lsp = LineSplitParser.EMBL; TagValueListener listener = null; if(args.length > 1 && args[1].startsWith("val")) { li... |
this.mismatches = mismatches; | MaxMismatchMatcher(SymbolList seq, SymbolList pattern, int mismatches) { this.seq = seq; this.mismatches = mismatches; patLength = pattern.length(); maxPatternSymbolIdx = patLength - 1; seqLength = seq.length(); minMatches = patL... | |
int patLength = matches.length; | public boolean find() { int patLength = matches.length; if (pos >= seq.length()) { return false; } for (; pos <= seqLength; pos++) { if (addSymbol()) { pos++; return true; } } return false; } |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.