rem
stringlengths
0
477k
add
stringlengths
0
313k
context
stringlengths
6
599k
fld[i] = res.get(i, j);
fld[j] = res.get(i, j);
public boolean next() throws SQLException { checkIfClosed(); if (rows == null || relRowIdx >= rows.size() + rowsFrom) { //needs fetch SQLFetch fetch = new SQLFetch(); fetch.setCount(fetchSize); fetch.setCursorName(cursorName); switch (fetchDirection) { case ResultSet.FETCH_FORWARD : fetch.setDirecti...
if(fields.length == 0) return 0;
public int getColumns() { return fields[0].length; }
super(fh, parent);
super(parent, fh);
public DistProjectionContext(FeatureHolder fh, FeatureHolder parent, Annotation annotation) { super(fh, parent); this.annotation = annotation; }
public boolean contains(Location l) { if (!(l instanceof RichLocation)) l = RichLocation.Tools.enrich(l); if (!this.overlaps(l)) return false; if (l instanceof CompoundRichLocation) { for (Iterator i = l.blockIterator(); i.hasNext(); ) if (!this.contains((RichLocation)i.next())) return false; return true; } else { retu...
public boolean contains(int p) { return (p>=this.getMin() && p<=this.getMax()); }
public boolean contains(Location l) { if (!(l instanceof RichLocation)) l = RichLocation.Tools.enrich(l); if (!this.overlaps(l)) return false; // check strand etc. if (l instanceof CompoundRichLocation) { for (Iterator i = l.blockIterator(); i.hasNext(); ) if (!this.contains((RichLoc...
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; return new SimpleRichLocation(this.posmax(this.min,them.getMinPosition()),this.posmin(this.max,them.getMaxPosition()),0,this.strand,this.crossRef);
if (l instanceof CompoundRichLocation || l instanceof EmptyRichLocation) { return l.union(this); } else { RichLocation rl = (RichLocation)l; if (!(this.overlaps(l) && this.getStrand().equals(rl.getStrand()))) return RichLocation.EMPTY_LOCATION; return new SimpleRichLocation(this.posmax(this.min,rl.getMinPosition()),t...
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 rl = (RichLocation)l; if (rl.getStrand()!=this.strand) return false; if (rl.getCrossRef()!=null || this.crossRef!=null) { if (rl.getCrossRef()!=null && this.crossRef!=null) { if (!this.crossRef.equals(rl.getCrossRef())) return false; } else return false;
if (l instanceof CompoundRichLocation || l instanceof EmptyRichLocation) { return l.overlaps(this); } else { RichLocation rl = (RichLocation)l; if (rl.getCrossRef()!=null || this.crossRef!=null) { if (rl.getCrossRef()!=null && this.crossRef!=null) { if (!this.crossRef.equals(rl.getCrossRef())) return false; } else ret...
public boolean overlaps(Location l) { if (!(l instanceof RichLocation)) l = RichLocation.Tools.enrich(l); RichLocation rl = (RichLocation)l; if (rl.getStrand()!=this.strand) return false; if (rl.getCrossRef()!=null || this.crossRef!=null) { if (rl.getCrossRef()!=null && this.c...
return (rl.getMin()<this.getMax() && rl.getMax()>this.getMin());
public boolean overlaps(Location l) { if (!(l instanceof RichLocation)) l = RichLocation.Tools.enrich(l); RichLocation rl = (RichLocation)l; if (rl.getStrand()!=this.strand) return false; if (rl.getCrossRef()!=null || this.crossRef!=null) { if (rl.getCrossRef()!=null && this.c...
if ((this.getMax()-this.getMin())<1) return SymbolList.EMPTY_LIST;
if (seq instanceof RichSequence) { RichSequence rs = (RichSequence)seq; if (this.getCircular() && !rs.getCircular()) throw new IllegalArgumentException("Attempt to apply circular location to non-circular sequence"); }
public SymbolList symbols(SymbolList seq) { if (seq==null) throw new IllegalArgumentException("Sequence cannot be null"); if ((this.getMax()-this.getMin())<1) return SymbolList.EMPTY_LIST; SymbolList seq2 = seq.subList(this.getMin(),this.getMax()); try { ...
if (l==null) throw new IllegalArgumentException("Location cannot be null");
public Location union(Location l) { if (l==null) throw new IllegalArgumentException("Location cannot be null"); if (!(l instanceof RichLocation)) l = RichLocation.Tools.enrich(l); RichLocation rl = (RichLocation)l; if (this.overlaps(rl)) { return new SimpleRichLocation(this.po...
RichLocation rl = (RichLocation)l; if (this.overlaps(rl)) { return new SimpleRichLocation(this.posmin(this.min,rl.getMinPosition()),this.posmax(this.max,rl.getMaxPosition()),0,this.strand,this.crossRef);
if (l instanceof CompoundRichLocation || l instanceof EmptyRichLocation) { return l.union(this);
public Location union(Location l) { if (l==null) throw new IllegalArgumentException("Location cannot be null"); if (!(l instanceof RichLocation)) l = RichLocation.Tools.enrich(l); RichLocation rl = (RichLocation)l; if (this.overlaps(rl)) { return new SimpleRichLocation(this.po...
List s = new ArrayList(); s.add(this); s.add(rl); return new CompoundRichLocation(CompoundRichLocation.getJoinTerm(),s);
RichLocation rl = (RichLocation)l; if (this.overlaps(rl) && this.getStrand().equals(rl.getStrand())) { return new SimpleRichLocation(this.posmin(this.min,rl.getMinPosition()),this.posmax(this.max,rl.getMaxPosition()),0,this.strand,this.crossRef); } else { List s = new ArrayList(); s.add(this); s.add(rl); return new C...
public Location union(Location l) { if (l==null) throw new IllegalArgumentException("Location cannot be null"); if (!(l instanceof RichLocation)) l = RichLocation.Tools.enrich(l); RichLocation rl = (RichLocation)l; if (this.overlaps(rl)) { return new SimpleRichLocation(this.po...
return knownSymbols.values().iterator();
return new SparseIterator(this);
public Iterator iterator() { return knownSymbols.values().iterator(); }
CodeField _Cell_backpointer = _Cell.getFieldByName("backPointers");
private CodeGenerator createBRecursion( boolean isInit, MarkovModel model, State[] states, AlphabetIndex stateIndex, CodeField stateF, CodeField [] transitionFields, AlphabetIndex[] transitionIndexers, GeneratedCodeMethod method ) throws NoSuchMethodException, NoSuchFieldException, I...
CodeClass _State = IntrospectedCodeClass.forClass(State.class);
private CodeGenerator createBRecursion( boolean isInit, MarkovModel model, State[] states, AlphabetIndex stateIndex, CodeField stateF, CodeField [] transitionFields, AlphabetIndex[] transitionIndexers, GeneratedCodeMethod method ) throws NoSuchMethodException, NoSuchFieldException, I...
CodeField _Cell_backpointer = _Cell.getFieldByName("backPointers");
private CodeGenerator createFRecursion( boolean isInit, MarkovModel model, State[] states, AlphabetIndex stateIndex, CodeField stateF, CodeField [] transitionFields, AlphabetIndex[] transitionIndexers, GeneratedCodeMethod method ) throws NoSuchMethodException, NoSuchFieldException, I...
CodeClass _State = IntrospectedCodeClass.forClass(State.class);
private CodeGenerator createFRecursion( boolean isInit, MarkovModel model, State[] states, AlphabetIndex stateIndex, CodeField stateF, CodeField [] transitionFields, AlphabetIndex[] transitionIndexers, GeneratedCodeMethod method ) throws NoSuchMethodException, NoSuchFieldException, I...
CodeClass _CellCalculator = IntrospectedCodeClass.forClass(CellCalculator.class);
private CodeGenerator createInit( MarkovModel model, State[] states, GeneratedCodeClass clazz, GeneratedCodeMethod __init, AlphabetIndex[] transitionIndexers, CodeField[] transitionFields, CodeField stateF, CodeField terminalBP ) throws NoSuchFieldException, NoSuchMethodException, CodeExcepti...
CodeClass _BackPointer = IntrospectedCodeClass.forClass(BackPointer.class);
private CodeGenerator createInit( MarkovModel model, State[] states, GeneratedCodeClass clazz, GeneratedCodeMethod __init, AlphabetIndex[] transitionIndexers, CodeField[] transitionFields, CodeField stateF, CodeField terminalBP ) throws NoSuchFieldException, NoSuchMethodException, CodeExcepti...
CodeMethod _Distribution_getWeight = _Distribution.getMethod("getWeight", new CodeClass[] {_Symbol}); CodeClass _Cell = IntrospectedCodeClass.forClass(Cell.class);
private CodeGenerator createInit( MarkovModel model, State[] states, GeneratedCodeClass clazz, GeneratedCodeMethod __init, AlphabetIndex[] transitionIndexers, CodeField[] transitionFields, CodeField stateF, CodeField terminalBP ) throws NoSuchFieldException, NoSuchMethodException, CodeExcepti...
char token, String name, Annotation annotation ) { super(token, name, annotation);
char token, Annotation annotation, List syms ) throws IllegalSymbolException { super(token, annotation, syms);
protected SimpleAtomicSymbol( char token, String name, Annotation annotation ) { super(token, name, annotation); }
throw new BioError("Assertion Failure: Matches alphabet is null");
throw new BioError( "Assertion Failure: Matches alphabet is null in " + this );
protected Alphabet createMatches() { throw new BioError("Assertion Failure: Matches alphabet is null"); }
new File("C:\\devel\\biojava-live\\resources\\org\\biojava\\ontology\\core.pred")))),
new File("resources\\org\\biojava\\ontology\\core.pred")))),
public void testParser() throws IOException, LexerException, ParserException, ChangeVetoException { ReasoningDomain domain = new ReasoningDomain.Impl(); domain.addOntology(OntoTools.getIntegerOntology()); TriplesParser tp = new TriplesParser(); Ontology onto = tp.parse( new PushbackReader(new B...
public BuildRunner(java.io.File buildFile, String target, String lastBuildTime, String label, CruiseLogger logger) { _logger = logger; _buildFile = buildFile; loadProject(); _target = target; _lastBuildTime = lastBuildTime; _label = label;
public BuildRunner(String buildFileName, String target, String lastBuildTime, String label, CruiseLogger logger) { this(new java.io.File(buildFileName), target, lastBuildTime, label, logger);
public BuildRunner(java.io.File buildFile, String target, String lastBuildTime, String label, CruiseLogger logger) { _logger = logger; _buildFile = buildFile; loadProject(); _target = target; _lastBuildTime = lastBuildTime; _label = label; }
for (int i = 1, linesPrinted = 1; i <= seqLen; i++) {
for (int i = 1; i <= seqLen; i++) {
public void writeSequence(Sequence seq, PrintStream os) throws IOException { os.print(">"); os.println(describeSequence(seq)); StringBuffer line = new StringBuffer(); int seqLen = seq.length(); for (int i = 1, linesPrinted = 1; i <= seqLen; i++) { int val = ((IntegerAlphabet.IntegerSymbol)seq.sym...
int type = ecoRI.getUpstreamEndType();
ecoRI.getUpstreamEndType();
public void testGetUpstreamEndType() throws BioException { RestrictionEnzyme bsp24I = RestrictionEnzymeManager.getEnzyme("Bsp24I"); assertEquals(RestrictionEnzyme.OVERHANG_3PRIME, bsp24I.getUpstreamEndType()); RestrictionEnzyme ecoRI = RestrictionEnzymeManager.getEnzyme("...
System.err.println(">>> " + s);
public String transact(String s) throws AceException { System.err.println(">>> " + s); try { writeMessage(MSGREQ, s); String reply = readMessage(); System.err.println("<<< " + reply); return reply; } catch (IOException ex) { throw new AceException(ex); } }
System.err.println("<<< " + reply);
public String transact(String s) throws AceException { System.err.println(">>> " + s); try { writeMessage(MSGREQ, s); String reply = readMessage(); System.err.println("<<< " + reply); return reply; } catch (IOException ex) { throw new AceException(ex); } }
else if (form.equals("paren")) tb.append("(" + value + ")");
public void addFeatureProperty(Object key, Object value) throws ParseException { // There are 19 spaces in the leader String leader = "FT "; // Default is to quote unknown qualifiers String form = "quoted"; StringBuffer tb = new StringBuffer("/" + key); if (qualifierData.containsKey...
nextCharIndex++;
Object getNextToken() { while (true) { if (nextCharIndex == location.length()) return null; char thisChar = location.charAt(nextCharIndex); switch (thisChar) { case ' ' : case '\t' : continue; case ':' : case '^' : case ',' : case '(' : case ')' : case '<' : case '>' : nextChar...
templ.type = ""; templ.source = "";
templ.type = "none"; templ.source = "none";
public static RichFeature makeEmptyFeature(){ RichFeature.Template templ = new RichFeature.Template(); templ.annotation = new SimpleRichAnnotation(); templ.featureRelationshipSet = new TreeSet(); templ.rankedCrossRefs = new TreeSet(); templ.type...
rlistener.addSequenceProperty(Terms.getDataClassTerm(),m.group(4)); rlistener.addSequenceProperty(Terms.getMolTypeTerm(),m.group(5));
if (m.groupCount() > 4){ rlistener.addSequenceProperty(Terms.getDataClassTerm(),m.group(4)); rlistener.addSequenceProperty(Terms.getMolTypeTerm(),m.group(5)); }else{ rlistener.addSequenceProperty(Terms.getDataClassTerm(), m.group(4)); rlistener.addSequenceProperty(Terms.getMolTypeTerm(), ""); }
public boolean readRichSequence(BufferedReader reader, SymbolTokenization symParser, RichSeqIOListener rlistener, Namespace ns) throws IllegalSymbolException, IOException, ParseException { boolean hasAnotherSequence = true; //boolean hasInternalWhite...
UnigeneDB unigene = UnigeneTools.FLAT_FILE_FACTORY.loadUnigene(url);
UnigeneDB unigene = UnigeneTools.loadUnigene(url);
public static void main(String[] args) throws Exception { URL url = new URL(new URL("file:"), args[0]); UnigeneDB unigene = UnigeneTools.FLAT_FILE_FACTORY.loadUnigene(url); for(int i = 1; i < args.length; i++) { UnigeneCluster cluster = unigene.getCluster(args[i]); System.out.println(cluster.g...
FeatureFilter ancFilter = null;
public boolean isDisjoint(FeatureFilter ff) { if (ff instanceof IsTopLevel) { return true; } FeatureFilter ancFilter = null; if (ff instanceof FeatureFilter.ByParent) { ancFilter = ((FeatureFilter.ByParent) ff).getFilter(); ...
ancFilter = ((FeatureFilter.ByParent) ff).getFilter(); } else if (ff instanceof FeatureFilter.ByParent) { ancFilter = ((FeatureFilter.ByParent) ff).getFilter();
return FilterUtils.areDisjoint( ((FeatureFilter.ByParent) ff).getFilter(), getFilter() ); } else if (ff instanceof FeatureFilter.ByAncestor) { return FilterUtils.areDisjoint( ((FeatureFilter.ByAncestor) ff).getFilter(), getFilter() ); } else { FeatureFilter descFilter = FilterUtils.getOnlyDescendantsFilter(getFilter()...
public boolean isDisjoint(FeatureFilter ff) { if (ff instanceof IsTopLevel) { return true; } FeatureFilter ancFilter = null; if (ff instanceof FeatureFilter.ByParent) { ancFilter = ((FeatureFilter.ByParent) ff).getFilter(); ...
if (ancFilter != null) { return FilterUtils.areDisjoint(ancFilter, filter); } else { return false; }
return false;
public boolean isDisjoint(FeatureFilter ff) { if (ff instanceof IsTopLevel) { return true; } FeatureFilter ancFilter = null; if (ff instanceof FeatureFilter.ByParent) { ancFilter = ((FeatureFilter.ByParent) ff).getFilter(); ...
FeatureFilter descFilter = null; if (ff instanceof FeatureFilter.ByChild) { descFilter = ((FeatureFilter.ByChild) ff).getFilter(); } if (descFilter != null) { return FilterUtils.areDisjoint(descFilter, filter);
if (ff instanceof OnlyChildren) { return FilterUtils.areDisjoint( getFilter(), ((OnlyChildren) ff).getFilter() ); } else if (ff instanceof OnlyDescendants) { return FilterUtils.areDisjoint( getFilter(), ((OnlyDescendants) ff).getFilter() );
public boolean isDisjoint(FeatureFilter ff) { if (ff instanceof IsLeaf) { return true; } FeatureFilter descFilter = null; if (ff instanceof FeatureFilter.ByChild) { descFilter = ((FeatureFilter.ByChild) ff).getFilter(); ...
if (ff instanceof IsTopLevel) {
if (ff instanceof IsLeaf) {
public boolean isDisjoint(FeatureFilter ff) { if (ff instanceof IsTopLevel) { return true; } FeatureFilter descFilter = null; if (ff instanceof FeatureFilter.ByChild) { descFilter = ((FeatureFilter.ByChild) ff).getFilter(); ...
} FeatureFilter descFilter = null; if (ff instanceof FeatureFilter.ByChild) { descFilter = ((FeatureFilter.ByChild) ff).getFilter(); } else if (ff instanceof FeatureFilter.ByDescendant) { descFilter = ((FeatureFilter.ByDescendant) ff).getFilter(); } if (descFilter != null) { return FilterUtils.areDisjoint(descFilter,...
} else if (ff instanceof OnlyDescendants) { return FilterUtils.areDisjoint( getFilter(), ((OnlyDescendants) ff).getFilter() );
public boolean isDisjoint(FeatureFilter ff) { if (ff instanceof IsTopLevel) { return true; } FeatureFilter descFilter = null; if (ff instanceof FeatureFilter.ByChild) { descFilter = ((FeatureFilter.ByChild) ff).getFilter(); ...
FeatureFilter ancFilter = null; if (ff instanceof FeatureFilter.ByParent) { ancFilter = ((FeatureFilter.ByParent) ff).getFilter(); } if (ancFilter != null) { return FilterUtils.areDisjoint(ancFilter, filter); } else { return false; }
return false;
public boolean isDisjoint(FeatureFilter ff) { if (ff instanceof IsTopLevel) { return true; } FeatureFilter ancFilter = null; if (ff instanceof FeatureFilter.ByParent) { ancFilter = ((FeatureFilter.ByParent) ff).getFilter(); ...
if (b!=builder) objects.clear();
public static synchronized void setRichObjectBuilder(RichObjectBuilder b) { if (b!=builder) objects.clear(); // because they're from a different factory now builder = b; }
huc.setRequestProperty("Content-Type", "text/xml");
private boolean fetchAll(Ticket trigger) throws ParseException, BioException { try { boolean canFetchMulti = DASCapabilities.checkCapable(new URL(dataSourceURL, ".."), DASCapabilities.CAPABILITY_EXTENDED, DASCapabilities.CAPABILITY_EXTENDED_FEATURES); if (!canFetchMulti) { return...
DOMParser parser = new DOMParser();
DOMParser parser = DASSequence.nonvalidatingParser();
public void parseURL(URL fUrl, SeqIOListener siol) throws BioException, ParseException, IOException { try { // System.err.println("Wheeee, using XFF parser on: " + fUrl.toString()); HttpURLConnection huc = (HttpURLConnection) fUrl.openConnection(); huc.connect(); int status = huc.getHeader...
form.setId("financial_statement");
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...
iwc.getCurrentLocale())));
iwc.getCurrentLocale(), IWTimestamp.SHORT)));
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...
RecordParser() { sb = new StringBuffer(512); }
RecordParser() { }
RecordParser() { sb = new StringBuffer(512); }
sb.setLength(0);
StringBuffer sb = new StringBuffer(512);
Object [] parseAcnumTrgRecord(byte [] acRecord) { // The variable part of record is the acc. Other parts are // long, long which sum to 8 int accLen = acRecord.length - 8; byte [] accBytes = new byte [accLen]; System.arraycopy(acRecord, 0, recNumBytes, 0, 4); System.arraycopy(acRecord, 4, re...
sb.setLength(0);
StringBuffer sb = new StringBuffer(512);
Object [] parseDivRecord(byte [] divRecord) { // The variable part of record is the name. Other parts are // int which sum to 2 int nameLen = divRecord.length - 2; byte [] fNameBytes = new byte [nameLen]; System.arraycopy(divRecord, 0, fNumBytes, 0, 2); System.arraycopy(divRecord, 2, fNameBy...
sb.setLength(0);
StringBuffer sb = new StringBuffer(512);
Object [] parseEntryNamRecord(byte [] enRecord) { // The variable part of record is the id. Other parts are // long, long, int which sum to 10 int idLen = enRecord.length - 10; byte [] idBytes = new byte [idLen]; System.arraycopy(enRecord, 0, idBytes, 0, idLen); System.arraycopy(e...
throws IllegalSymbolException { double [] emission = (double []) eMap.get(symList); if(emission == null) { Symbol sym[][] = new Symbol[2][2]; List ll = ListTools.createList(symList); sym[0][0] = AlphabetManager.getGapSymbol(); sym[1][1] = alpha.getSymbol(Arrays.asList(new Symbol [] { (Symbol) symList.get(0), (Symbol) ...
throws IllegalSymbolException { return getEmissions(symList, true);
public final double [] getEmissions(List symList) throws IllegalSymbolException { double [] emission = (double []) eMap.get(symList); if(emission == null) { //System.out.println("."); Symbol sym[][] = new Symbol[2][2]; List ll = ListTools.createList(symList); sym[0][0] = AlphabetManager.get...
return emission; }
public final double [] getEmissions(List symList) throws IllegalSymbolException { double [] emission = (double []) eMap.get(symList); if(emission == null) { //System.out.println("."); Symbol sym[][] = new Symbol[2][2]; List ll = ListTools.createList(symList); sym[0][0] = AlphabetManager.get...
public Sequence readSequence(StreamReader.Context context, ResidueParser resParser, SequenceFactory sf) throws IllegalResidueException, IOException { final BufferedReader in = context.getReader(); String accession; String line; while(true) { line = in.readLine(); if(line == null) { context.streamEmpty(); throw new IO...
public Sequence readSequence(StreamReader.Context context, ResidueParser resParser, SequenceFactory sf) throws IllegalResidueException, IOException, SeqException { EmblContext ctx = new EmblContext(resParser, sf); BufferedReader in = context.getReader(); String line; boolean isSeq = false; while ((line = in.readLine(...
public Sequence readSequence(StreamReader.Context context, ResidueParser resParser, SequenceFactory sf) throws IllegalResidueException, IOException { final BufferedReader in = context.getReader(); String accession; String line; while(true) { line = in.readLine(); if(line == null) { ...
do { line = in.readLine(); if(line == null) { context.streamEmpty(); throw new IOException("Premature end of stream encountered"); } } while(!line.startsWith("SQ")); line = in.readLine(); if(line == null) { context.streamEmpty(); throw new IOException("Premature end of stream encountered"); } List resList = new Array...
public Sequence readSequence(StreamReader.Context context, ResidueParser resParser, SequenceFactory sf) throws IllegalResidueException, IOException { final BufferedReader in = context.getReader(); String accession; String line; while(true) { line = in.readLine(); if(line == null) { ...
throws IOException { }
throws IOException { throw new RuntimeException("Can't write in EMBL format..."); }
public void writeSequence(Sequence seq, PrintStream os) throws IOException { }
res.add(expandBases(alpha, symList, built2));
res.addAll(expandBases(alpha, symList, built2));
private static Set expandBases(Alphabet alpha, List symList, List built) { int indx = built.size(); if(indx < symList.size()) { Symbol s = (Symbol) symList.get(indx); if(s instanceof BasisSymbol) { built.add(s); return expandBases(alpha, symList, built); } else { Set res = ne...
int [][] forwardTransitions = dp.getForwardTransitions(); double [][] forwardTransitionScores = dp.getForwardTransitionScores(scoreType);
protected double singleSequenceIteration( ModelTrainer trainer, SymbolList symList ) throws IllegalSymbolException, IllegalTransitionException, IllegalAlphabetException { ScoreType scoreType = ScoreType.PROBABILITY; SingleDP dp = (SingleDP) getDP(); State [] states = dp.getStates(); int [][] forwardTransit...
double bs = bm.getScore();
protected double singleSequenceIteration( ModelTrainer trainer, SymbolList symList ) throws IllegalSymbolException, IllegalTransitionException, IllegalAlphabetException { ScoreType scoreType = ScoreType.PROBABILITY; SingleDP dp = (SingleDP) getDP(); State [] states = dp.getStates(); int [][] forwardTransit...
rs.close(); get_annotations.close();
public void retrieveFeatures(int bioentry_id, SeqIOListener listener, Location overlappingRegion, int immediateChildrenOfParent, int featureID) throws SQLException, BioException { C...
rs.close(); discover_parent.close();
public void retrieveFeatures(int bioentry_id, SeqIOListener listener, Location overlappingRegion, int immediateChildrenOfParent, int featureID) throws SQLException, BioException { C...
Contract.pre(qStrand != null, "query strand was null"); Contract.pre(sStrand != null, "subject strand was null");
public SimpleSeqSimilaritySearchHit(double score, double eValue, double pValue, int qStart, int qEnd, Strand qStrand, int sStart, ...
int sIndex;
public SymbolListCharSequence(SymbolList syms) { FiniteAlphabet alphabet = (FiniteAlphabet) syms.getAlphabet(); if (! (alphabet instanceof FiniteAlphabet)) throw new IllegalArgumentException("Only SymbolLists using a FiniteAlphabet are supported by SymbolListCharSequence"); Symbol...
double [][] forwardTransitionScores = dp.getForwardTransitionScores();
double [][] forwardTransitionScores = dp.getForwardTransitionScores(scoreType);
protected double singleSequenceIteration( ModelTrainer trainer, SymbolList resList ) throws IllegalSymbolException, IllegalTransitionException, IllegalAlphabetException { DP dp = getDP(); State [] states = dp.getStates(); int [][] forwardTransitions = dp.getForwardTransitions(); double [][] forward...
double [][] backwardTransitionScores = dp.getBackwardTransitionScores(); MarkovModel model = dp.getModel();
double [][] backwardTransitionScores = dp.getBackwardTransitionScores(scoreType); MarkovModel model = dp.getModel();
protected double singleSequenceIteration( ModelTrainer trainer, SymbolList resList ) throws IllegalSymbolException, IllegalTransitionException, IllegalAlphabetException { DP dp = getDP(); State [] states = dp.getStates(); int [][] forwardTransitions = dp.getForwardTransitions(); double [][] forward...
SingleDPMatrix fm = (SingleDPMatrix) dp.forwardMatrix(rll);
SingleDPMatrix fm = (SingleDPMatrix) dp.forwardMatrix(rll, scoreType);
protected double singleSequenceIteration( ModelTrainer trainer, SymbolList resList ) throws IllegalSymbolException, IllegalTransitionException, IllegalAlphabetException { DP dp = getDP(); State [] states = dp.getStates(); int [][] forwardTransitions = dp.getForwardTransitions(); double [][] forward...
SingleDPMatrix bm = (SingleDPMatrix) dp.backwardMatrix(rll);
SingleDPMatrix bm = (SingleDPMatrix) dp.backwardMatrix(rll, scoreType);
protected double singleSequenceIteration( ModelTrainer trainer, SymbolList resList ) throws IllegalSymbolException, IllegalTransitionException, IllegalAlphabetException { DP dp = getDP(); State [] states = dp.getStates(); int [][] forwardTransitions = dp.getForwardTransitions(); double [][] forward...
new FeatureFilter.Not(new FeatureFilter.IsTopLevel()));
new FeatureFilter.Not(FeatureFilter.top_level));
public FeatureHolder filter(FeatureFilter ff) { FeatureFilter childFilter = new FeatureFilter.And(new FeatureFilter.ByParent(new FeatureFilter.ByClass(ComponentFeature.class)), new FeatureFilter.Not(new FeatureFilter.IsTopLevel())); ...
if(i == -1) {
if(i < 0) {
public Symbol symbolAt(int indx) throws IndexOutOfBoundsException { if(indx > length() || indx < 1) { throw new IndexOutOfBoundsException( "Attempted to read outside of this sequence (1.." + length() + ") at " + indx ); } int i = findViewBlock(indx); if(i == -1) { return getAlphabet...
protected SimpleTaxa(String scientificName, String commonName) { this.scientificName = scientificName; this.commonName = commonName; }
protected SimpleTaxa() { super(); }
protected SimpleTaxa(String scientificName, String commonName) { this.scientificName = scientificName; this.commonName = commonName; }
return CRC.crc64(sb.toString());
Checksum cs = new CRC64Checksum(); cs.update(sb.toString().getBytes(), 0, sb.length()); return cs.toString();
public String getCRC() { StringBuffer sb = new StringBuffer(); sb.append((this.authors==null || this.authors.equals(""))?"<undef>":this.authors); sb.append((this.title==null || this.title.equals(""))?"<undef>":this.title); sb.append((this.location==null || this.location.equals(""))?"<un...
Atom atom = (Atom) iter.next() ;
Atom atom = null ; atom = (Atom) iter.next() ;
public static void rotate(Structure structure, double[][] m) throws StructureException { if ( m.length != 3 ) { throw new StructureException ("matrix does not have size 3x3 !"); } AtomIterator iter = new AtomIterator(structure) ; while (iter.hasNext()) { Atom atom = (Atom) iter.next() ; double x = a...
Atom atom = (Atom) iter.next() ; atom = add(atom,a);
Atom atom = null ; atom = (Atom) iter.next() ; Atom natom = add(atom,a); double x = natom.getX(); double y = natom.getY() ; double z = natom.getZ(); atom.setX(x); atom.setY(y); atom.setZ(z);
public static void shift(Structure structure, Atom a ){ AtomIterator iter = new AtomIterator(structure) ; while (iter.hasNext() ) { Atom atom = (Atom) iter.next() ; atom = add(atom,a); } }
current_atom_pos = 0 ;
current_atom_pos = -1 ; return next();
public Object next() throws NoSuchElementException { current_atom_pos++ ; if ( current_atom_pos >= group.size() ) { if ( groupiter == null ) { throw new NoSuchElementException("no more atoms found in group!"); } if ( groupiter.hasNext() ) { group = (Group) groupiter.next() ; current_atom_pos = ...
Atom a ;
public Object next() throws NoSuchElementException { current_atom_pos++ ; if ( current_atom_pos >= group.size() ) { if ( groupiter == null ) { throw new NoSuchElementException("no more atoms found in group!"); } if ( groupiter.hasNext() ) { group = (Group) groupiter.next() ; current_atom_pos = ...
HashMap sequenceDataMap = new HashMap();
LinkedHashMap sequenceDataMap = new LinkedHashMap();
public Alignment read (BufferedReader reader) { Vector sequenceNames = new Vector(); String sequenceName = null; String sequenceData[] = null; int startOfData = 0; //the start of the sequence data in the line int currSeqCount = 0; //which seque...
return (new SimpleAlignment(sequenceDataMap));
SimpleAlignment sa=new SimpleAlignment(sequenceDataMap); return (sa);
public Alignment read (BufferedReader reader) { Vector sequenceNames = new Vector(); String sequenceName = null; String sequenceData[] = null; int startOfData = 0; //the start of the sequence data in the line int currSeqCount = 0; //which seque...
public SymbolList getComponentSymbols(Location loc) { Object o = components.get(loc); if (o instanceof ComponentFeature) { ComponentFeature cf = (ComponentFeature) o; return cf.getSymbols(); } else { return (SymbolList) o;
private SymbolList getComponentSymbols(Location loc) { Object o = components.get(loc); if (o instanceof ComponentFeature) { ComponentFeature cf = (ComponentFeature) o; SymbolList sl = cf.getSymbols(); if (cf.getStrand() == StrandedFeature.NEGATIVE) { try { sl = DNATools.reverseComplement(sl); } catch (IllegalAlphabetEx...
public SymbolList getComponentSymbols(Location loc) { Object o = components.get(loc); if (o instanceof ComponentFeature) { ComponentFeature cf = (ComponentFeature) o; return cf.getSymbols(); } else { return (SymbolList) o; } }
}
public SymbolList getComponentSymbols(Location loc) { Object o = components.get(loc); if (o instanceof ComponentFeature) { ComponentFeature cf = (ComponentFeature) o; return cf.getSymbols(); } else { return (SymbolList) o; } }
public Location locationOfPoint(int p) { if (lastLocation.contains(p)) { return lastLocation;
private Location locationOfPoint(int p) { if (lastLocation.contains(p)) { return lastLocation; } int first = 0; int last = componentList.size() - 1; while (first <= last) { int check = (first + last) / 2; Location checkL = (Location) componentList.get(check); if (checkL.contains(p)) { lastLocation = checkL; return ch...
public Location locationOfPoint(int p) { if (lastLocation.contains(p)) { return lastLocation; } int first = 0; int last = componentList.size() - 1; while (first <= last) { int check = (first + last) / 2; Location checkL = (Location) componentList.get(check); if (checkL.contains(p)) ...
int first = 0; int last = componentList.size() - 1; while (first <= last) { int check = (first + last) / 2; Location checkL = (Location) componentList.get(check); if (checkL.contains(p)) { lastLocation = checkL; return checkL; } if (p < checkL.getMin()) { last = check - 1; } else { first = check + 1; } } return null...
public Location locationOfPoint(int p) { if (lastLocation.contains(p)) { return lastLocation; } int first = 0; int last = componentList.size() - 1; while (first <= last) { int check = (first + last) / 2; Location checkL = (Location) componentList.get(check); if (checkL.contains(p)) ...
public Location locationUpstreamOfPoint(int p) {
private Location locationUpstreamOfPoint(int p) {
public Location locationUpstreamOfPoint(int p) { int first = 0; int last = componentList.size() - 1; int check = 0; Location checkL = null; while (first <= last) { check = (first + last) / 2; checkL = (Location) componentList.get(check); if (checkL.contains(p)) return checkL; if (p < checkL.getMin...
private SingleFeatureReceiver(Sequence seq) { super(seq);
private SingleFeatureReceiver() { super(BioSQLSequenceDB.this);
private SingleFeatureReceiver(Sequence seq) { super(seq); }
return null;
try { SingleFeatureReceiver receiver = new SingleFeatureReceiver(); getFeaturesSQL().retrieveFeatures(-1, receiver, null, -1, feature_id); if (receiver.getFeature() == null) { throw new BioRuntimeException("Dangling internal_feature_id"); } else { featuresByID.put(key, (BioSQLFeature) receiver.getFeature()); return (Bi...
BioSQLFeature getFeatureByID(int feature_id) { Integer key = new Integer(feature_id); BioSQLFeature f = (BioSQLFeature) featuresByID.get(key); if (f != null) { return f; } // try { // SingleFeatureReceiver receiver = new SingleFeatureReceiver return null; }
return "{" + from + ", " + to + "}";
return "(" + from + ", " + to + ")";
public String toString() { return "{" + from + ", " + to + "}"; }
rlistener.addSequenceProperty(getMolTypeTerm(),m.group(3));
public boolean readRichSequence(BufferedReader reader, SymbolTokenization symParser, RichSeqIOListener rlistener, Namespace ns) throws IllegalSymbolException, IOException, ParseException { String line; boolean hasAnotherSequence = true; boolea...
rlistener.addSequenceProperty(getModificationTerm(), date);
rlistener.addSequenceProperty(Terms.getModificationTerm(), date);
public boolean readRichSequence(BufferedReader reader, SymbolTokenization symParser, RichSeqIOListener rlistener, Namespace ns) throws IllegalSymbolException, IOException, ParseException { String line; boolean hasAnotherSequence = true; boolea...
rlistener.addSequenceProperty(getAccessionTerm(),accs[i].trim());
rlistener.addSequenceProperty(Terms.getAccessionTerm(),accs[i].trim());
public boolean readRichSequence(BufferedReader reader, SymbolTokenization symParser, RichSeqIOListener rlistener, Namespace ns) throws IllegalSymbolException, IOException, ParseException { String line; boolean hasAnotherSequence = true; boolea...
rlistener.addSequenceProperty(getKeywordsTerm(), kws[i].trim());
rlistener.addSequenceProperty(Terms.getKeywordsTerm(), kws[i].trim());
public boolean readRichSequence(BufferedReader reader, SymbolTokenization symParser, RichSeqIOListener rlistener, Namespace ns) throws IllegalSymbolException, IOException, ParseException { String line; boolean hasAnotherSequence = true; boolea...
pcr = (CrossRef)RichObjectFactory.getObject(SimpleCrossRef.class,new Object[]{"PUBMED", pubmed});
pcr = (CrossRef)RichObjectFactory.getObject(SimpleCrossRef.class,new Object[]{Terms.PUBMED_KEY, pubmed});
public boolean readRichSequence(BufferedReader reader, SymbolTokenization symParser, RichSeqIOListener rlistener, Namespace ns) throws IllegalSymbolException, IOException, ParseException { String line; boolean hasAnotherSequence = true; boolea...
mcr = (CrossRef)RichObjectFactory.getObject(SimpleCrossRef.class,new Object[]{"MEDLINE", medline});
mcr = (CrossRef)RichObjectFactory.getObject(SimpleCrossRef.class,new Object[]{Terms.MEDLINE_KEY, medline});
public boolean readRichSequence(BufferedReader reader, SymbolTokenization symParser, RichSeqIOListener rlistener, Namespace ns) throws IllegalSymbolException, IOException, ParseException { String line; boolean hasAnotherSequence = true; boolea...
dcr = (CrossRef)RichObjectFactory.getObject(SimpleCrossRef.class,new Object[]{"DOI", doi});
dcr = (CrossRef)RichObjectFactory.getObject(SimpleCrossRef.class,new Object[]{Terms.DOI_KEY, doi});
public boolean readRichSequence(BufferedReader reader, SymbolTokenization symParser, RichSeqIOListener rlistener, Namespace ns) throws IllegalSymbolException, IOException, ParseException { String line; boolean hasAnotherSequence = true; boolea...
templ.sourceTerm = getEMBLTerm();
templ.sourceTerm = Terms.getEMBLTerm();
public boolean readRichSequence(BufferedReader reader, SymbolTokenization symParser, RichSeqIOListener rlistener, Namespace ns) throws IllegalSymbolException, IOException, ParseException { String line; boolean hasAnotherSequence = true; boolea...
for (int i = 1 ; i < section.size(); i++) seq.append(((String[])section.get(i))[1]);
for (int i = 0 ; i < section.size(); i++) seq.append(((String[])section.get(i))[1]);
public boolean readRichSequence(BufferedReader reader, SymbolTokenization symParser, RichSeqIOListener rlistener, Namespace ns) throws IllegalSymbolException, IOException, ParseException { String line; boolean hasAnotherSequence = true; boolea...
section.add(new String[]{START_SEQUENCE_TAG,null});
StringBuffer sb = new StringBuffer();
private List readSection(BufferedReader br) throws ParseException { List section = new ArrayList(); String line; String currKey = null; StringBuffer currVal = new StringBuffer(); boolean done = false; int linecount = 0; // while not done try { ...
section.add(new String[]{"",line.replaceAll("\\d","")});
sb.append(line.replaceAll("\\d",""));
private List readSection(BufferedReader br) throws ParseException { List section = new ArrayList(); String line; String currKey = null; StringBuffer currVal = new StringBuffer(); boolean done = false; int linecount = 0; // while not done try { ...
done = true; } else if (token.equals(DELIMITER_TAG)) { section.add(new String[]{DELIMITER_TAG,null});
private List readSection(BufferedReader br) throws ParseException { List section = new ArrayList(); String line; String currKey = null; StringBuffer currVal = new StringBuffer(); boolean done = false; int linecount = 0; // while not done try { ...
private void writeWrappedLocationLine(String key, int indent, String text, PrintStream os) throws IOException { this._writeWrappedLine(key,indent,text,os,",");
private void writeWrappedLocationLine(String key, int initialIndent, String name, int secondIndent, String location, PrintStream os) { this._writeDoubleWrappedLine(",", key, initialIndent, name, secondIndent, location, os);
private void writeWrappedLocationLine(String key, int indent, String text, PrintStream os) throws IOException { this._writeWrappedLine(key,indent,text,os,","); }
FiniteAutomaton.NodeSet initialSet = nfa.createNodeSet(); initialSet.addNode(nfa.getStart()); closureSets.put(initialSet, new DfaNode(dfa.getStart(), initialSet));
DfaBuilder(Nfa nfa) { this.nfa = nfa; dfa = new FiniteAutomaton("dfa_" + nfa.getName(), nfa.getAlphabet()); }
private void constructSubsets(DfaNode dfaNode)
public void constructSubsets()
private void constructSubsets(DfaNode dfaNode) throws AutomatonException { // retrieve the NFA nodes FiniteAutomaton.NodeSet closureSet = dfaNode.closureSet; // what Symbols have transitions from the source closure set? Set symbolSet = new HashSet(); for (Iterator closI ...
FiniteAutomaton.NodeSet closureSet = dfaNode.closureSet; Set symbolSet = new HashSet(); for (Iterator closI = closureSet.iterator(); closI.hasNext(); ) { org.biojava.utils.automata.Nfa.Node node = (org.biojava.utils.automata.Nfa.Node) closI.next(); symbolSet.add(nfa.getSymbols(node)); } for (Iterator symI = symbo...
FiniteAutomaton.NodeSet initialSet = nfa.createNodeSet(); initialSet.addNode(nfa.getStart()); constructSubsets(getDfaNode(initialSet));
private void constructSubsets(DfaNode dfaNode) throws AutomatonException { // retrieve the NFA nodes FiniteAutomaton.NodeSet closureSet = dfaNode.closureSet; // what Symbols have transitions from the source closure set? Set symbolSet = new HashSet(); for (Iterator closI ...
DfaNode dfaNode;
DfaNode dfaNode = (DfaNode) closureSets.get(nfaNodes);
private DfaNode getDfaNode(FiniteAutomaton.NodeSet nfaNodes) { DfaNode dfaNode; if ((dfaNode = (DfaNode) closureSets.get(nfaNodes)) == null) { return (DfaNode) closureSets.put(nfaNodes, new DfaNode(nfaNodes)); } else return dfaNode; }