rem
stringlengths
0
477k
add
stringlengths
0
313k
context
stringlengths
6
599k
queryText = "from SimpleNamespace as ns where ns.name = ?";
queryText = "from Namespace as ns where ns.name = ?";
public Object buildObject(Class clazz, Object[] params) { Object o = super.buildObject(clazz, params); String queryText; if (o instanceof SimpleNamespace) { queryText = "from SimpleNamespace as ns where ns.name = ?"; } else if (o instanceof SimpleComparableOntology) { ...
queryText = "from SimpleComparableOntology as o where o.name = ?";
queryText = "from Ontology as o where o.name = ?";
public Object buildObject(Class clazz, Object[] params) { Object o = super.buildObject(clazz, params); String queryText; if (o instanceof SimpleNamespace) { queryText = "from SimpleNamespace as ns where ns.name = ?"; } else if (o instanceof SimpleComparableOntology) { ...
queryText = "from SimpleNCBITaxon as o where o.NCBITaxID = ?";
queryText = "from Taxon as o where o.NCBITaxID = ?";
public Object buildObject(Class clazz, Object[] params) { Object o = super.buildObject(clazz, params); String queryText; if (o instanceof SimpleNamespace) { queryText = "from SimpleNamespace as ns where ns.name = ?"; } else if (o instanceof SimpleComparableOntology) { ...
queryText = "from SimpleCrossRef as cr where cr.dbname = ? and cr.accession = ?";
queryText = "from CrossRef as cr where cr.dbname = ? and cr.accession = ?";
public Object buildObject(Class clazz, Object[] params) { Object o = super.buildObject(clazz, params); String queryText; if (o instanceof SimpleNamespace) { queryText = "from SimpleNamespace as ns where ns.name = ?"; } else if (o instanceof SimpleComparableOntology) { ...
queryText = "from SimpleDocRef as cr where cr.authors = ? and cr.location = ?";
queryText = "from DocRef as cr where cr.authors = ? and cr.location = ?";
public Object buildObject(Class clazz, Object[] params) { Object o = super.buildObject(clazz, params); String queryText; if (o instanceof SimpleNamespace) { queryText = "from SimpleNamespace as ns where ns.name = ?"; } else if (o instanceof SimpleComparableOntology) { ...
FeatureFilter.And ffa = (FeatureFilter.And) ff;
public void writeFilter(FeatureFilter ff, XMLWriter xw, XMLFilterWriter config) throws ClassCastException, IllegalArgumentException, IOException { FeatureFilter.And ffa = (FeatureFilter.And) ff; xw.openTag(XML_...
FeatureFilter.Or ffa = (FeatureFilter.Or) ff;
public void writeFilter(FeatureFilter ff, XMLWriter xw, XMLFilterWriter config) throws ClassCastException, IllegalArgumentException, IOException { FeatureFilter.Or ffa = (FeatureFilter.Or) ff; xw.openTag(XML_FI...
public KeyedWeakReference(Object key, Object ref, ReferenceQueue queue) { super(ref, queue);
public KeyedWeakReference(Object key, Object ref) { super(ref);
public KeyedWeakReference(Object key, Object ref, ReferenceQueue queue) { super(ref, queue); this.key = key; }
numNs = Math.min(loc.getMin(), end) - pos;
numNs = Math.min(loc.getMin(), end + 1) - pos;
public String subStr(int start, int end) { if (start < 1 || end > length) { throw new IndexOutOfBoundsException("Range out of bounds: " + start + " - " + end); } StringBuffer sb = new StringBuffer(); int pos = start; while (pos <= end) { Location loc = locationOfPoint(pos); if (loc != null) { SymbolLis...
catch (IOException iox)
catch (IOException ioe)
public boolean hasNext() { if (! moreSearchesAvailable) try { reader.close(); } catch (IOException iox) { iox.printStackTrace(); } return moreSearchesAvailable; }
iox.printStackTrace();
ioe.printStackTrace();
public boolean hasNext() { if (! moreSearchesAvailable) try { reader.close(); } catch (IOException iox) { iox.printStackTrace(); } return moreSearchesAvailable; }
catch (ParserException pex)
catch (ParserException pe)
public Object next() throws NoSuchElementException { if (! moreSearchesAvailable) throw new NoSuchElementException("Attempt to read search result from empty stream"); try { moreSearchesAvailable = parser.parseSearch(reader, handler); return handler.makeSearchResult(); } catch (ParserException pex) { ...
+ pex.getLineNumber()
+ pe.getLineNumber()
public Object next() throws NoSuchElementException { if (! moreSearchesAvailable) throw new NoSuchElementException("Attempt to read search result from empty stream"); try { moreSearchesAvailable = parser.parseSearch(reader, handler); return handler.makeSearchResult(); } catch (ParserException pex) { ...
catch (IOException iox)
catch (IOException ioe)
public Object next() throws NoSuchElementException { if (! moreSearchesAvailable) throw new NoSuchElementException("Attempt to read search result from empty stream"); try { moreSearchesAvailable = parser.parseSearch(reader, handler); return handler.makeSearchResult(); } catch (ParserException pex) { ...
catch (BioException bex)
catch (BioException be)
public Object next() throws NoSuchElementException { if (! moreSearchesAvailable) throw new NoSuchElementException("Attempt to read search result from empty stream"); try { moreSearchesAvailable = parser.parseSearch(reader, handler); return handler.makeSearchResult(); } catch (ParserException pex) { ...
+ bex.getMessage());
+ be.getMessage());
public Object next() throws NoSuchElementException { if (! moreSearchesAvailable) throw new NoSuchElementException("Attempt to read search result from empty stream"); try { moreSearchesAvailable = parser.parseSearch(reader, handler); return handler.makeSearchResult(); } catch (ParserException pex) { ...
public void postChangeTransitionScore(TransitionEvent te) { updateTransitions(); }
public void postChangeTransitionScore(TransitionEvent te) {}
public void postChangeTransitionScore(TransitionEvent te) { updateTransitions(); }
public void postCreateTransition(TransitionEvent te) { updateTransitions(); }
public void postCreateTransition(TransitionEvent te) {}
public void postCreateTransition(TransitionEvent te) { updateTransitions(); }
public void postDestroyTransition(TransitionEvent te) { updateTransitions(); }
public void postDestroyTransition(TransitionEvent te) {}
public void postDestroyTransition(TransitionEvent te) { updateTransitions(); }
throws ModelVetoException {}
throws ModelVetoException { complain(te); }
public void preChangeTransitionScore(TransitionEvent te) throws ModelVetoException {}
throws ModelVetoException {}
throws ModelVetoException { complain(te); }
public void preCreateTransition(TransitionEvent te) throws ModelVetoException {}
throws ModelVetoException {}
throws ModelVetoException { complain(te); }
public void preDestroyTransition(TransitionEvent te) throws ModelVetoException {}
HMMOrderByTransition(MarkovModel mm) {
private HMMOrderByTransition(MarkovModel mm) {
HMMOrderByTransition(MarkovModel mm) { this.mm = mm; }
this.forwardTransitionScores = new HashMap(); this.backwardTransitionScores = new HashMap();
public DP(MarkovModel model) throws IllegalSymbolException, IllegalTransitionException, BioException { this.model = model; updateTransitions(); model.addTransitionListener(UPDATER); }
public abstract double backward(SymbolList [] resList)
public abstract double backward(SymbolList [] resList, ScoreType scoreType)
public abstract double backward(SymbolList [] resList) throws IllegalSymbolException, IllegalAlphabetException, IllegalTransitionException;
public abstract DPMatrix backwardMatrix(SymbolList [] resList)
public abstract DPMatrix backwardMatrix(SymbolList [] resList, ScoreType scoreType)
public abstract DPMatrix backwardMatrix(SymbolList [] resList) throws IllegalSymbolException, IllegalAlphabetException, IllegalTransitionException;
int [][] transitions) throws IllegalSymbolException {
int [][] transitions, ScoreType scoreType ) throws IllegalSymbolException {
public static double [][] backwardTransitionScores(MarkovModel model, State [] states, int [][] transitions) throws IllegalSymbolException { int stateCount = states.length; double [][] scores = new double[stateCount][]; for (int i = 0; i < stateCount; i++) { State is = states[i]; scores[i] = ...
scores[i][j] = model.getWeights(is).getWeight(states[transitions[i][j]]);
scores[i][j] = Math.log(scoreType.calculateScore( model.getWeights(is), states[transitions[i][j]] ));
public static double [][] backwardTransitionScores(MarkovModel model, State [] states, int [][] transitions) throws IllegalSymbolException { int stateCount = states.length; double [][] scores = new double[stateCount][]; for (int i = 0; i < stateCount; i++) { State is = states[i]; scores[i] = ...
if (trans.contains(states[j]))
if (trans.contains(states[j])) {
public static int [][] backwardTransitions(MarkovModel model, State [] states) throws IllegalSymbolException { int stateCount = states.length; int [][] transitions = new int[stateCount][]; for (int i = 0; i < stateCount; i++) { int [] tmp = new int[stateCount]; int len = 0; FiniteAlphabet ...
for (int j = 0; j < len; j++)
for (int j = 0; j < len; j++) {
public static int [][] backwardTransitions(MarkovModel model, State [] states) throws IllegalSymbolException { int stateCount = states.length; int [][] transitions = new int[stateCount][]; for (int i = 0; i < stateCount; i++) { int [] tmp = new int[stateCount]; int len = 0; FiniteAlphabet ...
}
public static int [][] backwardTransitions(MarkovModel model, State [] states) throws IllegalSymbolException { int stateCount = states.length; int [][] transitions = new int[stateCount][]; for (int i = 0; i < stateCount; i++) { int [] tmp = new int[stateCount]; int len = 0; FiniteAlphabet ...
System.out.println("Got state " + s + " with name " + s.getName());
public static MarkovModel flatView(MarkovModel model) throws IllegalAlphabetException, IllegalSymbolException { for(Iterator i = model.stateAlphabet().iterator(); i.hasNext(); ) { State s = (State) i.next(); if( !(s instanceof DotState) && !(s instanceof EmissionState) ) { Syst...
public abstract double forward(SymbolList [] resList)
public abstract double forward(SymbolList [] resList, ScoreType scoreType)
public abstract double forward(SymbolList [] resList) throws IllegalSymbolException, IllegalAlphabetException, IllegalTransitionException;
public abstract DPMatrix forwardMatrix(SymbolList [] resList)
public abstract DPMatrix forwardMatrix(SymbolList [] resList, ScoreType scoreType)
public abstract DPMatrix forwardMatrix(SymbolList [] resList) throws IllegalSymbolException, IllegalAlphabetException, IllegalTransitionException;
int [][] transitions
int [][] transitions, ScoreType scoreType
public static double [][] forwardTransitionScores( MarkovModel model, State [] states, int [][] transitions ) throws IllegalSymbolException { int stateCount = states.length; double [][] scores = new double[stateCount][]; for (int i = 0; i < stateCount; i++) { State is = states[i]; scores[...
scores[i][j] = model.getWeights(states[transitions[i][j]]).getWeight(is);
scores[i][j] = Math.log(scoreType.calculateScore( model.getWeights(states[transitions[i][j]]), is ));
public static double [][] forwardTransitionScores( MarkovModel model, State [] states, int [][] transitions ) throws IllegalSymbolException { int stateCount = states.length; double [][] scores = new double[stateCount][]; for (int i = 0; i < stateCount; i++) { State is = states[i]; scores[...
for (int j = 0; j < len; j++)
for (int j = 0; j < len; j++) {
public static int [][] forwardTransitions( MarkovModel model, State [] states ) throws IllegalSymbolException { int stateCount = states.length; int [][] transitions = new int[stateCount][]; for (int i = 0; i < stateCount; i++) { int [] tmp = new int[stateCount]; int len = 0; FiniteAlpha...
}
public static int [][] forwardTransitions( MarkovModel model, State [] states ) throws IllegalSymbolException { int stateCount = states.length; int [][] transitions = new int[stateCount][]; for (int i = 0; i < stateCount; i++) { int [] tmp = new int[stateCount]; int len = 0; FiniteAlpha...
public DPMatrix forwardsBackwards(SymbolList [] resList)
public DPMatrix forwardsBackwards(SymbolList [] resList, ScoreType scoreType)
public DPMatrix forwardsBackwards(SymbolList [] resList) throws BioException { try { System.out.println("Making backward matrix"); final DPMatrix bMatrix = backwardMatrix(resList); System.out.println("Making forward matrix"); final DPMatrix fMatrix = forwardMatrix(resList); System.out...
final DPMatrix bMatrix = backwardMatrix(resList);
final DPMatrix bMatrix = backwardMatrix(resList, scoreType);
public DPMatrix forwardsBackwards(SymbolList [] resList) throws BioException { try { System.out.println("Making backward matrix"); final DPMatrix bMatrix = backwardMatrix(resList); System.out.println("Making forward matrix"); final DPMatrix fMatrix = forwardMatrix(resList); System.out...
final DPMatrix fMatrix = forwardMatrix(resList);
final DPMatrix fMatrix = forwardMatrix(resList, scoreType);
public DPMatrix forwardsBackwards(SymbolList [] resList) throws BioException { try { System.out.println("Making backward matrix"); final DPMatrix bMatrix = backwardMatrix(resList); System.out.println("Making forward matrix"); final DPMatrix fMatrix = forwardMatrix(resList); System.out...
public double [][] getBackwardTransitionScores() { return backwardTransitionScores;
public double [][] getBackwardTransitionScores(ScoreType scoreType) { double [][] ts = (double [][]) backwardTransitionScores.get(scoreType); if(ts == null) { try { backwardTransitionScores.put(scoreType, ts = backwardTransitionScores( getModel(), getStates(), backwardTransitions, scoreType )); } catch (IllegalSymbolEx...
public double [][] getBackwardTransitionScores() { return backwardTransitionScores; }
public double [][] getForwardTransitionScores() { return forwardTransitionScores;
public double [][] getForwardTransitionScores(ScoreType scoreType) { double [][] ts = (double [][]) forwardTransitionScores.get(scoreType); if(ts == null) { try { forwardTransitionScores.put(scoreType, ts = forwardTransitionScores( getModel(), getStates(), forwardTransitions, scoreType )); } catch (IllegalSymbolExcepti...
public double [][] getForwardTransitionScores() { return forwardTransitionScores; }
for (int c = 0; c < cols; c++)
for (int c = 0; c < cols; c++) {
public static double scoreWeightMatrix( WeightMatrix matrix, SymbolList symList, int start) throws IllegalSymbolException { double score = 0; int cols = matrix.columns(); for (int c = 0; c < cols; c++) score += Math.log(matrix.getColumn(c).getWeight(symList.symbolAt(c + start))); return score; }
}
public static double scoreWeightMatrix( WeightMatrix matrix, SymbolList symList, int start) throws IllegalSymbolException { double score = 0; int cols = matrix.columns(); for (int c = 0; c < cols; c++) score += Math.log(matrix.getColumn(c).getWeight(symList.symbolAt(c + start))); return score; }
this.forwardTransitionScores = forwardTransitionScores( model, states, forwardTransitions );
this.forwardTransitionScores.clear();
public void updateTransitions() { try { this.states = stateList(model); this.forwardTransitions = forwardTransitions(model, states); this.forwardTransitionScores = forwardTransitionScores( model, states, forwardTransitions ); this.backwardTransitions = backwardTransitions(mod...
this.backwardTransitionScores = backwardTransitionScores( model, states, backwardTransitions );
this.backwardTransitionScores.clear();
public void updateTransitions() { try { this.states = stateList(model); this.forwardTransitions = forwardTransitions(model, states); this.forwardTransitionScores = forwardTransitionScores( model, states, forwardTransitions ); this.backwardTransitions = backwardTransitions(mod...
public abstract StatePath viterbi(SymbolList [] resList)
public abstract StatePath viterbi(SymbolList [] resList, ScoreType scoreType)
public abstract StatePath viterbi(SymbolList [] resList) throws IllegalSymbolException, IllegalArgumentException, IllegalAlphabetException, IllegalTransitionException;
for (Iterator ai = ((List) value).iterator(); ai.hasNext();)
List l; if(value instanceof List){ l = (List)value; }else{ l = new ArrayList(); l.add(value); } for (Iterator ai = l.iterator(); ai.hasNext();)
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 (k...
System.out.println("Stream read interupted");
System.out.println("Stream read interrupted");
public void parse(InputSource poSource ) throws IOException,SAXException { BufferedReader oContents; String oLine = null; //Use method form superclass oContents = this.getContentStream(poSource); // loop over file try { // loop over file oLine = oContents.readLine(); while...
public OverlayMap(Map parent) {
public OverlayMap(Map parent, Map overlay) {
public OverlayMap(Map parent) { super(); this.parent = parent; this.overlay = new HashMap(); }
this.overlay = new HashMap();
this.overlay = overlay;
public OverlayMap(Map parent) { super(); this.parent = parent; this.overlay = new HashMap(); }
public Segment(String id, int start, int stop) {
public Segment(String id) {
public Segment(String id, int start, int stop) { this.id = id; this.start = start; this.stop = stop; }
this.start = start; this.stop = stop;
this.start = this.stop = -1;
public Segment(String id, int start, int stop) { this.id = id; this.start = start; this.stop = stop; }
void registerFeatureFetcher(Object regKey) {
private void registerFeatureFetcher(int tileNum, Object regKey) {
void registerFeatureFetcher(Object regKey) { Location[] tiles = getTiles(); for (int t = 0; t < tiles.length; ++t) { registerFeatureFetcher(t, regKey); } }
for (int t = 0; t < tiles.length; ++t) { registerFeatureFetcher(t, regKey);
if (tileFeatures[tileNum] == null || tileFeatures[tileNum].get() == null) { if (featureTickets[tileNum] == null) { SeqIOListener listener = new DASFeatureSetPopulator(tileNum); FeatureRequestManager frm = refSequence.getParentDB().getFeatureRequestManager(); if (tiles.length > 1) { featureTickets[tileNum] = frm.request...
void registerFeatureFetcher(Object regKey) { Location[] tiles = getTiles(); for (int t = 0; t < tiles.length; ++t) { registerFeatureFetcher(t, regKey); } }
if (Character.isDigit(nextCh)) return NUMERIC;
private int nextTokenType() { if (!hasNext()) return EOL; char nextCh = packedTxt.charAt(ptr); // symbol tokens assumed to be alphas. if (Character.isLetter(nextCh)) return SYMBOL_TOKEN; // now check for specific chars if (n...
StringBuffer numString = new StringBuffer();
private Range getIterations() throws ParserException { Range range = new Range(); // consume the left brace toke.getToken(); // there can either be one or two numbers boolean onSecondArg = false; while (toke.hasNext()) { int tokenType = toke.nextTokenTy...
if (toke.getToken() == Tokenizer.LEFT_BRACE) {
if (toke.nextTokenType() == Tokenizer.LEFT_BRACE) {
public PatternSearch.Pattern parsePattern(String patternTxt, FiniteAlphabet alfa) throws BioException, IllegalSymbolException, IllegalAlphabetException, ParserException { toke = new Tokenizer(patternTxt); pattern = new PatternSearch.Pattern(patternTxt, alfa); symToke = alfa.getTokeniz...
} catch (MappingException e) { throw new SQLException("Type mapping exception:".concat(e.getMessage()));
public boolean execute(String sql) throws SQLException { zeroLastResources(); checkIfClosed(); connection.checkClosed(); switch (getStatementType(sql)) { case type_select: lastActionResultSet = executeQuery(sql); case type_update: break; default: { SimpleSQL ssql = new SimpleSQL(); ssql.setClient(client...
byte[] cmsg = ((org.pgj.messages.Error) msg).getMessage().getBytes();
byte[] cmsg = null; String mesg = ((org.pgj.messages.Error) msg).getMessage(); if(mesg == null ){ cmsg = new byte[0]; } else { cmsg = mesg.getBytes(); }
public void sendMessage(Message msg, PGStream stream) throws IOException { byte[] cname = ((org.pgj.messages.Error) msg).getExceptionClassName() .getBytes(); stream.SendInteger(cname.length, 4); stream.Send(cname); byte[] cmsg = ((org.pgj.messages.Error) msg).getMessage().getBytes(); stream.SendInteger(cmsg.le...
rlistener.addSequenceProperty(getMolTypeTerm(),m.group(3)); rlistener.addSequenceProperty(getModificationTerm(),m.group(6));
rlistener.addSequenceProperty(Terms.getMolTypeTerm(),m.group(3)); rlistener.addSequenceProperty(Terms.getModificationTerm(),m.group(6));
public boolean readRichSequence(BufferedReader reader, SymbolTokenization symParser, RichSeqIOListener rlistener, Namespace ns) throws IllegalSymbolException, IOException, ParseException { String line; boolean hasAnotherSequence = true; boolea...
if (stranded!=null) rlistener.addSequenceProperty(getStrandedTerm(),stranded);
if (stranded!=null) rlistener.addSequenceProperty(Terms.getStrandedTerm(),stranded);
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(), ((String[])section.get(0))[1]);
rlistener.addSequenceProperty(Terms.getKeywordsTerm(), ((String[])section.get(0))[1]);
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...
templ.sourceTerm = getGenBankTerm();
templ.sourceTerm = Terms.getGenBankTerm();
public boolean readRichSequence(BufferedReader reader, SymbolTokenization symParser, RichSeqIOListener rlistener, Namespace ns) throws IllegalSymbolException, IOException, ParseException { String line; boolean hasAnotherSequence = true; boolea...
return new SimpleSequence(resList, uri, name, annotation, realizer);
return new org.biojava.bio.seq.impl.SimpleSequence(resList, uri, name, annotation, realizer);
public Sequence createSequence(SymbolList resList, String uri, String name, Annotation annotation) { return new SimpleSequence(resList, uri, name, annotation, realizer); }
throw new IndexOutOfBoundsException();
throw new IndexOutOfBoundsException("Index out of range: " + pos);
public Symbol symbolAt(int pos) { if (pos < 1 || pos > length) throw new IndexOutOfBoundsException(); return array[offset + pos - 1]; }
protected URL getAddress (String id) throws MalformedURLException { String defaultReturnFormat="text"; FetchURL seqURL = new FetchURL(DBName, defaultReturnFormat); String baseurl = seqURL.getbaseURL(); String db = seqURL.getDB(); String returnFormat = seqURL.getReturnFormat(); String url = baseurl+db+"&id="+id; retur...
protected URL getAddress(String id) throws MalformedURLException { String defaultReturnFormat = "text"; FetchURL seqURL = new FetchURL(DBName, defaultReturnFormat); String baseurl = seqURL.getbaseURL(); String db = seqURL.getDB(); String returnFormat = seqURL.getReturnFormat(); String url = baseurl + db + "&id=" + id ...
protected URL getAddress (String id) throws MalformedURLException { String defaultReturnFormat="text"; FetchURL seqURL = new FetchURL(DBName, defaultReturnFormat); String baseurl = seqURL.getbaseURL(); String db = seqURL.getDB(); String returnFormat = seqURL.getReturnFormat(); String url = baseurl+db+"&id="+id; ...
public Sequence getSequence(String id) throws BioException { try { IOExceptionFound=false; ExceptionFound=false; URL queryURL = getAddress(id); SequenceFormat sFormat = getSequenceFormat(); SequenceBuilder sbuilder = new SimpleSequenceBuilder(); SequenceBuilderFactory sFact=new GenbankProcessor.Factory(SimpleSequenceB...
public Sequence getSequence(String id) throws BioException { try { IOExceptionFound = false; ExceptionFound = false; URL queryURL = getAddress(id); SequenceFormat sFormat = getSequenceFormat(); SequenceBuilder sbuilder = new SimpleSequenceBuilder(); SequenceBuilderFactory sFact = new GenbankProcessor.Factory( SimpleS...
public Sequence getSequence(String id) throws BioException { try { IOExceptionFound=false; ExceptionFound=false; URL queryURL = getAddress(id);//achieve URL based on ID // System.err.println("query is "+ queryURL.toString()); SequenceFormat sFormat = getSequenceFormat();//get incoming se...
hitQueryStart(), hitQueryEnd(), hitQueryStrand(), hitSubjectStart(), hitSubjectEnd(), hitSubjectStrand(),
subs[s].getQueryStart(), subs[e].getQueryEnd(), bestQueryStrand, subs[s].getSubjectStart(), subs[e].getSubjectEnd(), bestSubjectStrand,
private SeqSimilaritySearchHit makeHit() { double sc = Double.NaN; double ev = Double.NaN; double pv = Double.NaN; subs = (SeqSimilaritySearchSubHit []) subHits .toArray(new SeqSimilaritySearchSubHit [subHits.size() - 1]); // Sort to get highest score Arrays.s...
int qStart = Integer.parseInt((String) subHitData.get("QuerySequenceStart")); int qEnd = Integer.parseInt((String) subHitData.get("QuerySequenceEnd")); int sStart = Integer.parseInt((String) subHitData.get("HitSequenceStart")); int sEnd = Integer.parseInt((String) subHitData.get("HitSequenceEnd")); Strand qStrand ...
private SeqSimilaritySearchSubHit makeSubHit() throws BioException { double sc = Double.NaN; double ev = Double.NaN; double pv = Double.NaN; if (subHitData.containsKey("score")) sc = Double.parseDouble((String) subHitData.get("score")); if (subHitData.containsKey("ex...
{
private SeqSimilaritySearchSubHit makeSubHit() throws BioException { double sc = Double.NaN; double ev = Double.NaN; double pv = Double.NaN; if (subHitData.containsKey("score")) sc = Double.parseDouble((String) subHitData.get("score")); if (subHitData.containsKey("ex...
}
private SeqSimilaritySearchSubHit makeSubHit() throws BioException { double sc = Double.NaN; double ev = Double.NaN; double pv = Double.NaN; if (subHitData.containsKey("score")) sc = Double.parseDouble((String) subHitData.get("score")); if (subHitData.containsKey("ex...
this.annotation = (annotation == null ? new SimpleAnnotation() : annotation);
this.annotation = annotation; this.annotation.addChangeListener(ChangeListener.ALWAYS_VETO);
public SequenceDBSearchHit(String sequenceID, double score, double eValue, double pValue, List subHits, Annotation annotation) { Contract.pre(sequenceID != null, "sequenceID was null"); Contract.pre(! Double.isNaN(score), "score was NaN"); // pVa...
this.alignment.addChangeListener(ChangeListener.ALWAYS_VETO);
public SequenceDBSearchSubHit(double score, double eValue, double pValue, Alignment alignment) { this.score = score; this.pValue = eValue; this.eValue = pValue; this.alignment = alignment; }
if(sequence == null) {
if( (sequence == null) || (renderer == null) ) {
public void paintComponent(Graphics g) { if(sequence == null) { return; } Graphics2D g2 = (Graphics2D) g; Rectangle2D currentClip = g2.getClip().getBounds2D(); double minPos; double maxPos; if(direction == HORIZONTAL) { minPos = currentClip.getMinY(); maxPos = currentClip.getMa...
LineInfo currentLI;
public void paintComponent(Graphics g) { if(sequence == null) { return; } Graphics2D g2 = (Graphics2D) g; Rectangle2D currentClip = g2.getClip().getBounds2D(); double minPos; double maxPos; if(direction == HORIZONTAL) { minPos = currentClip.getMinY(); maxPos = currentClip.getMa...
for(int l = minOffset; l < lineInfos.size(); l++) {
for(int l = minOffset; l < realLines; l++) {
public void paintComponent(Graphics g) { if(sequence == null) { return; } Graphics2D g2 = (Graphics2D) g; Rectangle2D currentClip = g2.getClip().getBounds2D(); double minPos; double maxPos; if(direction == HORIZONTAL) { minPos = currentClip.getMinY(); maxPos = currentClip.getMa...
currentLI = (LineInfo) lineInfos.get(l);
public void paintComponent(Graphics g) { if(sequence == null) { return; } Graphics2D g2 = (Graphics2D) g; Rectangle2D currentClip = g2.getClip().getBounds2D(); double minPos; double maxPos; if(direction == HORIZONTAL) { minPos = currentClip.getMinY(); maxPos = currentClip.getMa...
for (Iterator i = views.iterator(); i.hasNext(); ) { SequenceRenderer r = (SequenceRenderer) i.next(); double depth = currentLI.getDepth(r); if (direction == HORIZONTAL) { clip.height = depth; } else { clip.width = depth; } Shape oldClip = g2.getClip(); g2.clip(clip); r.paint(g2, this, min, max); g2.setClip(oldClip); ...
double depth = offsets[l] - spacer; if(l != 0) { depth -= offsets[l-1];
public void paintComponent(Graphics g) { if(sequence == null) { return; } Graphics2D g2 = (Graphics2D) g; Rectangle2D currentClip = g2.getClip().getBounds2D(); double minPos; double maxPos; if(direction == HORIZONTAL) { minPos = currentClip.getMinY(); maxPos = currentClip.getMa...
g2.translate(-alongDim, spacer);
clip.height = depth;
public void paintComponent(Graphics g) { if(sequence == null) { return; } Graphics2D g2 = (Graphics2D) g; Rectangle2D currentClip = g2.getClip().getBounds2D(); double minPos; double maxPos; if(direction == HORIZONTAL) { minPos = currentClip.getMinY(); maxPos = currentClip.getMa...
g2.translate(spacer, -alongDim);
clip.width = depth; } Shape oldClip = g2.getClip(); renderer.paint(g2, this, min, max); if (direction == HORIZONTAL) { g2.translate(-alongDim, spacer + depth); } else { g2.translate(spacer + depth, -alongDim);
public void paintComponent(Graphics g) { if(sequence == null) { return; } Graphics2D g2 = (Graphics2D) g; Rectangle2D currentClip = g2.getClip().getBounds2D(); double minPos; double maxPos; if(direction == HORIZONTAL) { minPos = currentClip.getMinY(); maxPos = currentClip.getMa...
if(offsets[l] > maxPos) {
if( (min > sequence.length()) || (offsets[l] > maxPos)) {
public void paintComponent(Graphics g) { if(sequence == null) { return; } Graphics2D g2 = (Graphics2D) g; Rectangle2D currentClip = g2.getClip().getBounds2D(); double minPos; double maxPos; if(direction == HORIZONTAL) { minPos = currentClip.getMinY(); maxPos = currentClip.getMa...
int realLines;
public void resizeAndValidate() { System.out.println("resizeAndValidate starting"); Dimension d = null; int realLines; double acrossDim; if(sequence == null) { System.out.println("No sequence"); // no sequence - collapse down to no size at all alongDim = 0.0; acrossDim = 0.0; ...
if(sequence == null) {
if( (sequence == null) || (renderer == null) ) {
public void resizeAndValidate() { System.out.println("resizeAndValidate starting"); Dimension d = null; int realLines; double acrossDim; if(sequence == null) { System.out.println("No sequence"); // no sequence - collapse down to no size at all alongDim = 0.0; acrossDim = 0.0; ...
double insetBefore = 0.0; double insetAfter = 0.0; for (Iterator i = views.iterator(); i.hasNext(); ) { SequenceRenderer r = (SequenceRenderer) i.next(); System.out.println("Renderer: " + r); insetBefore = Math.max(insetBefore, r.getMinimumLeader(this)); insetAfter = Math.max(insetAfter, r.getMinimumTrailer(this)); }
double insetBefore = renderer.getMinimumLeader(this); double insetAfter = renderer.getMinimumTrailer(this);
public void resizeAndValidate() { System.out.println("resizeAndValidate starting"); Dimension d = null; int realLines; double acrossDim; if(sequence == null) { System.out.println("No sequence"); // no sequence - collapse down to no size at all alongDim = 0.0; acrossDim = 0.0; ...
lineInfos.clear();
this.offsets = new double[realLines]; int li = 0; double totDepth = 0.0;
public void resizeAndValidate() { System.out.println("resizeAndValidate starting"); Dimension d = null; int realLines; double acrossDim; if(sequence == null) { System.out.println("No sequence"); // no sequence - collapse down to no size at all alongDim = 0.0; acrossDim = 0.0; ...
LineInfo li = new LineInfo();
public void resizeAndValidate() { System.out.println("resizeAndValidate starting"); Dimension d = null; int realLines; double acrossDim; if(sequence == null) { System.out.println("No sequence"); // no sequence - collapse down to no size at all alongDim = 0.0; acrossDim = 0.0; ...
for(Iterator i = views.iterator(); i.hasNext(); ) { SequenceRenderer sr = (SequenceRenderer) i.next(); li.setDepth(sr, sr.getDepth(this, min, max)); } acrossDim += li.getTotalDepth(); lineInfos.add(li);
double depth = renderer.getDepth(this, min, max); acrossDim += depth + spacer; offsets[li] = totDepth;
public void resizeAndValidate() { System.out.println("resizeAndValidate starting"); Dimension d = null; int realLines; double acrossDim; if(sequence == null) { System.out.println("No sequence"); // no sequence - collapse down to no size at all alongDim = 0.0; acrossDim = 0.0; ...
} offsets = new double[lineInfos.size()]; { int i = 0; double totDepth = 0.0; Iterator lii = lineInfos.iterator(); while(lii.hasNext()) { LineInfo li = (LineInfo) lii.next(); totDepth += li.getTotalDepth(); totDepth += spacer; offsets[i] = totDepth; i++; }
li++;
public void resizeAndValidate() { System.out.println("resizeAndValidate starting"); Dimension d = null; int realLines; double acrossDim; if(sequence == null) { System.out.println("No sequence"); // no sequence - collapse down to no size at all alongDim = 0.0; acrossDim = 0.0; ...
public SuffixNode getChild(SuffixNode node, int i) { if(!node.hasChild(i)) { node.addChild(this, i, new SimpleNode(alphabet.size()));
public SuffixNode getChild(SuffixNode node, Symbol r) { if(!alphabet().contains(r)) { return null;
public SuffixNode getChild(SuffixNode node, int i) { if(!node.hasChild(i)) { node.addChild(this, i, new SimpleNode(alphabet.size())); } return node.getChild(i); }
return node.getChild(i);
int index = indexForRes(r); return getChild(node, index);
public SuffixNode getChild(SuffixNode node, int i) { if(!node.hasChild(i)) { node.addChild(this, i, new SimpleNode(alphabet.size())); } return node.getChild(i); }
((EmblCDROMIndexStore) emblCDIndexStore).setPathPrefix(entryNamIdx.getParentFile().getAbsoluteFile()); sequenceDB = new IndexedSequenceDB(emblCDIndexStore);
protected void setUp() throws Exception { URL divURL = EmblCDROMIndexStoreTest.class.getResource("emblcd/division.lkp"); URL entURL = EmblCDROMIndexStoreTest.class.getResource("emblcd/entrynam.idx"); File divisionLkp = new File(divURL.getFile()); File entryNamIdx = new File(entURL.get...
public void testFetch() throws BioException, IllegalIDException
public void testFetch() throws Exception
public void testFetch() throws BioException, IllegalIDException { // Fetch from file 1 Index i1 = emblCDIndexStore.fetch("NMA0007"); // Fetch from file 2 Index i2 = emblCDIndexStore.fetch("NMA0020"); // Fetch from file 3 Index i3 = emblCDIndexStore.fetch("NMA0030"); ...
Sequence seq = sequenceDB.getSequence("NMA0007"); assertEquals("NMA0007", seq.getName()); assertEquals(235, seq.length()); seq = sequenceDB.getSequence("NMA0020"); assertEquals("NMA0020", seq.getName()); assertEquals(494, seq.length()); seq = sequenceDB.getSequence("NMA0030"); assertEquals("NMA0030", seq.getName()); ...
public void testFetch() throws BioException, IllegalIDException { // Fetch from file 1 Index i1 = emblCDIndexStore.fetch("NMA0007"); // Fetch from file 2 Index i2 = emblCDIndexStore.fetch("NMA0020"); // Fetch from file 3 Index i3 = emblCDIndexStore.fetch("NMA0030"); ...
SimpleOrthoPairCollection(Set groups)
public SimpleOrthoPairCollection()
SimpleOrthoPairCollection(Set groups) { this.groups = groups; }
this.groups = groups;
groups = new HashSet();
SimpleOrthoPairCollection(Set groups) { this.groups = groups; }