rem stringlengths 0 477k | add stringlengths 0 313k | context stringlengths 6 599k |
|---|---|---|
public void addLambdaTransition(Node start, Node end) | public Transition addLambdaTransition(Node start, Node end) | public void addLambdaTransition(Node start, Node end) { addTransition(start, end, LAMBDA); } |
addTransition(start, end, LAMBDA); | return addTransition(start, end, LAMBDA); | public void addLambdaTransition(Node start, Node end) { addTransition(start, end, LAMBDA); } |
NodeSet closureSet = createNodeSet(); NodeSet thisClosure = getClosure(node, LAMBDA); closureSet.addNodeSet(thisClosure); for (Iterator closI = thisClosure.iterator(); closI.hasNext(); ) { Node currNode = (Node) closI.next(); closureSet.addNodeSet(getLambdaClosure(currNode)); } return closureSet; | return _getLambdaClosure(node, createNodeSet()); | NodeSet getLambdaClosure(Node node) throws AutomatonException { NodeSet closureSet = createNodeSet(); NodeSet thisClosure = getClosure(node, LAMBDA); closureSet.addNodeSet(thisClosure); for (Iterator closI = thisClosure.iterator(); closI.hasNext(); ) { Node currNode ... |
List symbols | List symbols, Set matches | public SimpleBasisSymbol( char token, String name, Annotation annotation, List symbols ) throws IllegalSymbolException { this(token, name, annotation); if(symbols == null) { throw new NullPointerException("symbols can't be null"); } if(symbols.size() == 0) { throw new IllegalSymbolExcepti... |
if(matches != null) { for(Iterator i = matches.iterator(); i.hasNext(); ) { Object obj = i.next(); if(obj instanceof AtomicSymbol) { } else { throw new ClassCastException( "Can't cast " + obj + " to AtomicSymbol" ); } } this.matches = new SimpleAlphabet(matches); } | public SimpleBasisSymbol( char token, String name, Annotation annotation, List symbols ) throws IllegalSymbolException { this(token, name, annotation); if(symbols == null) { throw new NullPointerException("symbols can't be null"); } if(symbols.size() == 0) { throw new IllegalSymbolExcepti... | |
context.scHandler.addSubHitProperty("queryStrand", attr.getValue("queryStrand")); context.scHandler.addSubHitProperty("hitStrand", attr.getValue("hitStrand")); | if (attr.getValue("queryStrand") != null) context.scHandler.addSubHitProperty("queryStrand", attr.getValue("queryStrand")); if (attr.getValue("subjectStrand") != null) context.scHandler.addSubHitProperty("hitStrand", attr.getValue("hitStrand")); | public void startElement(String uri, String localName, String qName, Attributes attr) throws SAXException { context.scHandler.addSubHitProperty("score", attr.getValue("score")); if (attr.getValue(... |
SymbolList seq = src.getSymbols(); | public void paint( Graphics2D g, SequenceRenderContext src ) { SymbolList seq = src.getSymbols(); double scale = src.getScale(); // this is a completely arbitrary limit to stop my viewer // from attempting to trigger the download of HUGE amounts // of sequence. if (scale ... | |
System.err.println( "Feature: " + feat + " source: " + feat.getSource() + " type: " + feat.getType() + " loc: " + feat.getLocation() + " ann: " + feat.getAnnotation() ); System.err.println("range: " + src.getRange()); | public void renderFeature( Graphics2D g, Feature feat, SequenceRenderContext src ) { Location loc = feat.getLocation(); String label = labelMaker.makeLabel(feat); System.err.println( "Feature: " + feat + " source: " + feat.getSource() + " type: " + feat.getType() + " loc: " + fe... | |
System.err.println("min: " + min + " max: " + max + " mid: " + mid); | public void renderFeature( Graphics2D g, Feature feat, SequenceRenderContext src ) { Location loc = feat.getLocation(); String label = labelMaker.makeLabel(feat); System.err.println( "Feature: " + feat + " source: " + feat.getSource() + " type: " + feat.getType() + " loc: " + fe... | |
System.err.println("rendered: " + label); | public void renderFeature( Graphics2D g, Feature feat, SequenceRenderContext src ) { Location loc = feat.getLocation(); String label = labelMaker.makeLabel(feat); System.err.println( "Feature: " + feat + " source: " + feat.getSource() + " type: " + feat.getType() + " loc: " + fe... | |
this.labelToSymbolList = labelToResList; | this.labelToSymbolList =new LinkedHashMap( labelToResList); | public SimpleAlignment(Map labelToResList) throws IllegalArgumentException { if(labelToResList.isEmpty()) { throw new IllegalArgumentException("Can't create an alignment with no sequences"); }; this.labels = Collections.unmodifiableList(new ArrayList(labelToResList.keySet())); this.labelToSymbolList... |
Map labelsToResList = new HashMap(); | Map labelsToResList = new LinkedHashMap(); | public Alignment subAlignment(Set labels, Location loc) throws NoSuchElementException { Map labelsToResList = new HashMap(); Iterator i; if(labels != null) { i = labels.iterator(); } else { i = getLabels().iterator(); } while(i.hasNext()) { Object label = i.next(); SymbolList sy... |
for (Iterator fi = subs.iterator(); fi.hasNext();) { Feature.Template t = ((Feature) fi.next()).makeTemplate(); | public static void getSeqIOEvents(Sequence seq, 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(seq.getURN());... | |
for (Iterator fi = subs.iterator(); fi.hasNext();) { Feature.Template t = ((Feature) fi.next()).makeTemplate(); | listener.startFeature(t); | public static void getSeqIOEvents(Sequence seq, 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(seq.getURN());... |
listener.startFeature(t); | List keys = new ArrayList(); keys.addAll(t.annotation.keys()); Collections.sort(keys); | public static void getSeqIOEvents(Sequence seq, 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(seq.getURN());... |
List keys = new ArrayList(); keys.addAll(t.annotation.keys()); Collections.sort(keys); | for (Iterator ki = keys.iterator(); ki.hasNext();) { Object key = ki.next(); | public static void getSeqIOEvents(Sequence seq, 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(seq.getURN());... |
for (Iterator ki = keys.iterator(); ki.hasNext();) { Object key = ki.next(); | if (key.equals(Feature.PROPERTY_DATA_KEY)) continue; | public static void getSeqIOEvents(Sequence seq, 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(seq.getURN());... |
if (key.equals(Feature.PROPERTY_DATA_KEY)) continue; | listener.addFeatureProperty(key, t.annotation.getProperty(key)); } | public static void getSeqIOEvents(Sequence seq, 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(seq.getURN());... |
listener.addFeatureProperty(key, t.annotation.getProperty(key)); } | listener.endFeature(); } | public static void getSeqIOEvents(Sequence seq, 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(seq.getURN());... |
listener.endFeature(); } listener.addSymbols(seq.getAlphabet(), (Symbol []) seq.toList().toArray(new Symbol [0]), 0, seq.length()); | listener.addSymbols(seq.getAlphabet(), (Symbol []) seq.toList().toArray(new Symbol [0]), 0, seq.length()); | public static void getSeqIOEvents(Sequence seq, 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(seq.getURN());... |
inDetails = false; | public void endElement(String nsURI, String localName, String qName) { if (localName.equals("details")) { inDetails = false; } } | |
inDetails = true; | public void startElement(String nsURI, String localName, String qName, Attributes attrs, DelegationManager dm) throws SAXException { if (localName.equals("details")) { inDetails ... | |
inFeatureSet = false; | public void endElement(String nsURI, String localName, String qName, StAXContentHandler handler) { if (localName.equals("featureSet")) { inFeatureSet = false; } } | |
inFeatureSet = true; | public void startElement(String nsURI, String localName, String qName, Attributes attrs, DelegationManager dm) throws SAXException { //System.err.println("Processing startElement(" + nsURI + ", " + loc... | |
public static Query optimize(Query query) | public static Query optimize(Query query, Node startNode, Node targetNode) | public static Query optimize(Query query) throws OperationException { // find all nodes that have only 1 entry and 1 exit and for which these are // labeld with filter operations Queryable mergableNodes = select( findMergableFiltersQuery, findMergableFiltersStart, createSingleton(query) );... |
while(mergableNodes.contains(to)) { | System.out.println("Optimizing from " + node); do { | public static Query optimize(Query query) throws OperationException { // find all nodes that have only 1 entry and 1 exit and for which these are // labeld with filter operations Queryable mergableNodes = select( findMergableFiltersQuery, findMergableFiltersStart, createSingleton(query) );... |
to = arc.from; } | to = arc.to; System.out.println("walked to " + to + " by following arc " + arc); } while(to != node && mergableNodes.contains(to)); | public static Query optimize(Query query) throws OperationException { // find all nodes that have only 1 entry and 1 exit and for which these are // labeld with filter operations Queryable mergableNodes = select( findMergableFiltersQuery, findMergableFiltersStart, createSingleton(query) );... |
while(mergableNodes.contains(from)) { | do { | public static Query optimize(Query query) throws OperationException { // find all nodes that have only 1 entry and 1 exit and for which these are // labeld with filter operations Queryable mergableNodes = select( findMergableFiltersQuery, findMergableFiltersStart, createSingleton(query) );... |
from = arc.to; } | from = arc.from; System.out.println("walked to " + from + " by following arc " + arc); } while(from != node && mergableNodes.contains(from)); | public static Query optimize(Query query) throws OperationException { // find all nodes that have only 1 entry and 1 exit and for which these are // labeld with filter operations Queryable mergableNodes = select( findMergableFiltersQuery, findMergableFiltersStart, createSingleton(query) );... |
this.description = description; | private TriState(String description) { this.description = description; } | |
(ct == null || ct == Annotatable.ANNOTATION)){ | (ct.isMatchingType(Annotatable.ANNOTATION) || Annotatable.ANNOTATION.isMatchingType(ct))) { | protected ChangeSupport getChangeSupport(ChangeType ct){ ChangeSupport cs = super.getChangeSupport(ct); if(annotationForwarder == null && (ct == null || ct == Annotatable.ANNOTATION)){ annotationForwarder = new Annotatable.AnnotationForwarder( this, cs); getAnnotation().addChang... |
Collection coll = getBusiness(iwc).getPaymentItems("1", "tempKT"); | Collection coll = getBusiness(iwc).getPaymentItems(communeNumber, personalId, stateEndPoint); | private Layer getStatement(String communeNumber, String personalId, IWContext iwc) throws RemoteException { Layer layer = new Layer(Layer.DIV); Form form = new Form(); form.setId("financial_statement"); layer.add(form); Table2 table = new Table2(); table.setCellpadding(0); table.setCellspacing(0); table.setWid... |
Collection items = getBusiness(iwc).getStatementItems("1", "tempKR", p, fromStamp, toStamp); | Collection items = getBusiness(iwc).getStatementItems(communeNumber, personalId, p, fromStamp, toStamp, movementsEndPoint); | private Layer getStatement(String communeNumber, String personalId, IWContext iwc) throws RemoteException { Layer layer = new Layer(Layer.DIV); Form form = new Form(); form.setId("financial_statement"); layer.add(form); Table2 table = new Table2(); table.setCellpadding(0); table.setCellspacing(0); table.setWid... |
nl = System.getProperty("line.separator"); | public FastaSearchSAXParser() { this.setNamespacePrefix("biojava"); this.addPrefixMapping("biojava", "http://www.biojava.org"); fastaParser = new FastaSearchParser(); attributes = new AttributesImpl(); qName = new QName(this); nFormat = new DecimalFormat("###.0"); } | |
props.append("\n"); | props.append(nl); | public void endHeader() { try { attributes.clear(); // Program name attribute qName.setQName("program"); attributes.addAttribute(qName.getURI(), qName.getLocalName(), qName.getQName(), "CDATA", (String) searchProperties.get("pg_name")); // Program version attribute... |
props.append((String) searchProperties.get(searchPropKeys[i]) + "\n"); | props.append((String) searchProperties.get(searchPropKeys[i]) + nl); | public void endHeader() { try { attributes.clear(); // Program name attribute qName.setQName("program"); attributes.addAttribute(qName.getURI(), qName.getLocalName(), qName.getQName(), "CDATA", (String) searchProperties.get("pg_name")); // Program version attribute... |
se.printStackTrace(); | System.err.println("An error occurred while creating SAX events from header data: " + se.getMessage()); | public void endHeader() { try { attributes.clear(); // Program name attribute qName.setQName("program"); attributes.addAttribute(qName.getURI(), qName.getLocalName(), qName.getQName(), "CDATA", (String) searchProperties.get("pg_name")); // Program version attribute... |
se.printStackTrace(); | System.err.println("An error occurred while creating an endElement() SAX event: " + se.getMessage()); | public void endSearch() { try { // If we found any hits then we need to close a Detail // element too if (! firstHit) { endElement(new QName(this, this.prefix("Detail"))); // Prime to get next firstHit firstHit = true; } endElement(new QName(this, this.prefix("BlastLikeDataSet"))); } c... |
props.append("\n"); | props.append(nl); | public void endSubHit() { // System.out.println("Using: " + hitProperties); attributes.clear(); // Query sequence length attribute qName.setQName("sequenceLength"); attributes.addAttribute(qName.getURI(), qName.getLocalName(), qName.getQName(), "CDATA", hitProperties.get("query_sq_len").toString()); ... |
props.append(hitProperties.get(hitPropKeys[i]).toString() + "\n"); | props.append(hitProperties.get(hitPropKeys[i]).toString() + nl); | public void endSubHit() { // System.out.println("Using: " + hitProperties); attributes.clear(); // Query sequence length attribute qName.setQName("sequenceLength"); attributes.addAttribute(qName.getURI(), qName.getLocalName(), qName.getQName(), "CDATA", hitProperties.get("query_sq_len").toString()); ... |
se.printStackTrace(); | System.err.println("An error occurred while creating SAX events from hit data: " + se.getMessage()); | public void endSubHit() { // System.out.println("Using: " + hitProperties); attributes.clear(); // Query sequence length attribute qName.setQName("sequenceLength"); attributes.addAttribute(qName.getURI(), qName.getLocalName(), qName.getQName(), "CDATA", hitProperties.get("query_sq_len").toString()); ... |
se.printStackTrace(); | System.err.println("An error occurred while creating startElement() SAX event from hit data: " + se.getMessage()); | public void startHit() { // Hit elements must be wrapped in a Detail element so we // start one at the first hit if (firstHit) { firstHit = false; attributes.clear(); try { startElement(new QName(this, this.prefix("Detail")), (Attributes) attributes); } catch (SAXException se) ... |
assertEquals(t1.RANKEDCROSSREF, ev.getType()); | assertEquals(ComparableTerm.RANKEDCROSSREF, ev.getType()); | public void testAddRankedCrossRef() { System.out.println("testAddRankedCrossRef"); RankedCrossRef xref = new SimpleRankedCrossRef(new SimpleCrossRef("db", "acc", 1),0); try{ t1.addRankedCrossRef(xref); assertTrue(t1.getRankedCrossRefs().contains(xref)); ... |
assertEquals(t1.RANKEDCROSSREF, ev.getType()); | assertEquals(ComparableTerm.RANKEDCROSSREF, ev.getType()); | public void testRemoveRankedCrossRef() { System.out.println("testRemoveRankedCrossRef"); RankedCrossRef xref = new SimpleRankedCrossRef(new SimpleCrossRef("db", "acc", 1),0); try{ t1.addRankedCrossRef(xref); //add it assertTrue(t1.getRankedCrossRefs().contains(xref... |
assertEquals(t1.DESCRIPTION, ev.getType()); | assertEquals(ComparableTerm.DESCRIPTION, ev.getType()); | public void testSetDescription() { System.out.println("testSetDescription"); //can be null try{t1.setDescription(null);}catch(Exception ex){ fail("Not expecting "+ex.getClass().getName());} String desc = "my_desc"; try{ t1.setDescription(desc); ... |
assertEquals(t1.IDENTIFIER, ev.getType()); | assertEquals(ComparableTerm.IDENTIFIER, ev.getType()); | public void testSetIdentifier() { System.out.println("testSetIdentifier"); //can be null try{t1.setDescription(null);}catch(Exception ex){ fail("Not expecting "+ex.getClass().getName());} String ident = "my_ident"; try{ t1.setIdentifier(ident); ... |
assertEquals(t1.OBSOLETE, ev.getType()); | assertEquals(ComparableTerm.OBSOLETE, ev.getType()); | public void testSetObsolete() { System.out.println("testSetObsolete"); Boolean obs = Boolean.TRUE; try{ t1.setObsolete(obs); assertEquals(obs, t1.getObsolete()); //should generate an event ChangeEvent ev = cr.getEvent(); ... |
SymbolTokenization sourceP = sourceA.getTokenization("name"); | private static void loadGeneticCodes() { try { InputStream tablesStream = ClassTools.getClassLoader(RNATools.class).getResourceAsStream( "org/biojava/bio/seq/TranslationTables.xml" ); if(tablesStream == null ) { throw new BioError("Couldn't locate TranslationTables.xml."); } ... | |
Stroke beadStroke = new BasicStroke(); | public void paint( Graphics2D g, SequenceRenderContext sRC ) { Paint selectedFill = fillColor; Paint textCol = textColor; Paint notSelectedFill = g.getBackground(); Stroke beadStroke = new BasicStroke(); Shape ... | |
System.out.println("ab = " + kAB); System.out.println("aa = " + kAA); System.out.println("bb = " + kBB); System.out.println("aa*bb = " + kAA * kBB); System.out.println("sqrt = " + Math.sqrt(kAA * kBB)); System.out.println("k = " + (kAB / Math.sqrt(kAA * kBB))); | public double evaluate(Object a, Object b) { double kAA = k.evaluate(a, a); double kBB = k.evaluate(b, b); double kAB = k.evaluate(a, b); System.out.println("ab = " + kAB); System.out.println("aa = " + kAA); System.out.println("bb = " + kBB); System.out.println("aa*bb = " + kAA * ... | |
public double getDepth(SequenceRenderContext sp, RangeLocation pos) { | public double getDepth(SequenceRenderContext src, RangeLocation pos) { | public double getDepth(SequenceRenderContext sp, RangeLocation pos) { return depth + 1.0; } |
public double getMinimumLeader(SequenceRenderContext sp, RangeLocation pos) { | public double getMinimumLeader(SequenceRenderContext src, RangeLocation pos) { | public double getMinimumLeader(SequenceRenderContext sp, RangeLocation pos) { return 0.0; } |
public double getMinimumTrailer(SequenceRenderContext sp, RangeLocation pos) { | public double getMinimumTrailer(SequenceRenderContext src, RangeLocation pos) { | public double getMinimumTrailer(SequenceRenderContext sp, RangeLocation pos) { return 0.0; } |
Graphics2D g, SequenceRenderContext sp, | Graphics2D g, SequenceRenderContext src, | public void paint( Graphics2D g, SequenceRenderContext sp, RangeLocation pos ) { SymbolList seq = sp.getSequence(); int direction = sp.getDirection(); g.setFont(sp.getFont()); Rectangle2D oldClip = g.getClipBounds(); AffineTransform oldTrans = g.getTransform(); ... |
SymbolList seq = sp.getSequence(); int direction = sp.getDirection(); | SymbolList seq = src.getSequence(); int direction = src.getDirection(); | public void paint( Graphics2D g, SequenceRenderContext sp, RangeLocation pos ) { SymbolList seq = sp.getSequence(); int direction = sp.getDirection(); g.setFont(sp.getFont()); Rectangle2D oldClip = g.getClipBounds(); AffineTransform oldTrans = g.getTransform(); ... |
g.setFont(sp.getFont()); | g.setFont(src.getFont()); | public void paint( Graphics2D g, SequenceRenderContext sp, RangeLocation pos ) { SymbolList seq = sp.getSequence(); int direction = sp.getDirection(); g.setFont(sp.getFont()); Rectangle2D oldClip = g.getClipBounds(); AffineTransform oldTrans = g.getTransform(); ... |
double scale = sp.getScale(); | double scale = src.getScale(); | public void paint( Graphics2D g, SequenceRenderContext sp, RangeLocation pos ) { SymbolList seq = sp.getSequence(); int direction = sp.getDirection(); g.setFont(sp.getFont()); Rectangle2D oldClip = g.getClipBounds(); AffineTransform oldTrans = g.getTransform(); ... |
sp.getScale() >= maxBounds.getWidth()*0.3 && sp.getScale() >= maxBounds.getHeight()*0.3 | src.getScale() >= maxBounds.getWidth()*0.3 && src.getScale() >= maxBounds.getHeight()*0.3 | public void paint( Graphics2D g, SequenceRenderContext sp, RangeLocation pos ) { SymbolList seq = sp.getSequence(); int direction = sp.getDirection(); g.setFont(sp.getFont()); Rectangle2D oldClip = g.getClipBounds(); AffineTransform oldTrans = g.getTransform(); ... |
if (direction == sp.HORIZONTAL) { | if (direction == src.HORIZONTAL) { | public void paint( Graphics2D g, SequenceRenderContext sp, RangeLocation pos ) { SymbolList seq = sp.getSequence(); int direction = sp.getDirection(); g.setFont(sp.getFont()); Rectangle2D oldClip = g.getClipBounds(); AffineTransform oldTrans = g.getTransform(); ... |
double graphOffset = sp.graphicsToSequence(symOffset); if(sp.getDirection() == sp.HORIZONTAL) { leading = sp.graphicsToSequence(oldClip.getMinX()); trailing = sp.graphicsToSequence(oldClip.getMaxX()); | double graphOffset = src.sequenceToGraphics(symOffset); if(src.getDirection() == src.HORIZONTAL) { leading = src.graphicsToSequence(oldClip.getMinX()); trailing = src.graphicsToSequence(oldClip.getMaxX()); | public void paint( Graphics2D g, SequenceRenderContext sp, RangeLocation pos ) { SymbolList seq = sp.getSequence(); int direction = sp.getDirection(); g.setFont(sp.getFont()); Rectangle2D oldClip = g.getClipBounds(); AffineTransform oldTrans = g.getTransform(); ... |
leading = sp.graphicsToSequence(oldClip.getMinY()); trailing = sp.graphicsToSequence(oldClip.getMaxY()); | leading = src.graphicsToSequence(oldClip.getMinY()); trailing = src.graphicsToSequence(oldClip.getMaxY()); | public void paint( Graphics2D g, SequenceRenderContext sp, RangeLocation pos ) { SymbolList seq = sp.getSequence(); int direction = sp.getDirection(); g.setFont(sp.getFont()); Rectangle2D oldClip = g.getClipBounds(); AffineTransform oldTrans = g.getTransform(); ... |
double gPos = sp.sequenceToGraphics(sPos - symOffset); | double gPos = src.sequenceToGraphics(sPos - symOffset + 1); | public void paint( Graphics2D g, SequenceRenderContext sp, RangeLocation pos ) { SymbolList seq = sp.getSequence(); int direction = sp.getDirection(); g.setFont(sp.getFont()); Rectangle2D oldClip = g.getClipBounds(); AffineTransform oldTrans = g.getTransform(); ... |
if(sPos == 10) { g.draw(new Rectangle2D.Double(gPos, 0.0, src.getScale(), 10.0)); } | public void paint( Graphics2D g, SequenceRenderContext sp, RangeLocation pos ) { SymbolList seq = sp.getSequence(); int direction = sp.getDirection(); g.setFont(sp.getFont()); Rectangle2D oldClip = g.getClipBounds(); AffineTransform oldTrans = g.getTransform(); ... | |
poMap.put("hitId",oSt.nextToken()); | String hitID = oSt.nextToken(); poMap.put("hitId",hitID); | public void parse(String poLine, HashMap poMap, BlastLikeVersionSupport poVersion) throws SAXException { int iGrab = 2; //numbe of tokens to take from the right int iCount; boolean firstLine; //state variable if (poLine.startsWith("!")) { firstLine = false; ... |
poMap.put("score",oSt.nextToken()); poMap.put("expectValue",oSt.nextToken()); | if (hitID.equals(previousHitID)) { System.out.println("curr: " + hitID + " prev: " + previousHitID); poMap.put("score",previousScore); poMap.put("expectValue",previousEValue); } else { previousHitID = hitID; previousScore = oSt.nextToken(); previousEValue = oSt.nextToken(); poMap.put("score",previousScore); poMap.put("... | public void parse(String poLine, HashMap poMap, BlastLikeVersionSupport poVersion) throws SAXException { int iGrab = 2; //numbe of tokens to take from the right int iCount; boolean firstLine; //state variable if (poLine.startsWith("!")) { firstLine = false; ... |
handler.setQuerySeq(line.substring(2)); | handler.setQuerySeq(line.substring(2, line.indexOf(" "))); | public void parseSearch(final BufferedReader reader, final SearchContentHandler handler) throws IOException, BioException, ParserException { lineNumber = 0; boolean parsedQueryId = false; this.handler = handler; LINE: while ((line = reader.readLine()) != null) { lin... |
Annotatable.ANNOTATION.isMatchingType(ChangeType.UNKNOWN)) | (Annotatable.ANNOTATION.isMatchingType(ct) || ct.isMatchingType(Annotatable.ANNOTATION))) | protected ChangeSupport getChangeSupport(ChangeType ct){ ChangeSupport cs = super.getChangeSupport(ct); if(annotationForwarder == null && Annotatable.ANNOTATION.isMatchingType(ChangeType.UNKNOWN)) { annotationForwarder = new Annotatable.AnnotationForwarder( this, cs); getAnno... |
} | Object [] parseLocation(final String location) throws BioException { this.location = location; if ((countChar(location, '(')) != (countChar(location, '('))) throw new BioException("Unbalanced parentheses in location: " + location); startCoords = new ArrayList(); endCoords = new ArrayList(); instr... | |
getChangeSupport().addChangeListener(cl, null); | getChangeSupport().addChangeListener(cl); | public void addChangeListener(ChangeListener cl) { getChangeSupport().addChangeListener(cl, null); } |
getChangeSupport().addChangeListener(cl, null); | getChangeSupport().addChangeListener(cl); | public void removeChangeListener(ChangeListener cl) { getChangeSupport().addChangeListener(cl, null); } |
if(res == null) throw new IllegalResidueException("No residue for token '" + token + "' found"); | if(res == null) { throw new IllegalResidueException( "No residue for token '" + token + "' found in name parser for " + alphabet().getName() ); } | public Residue parseToken(String token) throws IllegalResidueException { Residue res = (Residue) nameToResidue.get(token); if(res == null) throw new IllegalResidueException("No residue for token '" + token + "' found"); return res; } |
this.locations.add(last); | if (last != Location.empty) this.locations.add(last); | public CompoundLocation(List locations) { List working = new ArrayList(); for(Iterator i = locations.iterator(); i.hasNext(); ) { for(Iterator bi = ((Location) i.next()).blockIterator(); bi.hasNext(); ) { Location bl = (Location) bi.next(); if(bl != Location.empty) { working.add(bl);... |
if (this.locations.size() != 0) { min = ((Location) this.locations.get(0)).getMin(); max = ((Location) this.locations.get(this.locations.size() - 1)).getMax(); } System.out.println(this.locations.toString()); | public CompoundLocation(List locations) { List working = new ArrayList(); for(Iterator i = locations.iterator(); i.hasNext(); ) { for(Iterator bi = ((Location) i.next()).blockIterator(); bi.hasNext(); ) { Location bl = (Location) bi.next(); if(bl != Location.empty) { working.add(bl);... | |
List res = new ArrayList(); for(Iterator i = locations.iterator(); i.hasNext(); ) res.add( ((Location) i.next()).union(l) ); | List res = new ArrayList(this.locations); res.add(l); | public Location union(Location l) { List res = new ArrayList(); for(Iterator i = locations.iterator(); i.hasNext(); ) res.add( ((Location) i.next()).union(l) ); return new CompoundLocation(res); } |
( (ct == null) || (ct.isMatchingType(Distribution.WEIGHTS)) ) && | ( (Distribution.WEIGHTS.isMatchingType(ct)) || (ct.isMatchingType(Distribution.WEIGHTS)) ) && | protected ChangeSupport getChangeSupport(ChangeType ct) { ChangeSupport changeSupport = super.getChangeSupport(ct); if( ( (ct == null) || (ct.isMatchingType(Distribution.WEIGHTS)) ) && weightForwarder == null ) { weightForwarder = new WeigthForwarder(this, changeSupport); for(Iterator... |
pos = 0; | pos = 1; | MaxMismatchMatcher(SymbolList seq, SymbolList pattern, int mismatches) { this.seq = seq; this.mismatches = mismatches; patLength = pattern.length(); maxPatternSymbolIdx = patLength - 1; seqLength = seq.length(); minMatches = patL... |
for (int i=0; i < maxPatternSymbolIdx; i++) { int idx = (pos + i) % patLength; if (sym == patternSymbol[i]) matches[idx]++; | if (hasAmbiguity) { for (int i=0; i < maxPatternSymbolIdx; i++) { int idx = (pos + i) % patLength; if (ambiguousPosition[i]) { if (patternSymbol[i].getMatches().contains(sym)) matches[idx]++; } else { if (sym == patternSymbol[i]) matches[idx]++; } } } else { for (int i=0; i < maxPatternSymbolIdx; i++) { int idx = (pos ... | private boolean addSymbol() { Symbol sym = seq.symbolAt(pos); // compute matches for continuation of match for (int i=0; i < maxPatternSymbolIdx; i++) { int idx = (pos + i) % patLength; if (sym == patternSymbol[i]) matches[idx]++; } // initi... |
SymbolList nOrderSymbols = nOrderAlpha.symbols(); | public static void main(String[] args) { try{ File infile = new File(args[0]); Integer order = new Integer(args[1]); Double threshold = new Double(1.0 / Math.pow(4.0,(double)order.intValue())); FiniteAlphabet dna = DNATools.getDNA(); SequenceDB seqs = readSequenceDB(infile,dna); ... | |
Iterator symbols = nOrderSymbols.iterator(); | Iterator symbols = nOrderAlpha.iterator(); | public static void main(String[] args) { try{ File infile = new File(args[0]); Integer order = new Integer(args[1]); Double threshold = new Double(1.0 / Math.pow(4.0,(double)order.intValue())); FiniteAlphabet dna = DNATools.getDNA(); SequenceDB seqs = readSequenceDB(infile,dna); ... |
public boolean containsFeature(Feature f) { for (Iterator fi = features(); fi.hasNext();) { if (f.equals(fi.next())) { return true; | public boolean containsFeature(Feature f) { if (! (f instanceof Projection)) { return false; } else { Projection p = (Projection) f; return p.getProjectionContext() == ReparentContext.this && baseSet.containsFeature(p.getViewedFeature()); | public boolean containsFeature(Feature f) { for (Iterator fi = features(); fi.hasNext();) { if (f.equals(fi.next())) { return true; } } return false; } |
} return false; | public boolean containsFeature(Feature f) { for (Iterator fi = features(); fi.hasNext();) { if (f.equals(fi.next())) { return true; } } return false; } | |
} public Object next() { return projectFeature((Feature) wrappedIterator.next()); | public Iterator features() { final Iterator wrappedIterator = baseSet.features(); return new Iterator() { public boolean hasNext() { return wrappedIterator.hasNext(); } public Object next() { return projectFeature((Feature) wrappedIterator.next()); } pu... | |
public Object next() { return projectFeature((Feature) wrappedIterator.next()); | public void remove() { throw new UnsupportedOperationException(); | public Iterator features() { final Iterator wrappedIterator = baseSet.features(); return new Iterator() { public boolean hasNext() { return wrappedIterator.hasNext(); } public Object next() { return projectFeature((Feature) wrappedIterator.next()); } pu... |
public void remove() { throw new UnsupportedOperationException(); } | public Iterator features() { final Iterator wrappedIterator = baseSet.features(); return new Iterator() { public boolean hasNext() { return wrappedIterator.hasNext(); } public Object next() { return projectFeature((Feature) wrappedIterator.next()); } pu... | |
} if (! (fh instanceof Sequence)) { throw new BioRuntimeException("Chasing up parents to get sequence: actually hit: " + fh.toString()); | public final Sequence getSequence(Feature f) { FeatureHolder fh = getParent(); while (fh instanceof Feature) { fh = ((Feature) fh).getParent(); } return (Sequence) fh; } | |
assertEquals("protDB" + Integer.toString(i) + ".aa", (String) rec[1]); | assertEquals("protDB" + i + ".aa", (String) rec[1]); | public void testReadRecord() throws IOException { for (int i = 1; i <= 3; i++) { Object [] rec = div.readRecord(); assertEquals(i, ((Integer) rec[0]).intValue()); assertEquals("protDB" + Integer.toString(i) + ".aa", (String) rec[1]); }... |
alpha=null; | public UkkonenSuffixTree(){ terminationChar = DEFAULT_TERM_CHAR; root = new SimpleNode(); e=0; sequences = ""; alpha=null; } | |
int i=0; | public SuffixNode jumpTo(SuffixNode starting, CharSequence source, int from, int to){ SuffixNode currentNode; SuffixNode arrivedAt; boolean canGoDown = true; int edgeLength; int original=from; SuffixNode originalNode=starting; int i=0; currentNode=starting; arrivedAt=starting; rule=0; ... | |
int before = currentNode.labelEnd+to-from+1; | public SuffixNode jumpTo(SuffixNode starting, CharSequence source, int from, int to){ SuffixNode currentNode; SuffixNode arrivedAt; boolean canGoDown = true; int edgeLength; int original=from; SuffixNode originalNode=starting; int i=0; currentNode=starting; arrivedAt=starting; rule=0; ... | |
if (Collection.class.isInstance(value)) { for (Iterator vi = ((Collection) value).iterator(); vi.hasNext();) { qb.setLength(0); ub.setLength(0); StringBuffer fb = formatQualifierBlock(qb, formatQualifier(ub, key, vi.next()).toString(), leader, 80); | if (Collection.class.isInstance(value)) { for (Iterator vi = ((Collection) value).iterator(); vi.hasNext();) { qb.setLength(0); ub.setLength(0); StringBuffer fb = formatQualifierBlock(qb, formatQualifier(ub, key, vi.next()).substring(0), leader, 80); | public void addFeatureProperty(Object key, Object value) throws ParseException { // There are 21 spaces in the leader String leader = " "; // Don't print internal data structures if (key.equals(Feature.PROPERTY_DATA_KEY)) return; // The value may be a collection if several qualifiers of... |
StringBuffer fb = formatQualifierBlock(qb, formatQualifier(ub, key, value).toString(), leader, 80); | StringBuffer fb = formatQualifierBlock(qb, formatQualifier(ub, key, value).substring(0), leader, 80); | public void addFeatureProperty(Object key, Object value) throws ParseException { // There are 21 spaces in the leader String leader = " "; // Don't print internal data structures if (key.equals(Feature.PROPERTY_DATA_KEY)) return; // The value may be a collection if several qualifiers of... |
{ ub.setLength(0); ub.append("ACCESSION "); for (Iterator ai = ((List) value).iterator(); ai.hasNext();) { ub.append((String) ai.next()); } acb = new StringBuffer(ub.toString()); } | { ub.setLength(0); ub.append("ACCESSION "); for (Iterator ai = ((List) value).iterator(); ai.hasNext();) { ub.append((String) ai.next()); } acb = new StringBuffer(ub.substring(0)); } | public void addSequenceProperty(Object key, Object value) throws ParseException { if (key.equals("LOCUS")) { idb.setLength(0); idb.append("LOCUS " + (String) value); } else if (key.equals("TYPE")) { typeb.append(value); } else if (key.equa... |
Arrays.fill(lineLens, 60); lineLens[lineCount - 1] = partLine; | Arrays.fill(lineLens, 60); | public void addSymbols(Alphabet alpha, Symbol [] syms, int start, int length) throws IllegalAlphabetException { try { int aCount = 0; int cCount = 0; int gCount = 0; int tCount = 0; int oCount = 0; int end = start + length - 1; for (int i = start; i <= end;... |
char [] emptyLine = new char [80]; | if (partLine > 0) lineLens[lineCount - 1] = partLine; | public void addSymbols(Alphabet alpha, Symbol [] syms, int start, int length) throws IllegalAlphabetException { try { int aCount = 0; int cCount = 0; int gCount = 0; int tCount = 0; int oCount = 0; int end = start + length - 1; for (int i = start; i <= end;... |
for (int i = 0; i < lineLens.length; i++) { sq.setLength(0); ub.setLength(0); | char [] emptyLine = new char [80]; | public void addSymbols(Alphabet alpha, Symbol [] syms, int start, int length) throws IllegalAlphabetException { try { int aCount = 0; int cCount = 0; int gCount = 0; int tCount = 0; int oCount = 0; int end = start + length - 1; for (int i = start; i <= end;... |
int len = lineLens[i]; | for (int i = 0; i < lineLens.length; i++) { sq.setLength(0); ub.setLength(0); | public void addSymbols(Alphabet alpha, Symbol [] syms, int start, int length) throws IllegalAlphabetException { try { int aCount = 0; int cCount = 0; int gCount = 0; int tCount = 0; int oCount = 0; int end = start + length - 1; for (int i = start; i <= end;... |
Arrays.fill(emptyLine, ' '); sq.append(emptyLine); | int len = lineLens[i]; | public void addSymbols(Alphabet alpha, Symbol [] syms, int start, int length) throws IllegalAlphabetException { try { int aCount = 0; int cCount = 0; int gCount = 0; int tCount = 0; int oCount = 0; int end = start + length - 1; for (int i = start; i <= end;... |
Symbol [] sa = new Symbol [len]; | Arrays.fill(emptyLine, ' '); sq.append(emptyLine); | public void addSymbols(Alphabet alpha, Symbol [] syms, int start, int length) throws IllegalAlphabetException { try { int aCount = 0; int cCount = 0; int gCount = 0; int tCount = 0; int oCount = 0; int end = start + length - 1; for (int i = start; i <= end;... |
System.arraycopy(syms, start + (i * 60), sa, 0, len); | Symbol [] sa = new Symbol [len]; | public void addSymbols(Alphabet alpha, Symbol [] syms, int start, int length) throws IllegalAlphabetException { try { int aCount = 0; int cCount = 0; int gCount = 0; int tCount = 0; int oCount = 0; int end = start + length - 1; for (int i = start; i <= end;... |
String blocks = (formatTokenBlock(ub, sa, 10, dnaTokenization)).toString(); | System.arraycopy(syms, start + (i * 60), sa, 0, len); | public void addSymbols(Alphabet alpha, Symbol [] syms, int start, int length) throws IllegalAlphabetException { try { int aCount = 0; int cCount = 0; int gCount = 0; int tCount = 0; int oCount = 0; int end = start + length - 1; for (int i = start; i <= end;... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.