rem
stringlengths
0
477k
add
stringlengths
0
313k
context
stringlengths
6
599k
catch (ParseException pex)
catch (ParseException pe)
public static void getSeqIOEvents(final Sequence seq, final SeqIOListener listener) throws BioException { try { // Inform listener of sequence start listener.startSequence(); // Pass name to listener listener.setName(seq.getName()); // Pass URN to listener listener.setURI(se...
SequenceFactory sFact = new SimpleSequenceFactory();
SequenceBuilderFactory sFact = new FastaDescriptionLineParser.Factory(SimpleSequenceBuilder.FACTORY);
public static void main(String [] args) { try { if(args.length != 3) { throw new Exception("Use: PairwiseAlignment i|c sourceSeqFile targetSeqFile\n" + "i for interpreter (classic), c for run-time compiled (experimental)"); } String ic = args[0]; File sourceSeqFile = new Fil...
public DASFeaturesHandler(Map ticketsById) {
public DASFeaturesHandler(Map ticketsById, Ticket trigger) {
public DASFeaturesHandler(Map ticketsById) { this.ticketsById = ticketsById; }
this.trigger = trigger;
public DASFeaturesHandler(Map ticketsById) { this.ticketsById = ticketsById; }
DAS.activityProgress(trigger, doneTickets.size() , ticketsById.size());
public void endElement(String nsURI, String localName, String qName) throws SAXException { if (localName.equals("SEGMENT")) { thisTicket.setAsFetched(); doneTickets.add(thisTicket); } }
DASFeaturesHandler dfh = new DASFeaturesHandler(ticketsById);
DASFeaturesHandler dfh = new DASFeaturesHandler(ticketsById, trigger);
private synchronized boolean fetchAll(Ticket trigger) throws ParseException, BioException { boolean startedActivity = false; try { boolean canFetchMulti = DASCapabilities.checkCapable(new URL(dataSourceURL, ".."), DASCapabilities.CAPABILITY_EXTENDED, DASCapabilities.CAPABILITY_EXTENDE...
DASFeaturesHandler dfh = new DASFeaturesHandler(ticketsById);
DASFeaturesHandler dfh = new DASFeaturesHandler(ticketsById, t);
private synchronized void fetchTicket(Ticket t) throws ParseException, BioException { // System.err.println("Sigh, just fetching one featureSet (" + t.getType() + "," + t.getCategory() + ")"); try { DAS.startedActivity(t); boolean useXFF = DASCapabilities.checkCapable(new URL(dataSourceURL, "..")...
return null;
return alignment;
public Alignment getAlignment() { return null; }
return symbols[viewOffset + pos - 1];
try { return symbols[viewOffset + pos - 1]; } catch (IndexOutOfBoundsException e) { throw new IndexOutOfBoundsException( "Index must be within [1.." + length() + "] : " + pos); }
public Symbol symbolAt(int pos) {// if (pos > length || pos < 1) {// throw new IndexOutOfBoundsException(// "Can't access " + pos +// " as it is not within 1.." + length// );// } return symbols[viewOffset + pos - 1]; }
} else if (ty.equals("dt")) { obj = new StaticDateValue(new Date(va), parent);
private StaticAceNode constructNode( StaticAceNode parent, String ty, String va, String cl ) throws AceException { StaticAceNode obj = null; if (ty.equals("in")) { obj = new StaticIntValue(Integer.parseInt(va), parent); } else if (ty.equals("tx")) { obj = new StaticStringValue(va, parent); ...
oRenderer.endSummaryTable();
public void endElement ( String poNameSpace, String poElementName, String poQName ) { if ( poElementName.equals( "Header" ) ) { this.getQueryIdAndDatabase(); oRenderer.writeTitleAndHeader( oProgram, oVersion, oQuery, oDatabase ); } else if ( poElementName.equals( "HitDescription" ) )...
} else { oRenderer.writeCurrentSummary( oHitSummary );
public void startElement ( String poNameSpace, String poElementName, String poQName, Attributes poAtts) throws SAXException { if ( poElementName.equals( "BlastLikeDataSetCollection" ) ) { inCollection = true; // only checking to do - assume once // inside collection it follows ...
transitions.clear();
private void replaceNode(Set oldNodes, Node newNode) { // prepare to replace entire contents of transitions Transition [] transitionArray = new Transition[transitions.size()]; transitions.clear(); // loop thru' all transitions replacing the oldNodes for (int i=0; i < transition...
for (int i=0; i < transitionArray.length; i++) { Transition currTransition = transitionArray[i];
int j = 0; for (Iterator tranI = transitions.iterator(); tranI.hasNext();) { Transition currTransition = (Transition) tranI.next(); System.out.println(currTransition);
private void replaceNode(Set oldNodes, Node newNode) { // prepare to replace entire contents of transitions Transition [] transitionArray = new Transition[transitions.size()]; transitions.clear(); // loop thru' all transitions replacing the oldNodes for (int i=0; i < transition...
for (int i=0; i < transitionArray.length; i++) {
transitions.clear(); System.out.println("j is " + j); for (int i=0; i < j; i++) {
private void replaceNode(Set oldNodes, Node newNode) { // prepare to replace entire contents of transitions Transition [] transitionArray = new Transition[transitions.size()]; transitions.clear(); // loop thru' all transitions replacing the oldNodes for (int i=0; i < transition...
transitions.add(transitionArray[i]);
transitions.add(currTransition);
private void replaceNode(Set oldNodes, Node newNode) { // prepare to replace entire contents of transitions Transition [] transitionArray = new Transition[transitions.size()]; transitions.clear(); // loop thru' all transitions replacing the oldNodes for (int i=0; i < transition...
System.out.println("removing oldNodes");
private void replaceNode(Set oldNodes, Node newNode) { // prepare to replace entire contents of transitions Transition [] transitionArray = new Transition[transitions.size()]; transitions.clear(); // loop thru' all transitions replacing the oldNodes for (int i=0; i < transition...
public BlastOutputHandler(StAXFeatureHandler staxenv)
public BlastOutputHandler(ContentHandler handler)
public BlastOutputHandler(StAXFeatureHandler staxenv) { super(staxenv); // initialise delegation initDelegation(); }
super(staxenv);
super(); staxenv = this; listener = handler;
public BlastOutputHandler(StAXFeatureHandler staxenv) { super(staxenv); // initialise delegation initDelegation(); }
return f1.getLocation().getMin() - f2.getLocation().getMin();
if (f1.getLocation().getMin() > f2.getLocation().getMin()) return 1; else if ( f1.getLocation().getMin() < f2.getLocation().getMin()) return -1; else return 0;
public int compare(Object o1, Object o2) { Feature f1 = (Feature) o1; Feature f2 = (Feature) o2; return f1.getLocation().getMin() - f2.getLocation().getMin(); }
String queryText = "from Sequence as s where s = ?"; Object query = this.createQuery.invoke(this.session, new Object[]{queryText}); query = this.setParameter.invoke(query, new Object[]{new Integer(0), id}); List result = (List)this.list.invoke(query, null); if (result.size()==0) throw new IllegalIDException("Id not ...
Serializable identifier = (Serializable)this.getIdentifier.invoke(this.session, new Object[]{id}); this.evict.invoke(this.session, new Object[]{id}); return (RichSequence)this.load.invoke(this.session, new Object[]{"Sequence",identifier});
public RichSequence fullyLoadRichSequence(RichSequence id) throws IllegalIDException, BioException { if (id instanceof SimpleRichSequence) return id; try { // Build the query object String queryText = "from Sequence as s where s = ?"; Object query = this.createQuery.in...
throws Exception
public void testRegex() { // create a factory suitable for DNA PatternFactory fact = PatternFactory.makeFactory(DNATools.getDNA()); assertNotNull("Could not create PatternFactory object.", fact); // make a pattern Pattern pattern = fact.compile(patternString); assertNotN...
Statement st = conn.createStatement(); ResultSet rs = st.executeQuery("select bioentry.accession from bioentry");
PreparedStatement st = conn.prepareStatement("select bioentry.accession from bioentry where bioentry.biodatabase_id = ?"); st.setInt(1, dbid); ResultSet rs = st.executeQuery();
public Set ids() { try { Set _ids = new HashSet(); Connection conn = pool.takeConnection(); Statement st = conn.createStatement(); ResultSet rs = st.executeQuery("select bioentry.accession from bioentry"); while (rs.next()) { _ids.add(rs.getString(1)); } st.close(); pool.putConnecti...
public boolean hasChild(Character x){return getChild(x)==null;}
public boolean hasChild(Character x){return getChild(x)!=null;}
public boolean hasChild(Character x){return getChild(x)==null;}
Set set=AlphabetManager.getAllSymbols(oldAlphabet);
Set set = new HashSet(); for (Iterator i = oldAlphabet.iterator(); i.hasNext(); ) { set.add(i.next()); }
public TerminatedSymbolList(SymbolList unterminated) { this.unterminated=unterminated; TERMINATION_SYMBOL = AlphabetManager.createSymbol("Termination"); FiniteAlphabet oldAlphabet = (FiniteAlphabet)unterminated.getAlphabet(); Set set=AlphabetManager.getAllSymbols(oldAlphabet); set.add(TE...
Symbol s = (Symbol) i.next();
Symbol oldSymbol = (Symbol) i.next(); Symbol newSymbol; if (oldSymbol instanceof AtomicSymbol) { newSymbol = oldSymbol; } else { Set s = new HashSet(); for (Iterator si = ((FiniteAlphabet) oldSymbol.getMatches()).iterator(); si.hasNext(); ) { s.add(si.next()); } newSymbol = alpha.getAmbiguity(s); }
public TerminatedSymbolList(SymbolList unterminated) { this.unterminated=unterminated; TERMINATION_SYMBOL = AlphabetManager.createSymbol("Termination"); FiniteAlphabet oldAlphabet = (FiniteAlphabet)unterminated.getAlphabet(); Set set=AlphabetManager.getAllSymbols(oldAlphabet); set.add(TE...
tokenizer.bindSymbol(s,sToke.tokenizeSymbol(s).charAt(0));
char c = sToke.tokenizeSymbol(oldSymbol).charAt(0); tokenizer.bindSymbol(newSymbol, c); translationTable.put(oldSymbol, newSymbol);
public TerminatedSymbolList(SymbolList unterminated) { this.unterminated=unterminated; TERMINATION_SYMBOL = AlphabetManager.createSymbol("Termination"); FiniteAlphabet oldAlphabet = (FiniteAlphabet)unterminated.getAlphabet(); Set set=AlphabetManager.getAllSymbols(oldAlphabet); set.add(TE...
return unterminated.symbolAt(n);
return (Symbol) translationTable.get(unterminated.symbolAt(n));
public Symbol symbolAt(int n) throws IndexOutOfBoundsException { if (n!=length()) return unterminated.symbolAt(n); else return TERMINATION_SYMBOL; }
System.out.println("Adding symbol list " + seq.toString());
public void addSymbolList(SymbolList list, String name, boolean doNotTerminate) throws IllegalSymbolException{ if (!doNotTerminate) list = new TerminatedSymbolList(list); CharSequence seq =new SymbolListCharSequence(list); //if (!doNotTerminate) //if(!doNotTerminate) // seq = seq+termin...
if (coords[0] == -1 || coords[1] == -1)
if (coords[0] == -1 || coords[1] == -1 || coords[0] == seqs[0].length() + 2 || coords[1] == seqs[1].length() + 2)
public double[] getColumn(int[] coords) {// System.out.println("!!! getting " + coords[0] + "," + coords[1]); if (coords[0] == -1 || coords[1] == -1) return zeroCol; return (double[]) sMatrix[coords[0]][coords[1]]; }
for (int l = states.length; l > 0; --l) {
for (int l = states.length - 1; l >= 0; --l) {
private void backwardCalcStepMatrix() throws IllegalResidueException, IllegalAlphabetException, IllegalTransitionException { double[] curCol = (double[]) matrix[0][0]; int[] advance; for (int l = states.length; l > 0; --l) { // System.out.println("State = " + states[l].getName()); if (states[l] instanceo...
for (int i = 0; i <= cursor.getPos(1); ++i) {
for (int i = seq1.length() + 1; i >= cursor.getPos(1); --i) {
public double runBackward(ResidueList seq0, ResidueList seq1, PairDPCursor curs) throws IllegalResidueException, IllegalAlphabetException, IllegalTransitionException { states = getStates(); cursor = curs; alpha = (CrossProductAlphabet) getModel().emissionAlphabet(); // Forward initialization double[] col...
for (int i = 0; i <= cursor.getPos(0); ++i) {
for (int i = seq0.length() + 1; i >= cursor.getPos(0); --i) {
public double runBackward(ResidueList seq0, ResidueList seq1, PairDPCursor curs) throws IllegalResidueException, IllegalAlphabetException, IllegalTransitionException { states = getStates(); cursor = curs; alpha = (CrossProductAlphabet) getModel().emissionAlphabet(); // Forward initialization double[] col...
bp = bp.back;
public StatePath runViterbi(ResidueList seq0, ResidueList seq1) throws IllegalResidueException, IllegalAlphabetException, IllegalTransitionException { states = getStates(); cursor = new LightPairDPCursor(seq0, seq1, states.length, true); alpha = (CrossProductAlphabet) getModel().emissionAlphabet(); // Fo...
if (seqs.length != 2) throw new IllegalArgumentException("This DP object only runs on pairs.");
public double backward(ResidueList[] seqs) throws IllegalResidueException, IllegalAlphabetException, IllegalTransitionException { if (seqs.length != 2) throw new IllegalArgumentException("This DP object only runs on pairs."); Backward f = new Backward(); PairDPCursor cursor = new LightPairDPCursor(se...
Backward f = new Backward(); PairDPCursor cursor = new LightPairDPCursor(seqs[0], seqs[1], getStates().length, false); return f.runBackward(seqs[0], seqs[1], cursor);
return backwardMatrix(seqs).getScore();
public double backward(ResidueList[] seqs) throws IllegalResidueException, IllegalAlphabetException, IllegalTransitionException { if (seqs.length != 2) throw new IllegalArgumentException("This DP object only runs on pairs."); Backward f = new Backward(); PairDPCursor cursor = new LightPairDPCursor(se...
String featureLine = value.toString(); if((key.equals("FT")) && (featureLine.charAt(0) != ' '))
if (value != null)
public void addSequenceProperty(Object key, Object value) throws ParseException { try { if (mBadFeature) { // If this feature is bad in some way, ignore it. String featureLine = value.toString(); if((key.equals("FT")) && (featureLine.charAt(0) != ' ')) { // If the offending feature is past, star...
mBadFeature = false; features.startFeature(featureLine.substring(0, 15).trim()); features.featureData(featureLine.substring(16));
String featureLine = value.toString(); if((key.equals("FT")) && (featureLine.charAt(0) != ' ')) { mBadFeature = false; features.startFeature(featureLine.substring(0, 15).trim()); features.featureData(featureLine.substring(16)); }
public void addSequenceProperty(Object key, Object value) throws ParseException { try { if (mBadFeature) { // If this feature is bad in some way, ignore it. String featureLine = value.toString(); if((key.equals("FT")) && (featureLine.charAt(0) != ' ')) { // If the offending feature is past, star...
if(min == max) return new CircularLocation(new PointLocation(min), seqLength);
protected static CircularLocation makeCircLoc(int min, int max, int seqLength){// if(min == 0|| max == 0 || seqLength == 0){// throw new IllegalArgumentException(// "Must use a non zero integer a a parameter"// );// } boolean overlap = false; int rmin = realValue(min, seqLe...
public static DoubleSymbol getSymbol(double val) {
public DoubleSymbol getSymbol(double val) {
public static DoubleSymbol getSymbol(double val) { return new DoubleSymbol(val); }
setFloatValue(Float.parseFloat(data.toString()));
setFloatValue(Float.parseFloat((data.toString()).trim()));
public void endElement( String nsURI, String localName, String qName, StAXContentHandler handler ) throws SAXException { level--; if (level == 0) { try { setFloatValue(Float.parseFloat(data.toString())); } catch (NumberFormatException nfe) { throw new SAXException(nfe); ...
lsid=lsid==null?null:lsid;
private boolean throwsNullPointerException(String authorityId, String namespaceId, String objectId) { try { LifeScienceIdentifier lsid = LifeScienceIdentifier.valueOf(authorityId, ...
lsid=lsid==null?null:lsid;
private boolean throwsParseException(String value) { try { LifeScienceIdentifier lsid = LifeScienceIdentifier.valueOf(value); } catch (LifeScienceIdentifierParseException e) { return true; } return false; }
this.df = df;
IndexedNthOrderDistribution(Alphabet alpha, DistributionFactory df) throws IllegalAlphabetException { super(alpha); FiniteAlphabet conditioning = (FiniteAlphabet) getConditioningAlphabet(); index = AlphabetManager.getAlphabetIndex(conditioning); index.addChangeListener(ChangeListener.ALWAYS_VETO, Al...
System.out.println("Clipping in range: " + minPos + "-" + 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...
System.out.println("minOffset for " + minPos + " is " + minOffset);
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...
System.out.println("minP: " + minP);
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(leadingBorder.getSize(), minCoord);
g2.translate(leadingBorder.getSize() - alongDim * minOffset, minCoord);
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(minCoord, leadingBorder.getSize());
g2.translate(minCoord, leadingBorder.getSize() - alongDim * minOffset);
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...
System.out.println("Painting " + min + ".." + max);
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...
clip.x = l * alongDim - leadingBorder.getSize();
clip.x = l * 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...
clip.y = l * alongDim - leadingBorder.getSize();
clip.y = l * 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...
g2.draw(clip);
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...
System.out.println("Stopping as " + offsets[l] + " is larger than " + 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...
System.out.println("Setting sequence");
public void setSequence(SymbolList s) { System.out.println("Setting sequence"); SymbolList oldSequence = sequence; if(oldSequence != null) { oldSequence.removeChangeListener(layoutListener); } this.sequence = s; sequence.addChangeListener(layoutListener); resizeAndValidate(); fireProp...
DecimalFormat format = new DecimalFormat("#.###,##");
DecimalFormat format = new DecimalFormat("#,###.##");
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...
cell.add(new Text(Double.toString(sum)));
cell.add(new Text(format.format(sum)));
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...
return getAsString(); } else
return getAsBytea(); } else if (clazz.equals(classes[2])){ return getAsChara(); } else
public Object get(Class clazz) throws MappingException { if (clazz.equals(classes[0])) return getAsString(); else if (clazz.equals(classes[1])) { return getAsString(); } else throw new MappingException(); }
return raw;
byte[] b = new byte[raw.length - 4]; System.arraycopy(raw, 4, b, 0, raw.length - 4); return b;
private byte[] getAsBytea() throws MappingException { return raw; }
FiniteAlphabet prot
SymbolList sList; FiniteAlphabet prot
private SymbolList createSymbolList(String seq) throws IllegalSymbolException, BioException { FiniteAlphabet prot = (FiniteAlphabet)AlphabetManager.alphabetForName("PROTEIN"); //SymbolParser parser = prot.getParser("token"); SymbolTokenization...
return new SimpleSymbolList (tokenization, seq);
sList = new SimpleSymbolList (tokenization, seq); return sList;
private SymbolList createSymbolList(String seq) throws IllegalSymbolException, BioException { FiniteAlphabet prot = (FiniteAlphabet)AlphabetManager.alphabetForName("PROTEIN"); //SymbolParser parser = prot.getParser("token"); SymbolTokenization...
cleavRes = content;
cleavRes = content.trim();
public static Protease getProteaseByName(String proteaseName) throws IllegalSymbolException, BioException { Protease protease = null; NodeList children = doc.getDocumentElement().getChildNodes(); for(int i = 0; i < children.getLength(); i++) { ...
exceptRes = content;
exceptRes = content.trim();
public static Protease getProteaseByName(String proteaseName) throws IllegalSymbolException, BioException { Protease protease = null; NodeList children = doc.getDocumentElement().getChildNodes(); for(int i = 0; i < children.getLength(); i++) { ...
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();
double [][] backwardTransitionScores = dp.getBackwardTransitionScores(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 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...
features = new FeatureTableParser(this);
features = new FeatureTableParser(this, "EMBL");
public EmblProcessor(SequenceBuilder delegate) { super(delegate); features = new FeatureTableParser(this); }
FeatureTableParser(SeqIOListener listener) {
FeatureTableParser(SeqIOListener listener, String source) {
FeatureTableParser(SeqIOListener listener) { this.listener = listener; featureBuf = new StringBuffer(); featureAttributes = new HashMap(); }
this.featureSource = source;
FeatureTableParser(SeqIOListener listener) { this.listener = listener; featureBuf = new StringBuffer(); featureAttributes = new HashMap(); }
Map attrs)
String source, Map attrs)
protected Feature.Template buildFeatureTemplate(String type, Location loc, StrandedFeature.Strand strandHint, Map attrs) { StrandedFeature.Template t = new StrandedFeature.Template(); t.annotation = new SimpleAnnotation(); for (Iterator i = attrs.entrySet().iterator(); i.hasNext(); ) ...
t.source = "EMBL";
t.source = source;
protected Feature.Template buildFeatureTemplate(String type, Location loc, StrandedFeature.Strand strandHint, Map attrs) { StrandedFeature.Template t = new StrandedFeature.Template(); t.annotation = new SimpleAnnotation(); for (Iterator i = attrs.entrySet().iterator(); i.hasNext(); ) ...
private int countChar(StringBuffer s, char c) {
protected int countChar(StringBuffer s, char c) {
private int countChar(StringBuffer s, char c) { int cnt = 0; for (int i = 0; i < s.length(); ++i) if (s.charAt(i) == c) ++cnt; return cnt; }
featureSource,
public void endFeature() throws BioException { listener.startFeature(buildFeatureTemplate(featureType, featureLocation, featureStrand, featureAttributes)); listener.endFeature(); featureStatus = WITHOUT; }
private void processAttribute(String attr) throws BioException {
protected void processAttribute(String attr) throws BioException {
private void processAttribute(String attr) throws BioException { // System.err.println(attr); int eqPos = attr.indexOf('='); if (eqPos == -1) { featureAttributes.put(attr.substring(1), Boolean.TRUE); } else { String tag = attr.substring(1, eqPos); eqPos++; if (attr.charAt(eqPos) == '"') ++eqPos; ...
sb.append('(' + fpl.getMin());
sb.append('('); sb.append(fpl.getMin());
private StringBuffer formatFuzzyPoint(StringBuffer sb, FuzzyPointLocation fpl) { if (! fpl.hasBoundedMin()) { // <123 sb.append('<'); sb.append(fpl.getMax()); } else if (! fpl.hasBoundedMax()) { // >567 sb.append('>'); ...
sb.append(fpl.getMax() + ')');
sb.append(fpl.getMax()); sb.append(')');
private StringBuffer formatFuzzyPoint(StringBuffer sb, FuzzyPointLocation fpl) { if (! fpl.hasBoundedMin()) { // <123 sb.append('<'); sb.append(fpl.getMax()); } else if (! fpl.hasBoundedMax()) { // >567 sb.append('>'); ...
sb.append('(' + fl.getOuterMin());
sb.append('('); sb.append(fl.getOuterMin());
private StringBuffer formatFuzzyRange(StringBuffer sb, FuzzyLocation fl) { if (! fl.hasBoundedMin()) { // <123 sb.append('<'); sb.append(fl.getMin()); } else if (fl.getOuterMin() != fl.getInnerMin()) { // (123.567) sb.appen...
sb.append(fl.getInnerMin() + ')');
sb.append(fl.getInnerMin()); sb.append(')');
private StringBuffer formatFuzzyRange(StringBuffer sb, FuzzyLocation fl) { if (! fl.hasBoundedMin()) { // <123 sb.append('<'); sb.append(fl.getMin()); } else if (fl.getOuterMin() != fl.getInnerMin()) { // (123.567) sb.appen...
sb.append('(' + fl.getInnerMax());
sb.append('('); sb.append(fl.getInnerMax());
private StringBuffer formatFuzzyRange(StringBuffer sb, FuzzyLocation fl) { if (! fl.hasBoundedMin()) { // <123 sb.append('<'); sb.append(fl.getMin()); } else if (fl.getOuterMin() != fl.getInnerMin()) { // (123.567) sb.appen...
sb.append(fl.getOuterMax() + ')');
sb.append(fl.getOuterMax()); sb.append(')');
private StringBuffer formatFuzzyRange(StringBuffer sb, FuzzyLocation fl) { if (! fl.hasBoundedMin()) { // <123 sb.append('<'); sb.append(fl.getMin()); } else if (fl.getOuterMin() != fl.getInnerMin()) { // (123.567) sb.appen...
Form form = new Form(); layer.add(form);
private Layer getStatement(String communeNumber, String personalId, IWContext iwc) throws RemoteException { Layer layer = new Layer(Layer.DIV); layer.setStyleClass("caseElement"); layer.setID("financialStatement"); Form form = new Form(); layer.add(form); Layer headerLayer = new Layer(Layer.DIV); headerLayer....
} else { fromStamp.addDays(-14);
private Layer getStatement(String communeNumber, String personalId, IWContext iwc) throws RemoteException { Layer layer = new Layer(Layer.DIV); layer.setStyleClass("caseElement"); layer.setID("financialStatement"); Form form = new Form(); layer.add(form); Layer headerLayer = new Layer(Layer.DIV); headerLayer....
catch (IOException ie)
catch (IOException ioe)
public static void loadFeatureData(final String featureDataFile, final Map featureData, final Map qualifierData) { try { InputStream featureDataStream = EmblFileFormer.class.getClassLoader().getResourceAsStream(featureDataFile); if (featureDataStream == null) throw new BioErr...
ie.printStackTrace();
ioe.printStackTrace();
public static void loadFeatureData(final String featureDataFile, final Map featureData, final Map qualifierData) { try { InputStream featureDataStream = EmblFileFormer.class.getClassLoader().getResourceAsStream(featureDataFile); if (featureDataStream == null) throw new BioErr...
catch (SAXException sxe)
catch (SAXException se)
public static void loadFeatureData(final String featureDataFile, final Map featureData, final Map qualifierData) { try { InputStream featureDataStream = EmblFileFormer.class.getClassLoader().getResourceAsStream(featureDataFile); if (featureDataStream == null) throw new BioErr...
sxe.printStackTrace();
se.printStackTrace();
public static void loadFeatureData(final String featureDataFile, final Map featureData, final Map qualifierData) { try { InputStream featureDataStream = EmblFileFormer.class.getClassLoader().getResourceAsStream(featureDataFile); if (featureDataStream == null) throw new BioErr...
SymbolParser rParser = alphabet().getParser("symbol");
SymbolParser rParser = alphabet().getParser("token");
public AceSequence(Database aceDB, String id) throws AceException, BioException { this.name = id; this.fHolder = new SimpleMutableFeatureHolder(); try { // load in relevent ACeDB object & construct annotation wrapper seqObj = aceDB.getObject(AceType.getClassType(aceDB, "Sequence"), id); an...
Annotation fAnn = null;
Annotation fAnn;
public AceSequence(Database aceDB, String id) throws AceException, BioException { this.name = id; this.fHolder = new SimpleMutableFeatureHolder(); try { // load in relevent ACeDB object & construct annotation wrapper seqObj = aceDB.getObject(AceType.getClassType(aceDB, "Sequence"), id); an...
if(ex instanceof AceException || ex instanceof BioException) throw (AceException) ex;
public AceSequence(Database aceDB, String id) throws AceException, BioException { this.name = id; this.fHolder = new SimpleMutableFeatureHolder(); try { // load in relevent ACeDB object & construct annotation wrapper seqObj = aceDB.getObject(AceType.getClassType(aceDB, "Sequence"), id); an...
return DNATools.getAlphabet();
return DNATools.getAmbiguity();
public Alphabet alphabet() { return DNATools.getAlphabet(); }
exposedFeatures.addFeatureHolder(new ProjectedFeatureHolder(seqDelegate, this, 0));
exposedFeatures.addFeatureHolder(new ProjectedFeatureHolder(seqDelegate, this, 0, false));
public ViewSequence(Sequence seq) { seqDelegate = seq; addedFeatures = new SimpleFeatureHolder(); exposedFeatures = new MergeFeatureHolder(); exposedFeatures.addFeatureHolder(new ProjectedFeatureHolder(seqDelegate, this, 0)); exposedFeatures.addFeatureHolder(addedFeatures); name = seqDelegate.getName(); // Is this...
public void addSequence(Sequence seq)
public void addSequence(String id, Sequence seq)
public void addSequence(Sequence seq) throws ChangeVetoException { String id = idMaker.calcID(seq); if(!hasListeners()) { addSequence(id, seq); } else { ChangeSupport changeSupport = getChangeSupport(SequenceDB.SEQUENCES); synchronized(changeSupport) { ChangeEvent ce = new ChangeEvent(...
String id = idMaker.calcID(seq);
public void addSequence(Sequence seq) throws ChangeVetoException { String id = idMaker.calcID(seq); if(!hasListeners()) { addSequence(id, seq); } else { ChangeSupport changeSupport = getChangeSupport(SequenceDB.SEQUENCES); synchronized(changeSupport) { ChangeEvent ce = new ChangeEvent(...
addSequence(id, seq);
sequenceByID.put(id, seq);
public void addSequence(Sequence seq) throws ChangeVetoException { String id = idMaker.calcID(seq); if(!hasListeners()) { addSequence(id, seq); } else { ChangeSupport changeSupport = getChangeSupport(SequenceDB.SEQUENCES); synchronized(changeSupport) { ChangeEvent ce = new ChangeEvent(...
id,
new Object[] { id, seq },
public void addSequence(Sequence seq) throws ChangeVetoException { String id = idMaker.calcID(seq); if(!hasListeners()) { addSequence(id, seq); } else { ChangeSupport changeSupport = getChangeSupport(SequenceDB.SEQUENCES); synchronized(changeSupport) { ChangeEvent ce = new ChangeEvent(...
sequenceByID.remove(id);
sequenceByID.put(id, seq);
public void addSequence(Sequence seq) throws ChangeVetoException { String id = idMaker.calcID(seq); if(!hasListeners()) { addSequence(id, seq); } else { ChangeSupport changeSupport = getChangeSupport(SequenceDB.SEQUENCES); synchronized(changeSupport) { ChangeEvent ce = new ChangeEvent(...
String[] parts = line.split("\\s+");
String[] parts = line.trim().split("\\s+");
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 { ...
if (currentTag!=null) section.add(new String[]{currentTag,currentVal.toString()});
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 { ...
FiniteAlphabet alpha = alphaResolver.resolveAlphabet(identifier);
FiniteAlphabet alpha = AlphabetResolver.resolveAlphabet(identifier);
private void makeSimilarity() throws BioException { subHitData.putAll(resultData); subHitData.putAll(hitData); // Try to get a valid TokenParser if (tokenParser == null) { String identifier; // Try explicit sequence type first if (subHitData.con...