rem
stringlengths
0
477k
add
stringlengths
0
313k
context
stringlengths
6
599k
cell= row.createCell(); group.createRow(); if (odd) { row.setStyleClass("odd"); } else { row.setStyleClass("even"); } odd = !odd;
cell = row.createCell(); row = group.createRow(); if (odd) { row.setStyleClass("oddRow"); } else { row.setStyleClass("evenRow"); } odd = !odd;
private Layer getStatement(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(3); table.setCellspacing(0); form.add(table); TableRowGroup group = table.creat...
add(getStatement(iwc));
if (fixedPersonalId == null) { fixedPersonalId = iwc.getCurrentUser().getPersonalID(); } if (fixedCommuneNumber == null) { fixedCommuneNumber = getBusiness(iwc).getHomeCommuneNumber(); } add(getStatement(fixedCommuneNumber, fixedPersonalId, iwc));
protected void present(IWContext iwc) throws RemoteException { add(getStatement(iwc)); }
public Collection getPaymentItems(String kt) throws java.rmi.RemoteException;
public Collection getPaymentItems(String communeNumber, String personalId) throws java.rmi.RemoteException;
public Collection getPaymentItems(String kt) throws java.rmi.RemoteException;
public Collection getStatementItems(String kt, PaymentItem pType, IWTimestamp fromStamp, IWTimestamp toStamp) throws java.rmi.RemoteException;
public Collection getStatementItems(String communeNumber, String personalId, PaymentItem pType, IWTimestamp fromStamp, IWTimestamp toStamp) throws java.rmi.RemoteException;
public Collection getStatementItems(String kt, PaymentItem pType, IWTimestamp fromStamp, IWTimestamp toStamp) throws java.rmi.RemoteException;
boolean rolledback = false;
void setFeatureLocation(int feature_id, Location location, StrandedFeature.Strand s) throws SQLException { Connection conn = null; try { conn = seqDB.getDataSource().getConnection(); conn.setAutoCommit(false); PreparedStatement del_oldlocation = conn.prepareStatement( "delete from lo...
rolledback = true;
void setFeatureLocation(int feature_id, Location location, StrandedFeature.Strand s) throws SQLException { Connection conn = null; try { conn = seqDB.getDataSource().getConnection(); conn.setAutoCommit(false); PreparedStatement del_oldlocation = conn.prepareStatement( "delete from lo...
boolean rolledback = false;
void setFeatureSource(int feature_id, String source) throws SQLException { Connection conn = null; try { conn = seqDB.getDataSource().getConnection(); conn.setAutoCommit(false); int seqfeature_source = seqDB.intern_ontology_term(conn, source); PreparedStatement update_source = conn.pr...
rolledback = true;
void setFeatureSource(int feature_id, String source) throws SQLException { Connection conn = null; try { conn = seqDB.getDataSource().getConnection(); conn.setAutoCommit(false); int seqfeature_source = seqDB.intern_ontology_term(conn, source); PreparedStatement update_source = conn.pr...
boolean rolledback = false;
void setFeatureType(int feature_id, String type) throws SQLException { Connection conn = null; try { conn = seqDB.getDataSource().getConnection(); conn.setAutoCommit(false); int seqfeature_key = seqDB.intern_ontology_term(conn, type); PreparedStatement update_key = conn.prepareStateme...
rolledback = true;
void setFeatureType(int feature_id, String type) throws SQLException { Connection conn = null; try { conn = seqDB.getDataSource().getConnection(); conn.setAutoCommit(false); int seqfeature_key = seqDB.intern_ontology_term(conn, type); PreparedStatement update_key = conn.prepareStateme...
} else if (legacy.containsTerm(ts.toUpperCase())) { return ontologySQL.termID(legacy.getTerm(ts.toUpperCase()));
int intern_ontology_term(Connection conn, String s) throws SQLException { Ontology legacy = ontologySQL.getLegacyOntology(); String ts = s.trim(); // Hack for schema change if (legacy.containsTerm(ts)) { return ontologySQL.termID(legacy.getTerm(ts)); // Same term but different cas...
if (typeRank < 0) { PreparedStatement select_rank = conn.prepareStatement( "select max(rank) from seqfeature where bioentry_id=?" + " and type_term_id=? and source_term_id=?"); select_rank.setInt(1, bioentry_id); select_rank.setInt(2, seqfeature_key); select_rank.setInt(3, seqfeature_source); ResultSet rs = select_rank...
int persistFeature(Connection conn, int bioentry_id, Feature f, int parent_id, int typeRank) throws BioException, SQLException { int id = -1; boolean locationWritten = false; if (seqDB.isSPASupported()) { if (f.getLocation().isContiguous()) { Location loc = f.getLocation(); Pre...
CrossRef crossRef = (CrossRef)RichObjectFactory.getObject(SimpleCrossRef.class,new Object[]{parts[0].trim(),parts[1].trim(), new Integer(0)});
String dbname = parts[0].trim(); String acc = parts[1].trim(); CrossRef crossRef = (CrossRef)RichObjectFactory.getObject(SimpleCrossRef.class,new Object[]{dbname,acc,new Integer(0)});
public boolean readRichSequence(BufferedReader reader, SymbolTokenization symParser, RichSeqIOListener rlistener, Namespace ns) throws IllegalSymbolException, IOException, ParseException { String line; boolean hasAnotherSequence = true; //bool...
Note note = new SimpleNote(Terms.getAdditionalAccessionTerm(),parts[j].trim(),j);
ComparableTerm t = (ComparableTerm)Terms.getAdditionalAccessionTerm(); Note note = new SimpleNote(t,parts[j].trim(),j);
public boolean readRichSequence(BufferedReader reader, SymbolTokenization symParser, RichSeqIOListener rlistener, Namespace ns) throws IllegalSymbolException, IOException, ParseException { String line; boolean hasAnotherSequence = true; //bool...
ParseException pe = new ParseException("Could not annotate identifier terms");
ParseException pe = new ParseException("Could not annotate additional accession terms");
public boolean readRichSequence(BufferedReader reader, SymbolTokenization symParser, RichSeqIOListener rlistener, Namespace ns) throws IllegalSymbolException, IOException, ParseException { String line; boolean hasAnotherSequence = true; //bool...
Set auths = DocRefAuthor.Tools.parseAuthorString(authors);
List auths = DocRefAuthor.Tools.parseAuthorString(authors);
public boolean readRichSequence(BufferedReader reader, SymbolTokenization symParser, RichSeqIOListener rlistener, Namespace ns) throws IllegalSymbolException, IOException, ParseException { String line; boolean hasAnotherSequence = true; //bool...
val = val.trim().substring(0,val.length()-1);
val = val.trim(); val = val.substring(0,val.length()-1);
public boolean readRichSequence(BufferedReader reader, SymbolTokenization symParser, RichSeqIOListener rlistener, Namespace ns) throws IllegalSymbolException, IOException, ParseException { String line; boolean hasAnotherSequence = true; //bool...
public static boolean isParseable(String c) { return c.trim().startsWith(PREFIX);
public static boolean isParseable(Comment c) { return isParseable(c.getComment());
public static boolean isParseable(String c) { return c.trim().startsWith(PREFIX); }
pepMass = pepMass + 3 * Havg + Oavg;
pepMass = pepMass + 3 * hydroxMass;
public static final double getMass(SymbolList proteinSeq, String isotopicType, boolean MH_PLUS) { if(!proteinSeq.getAlphabet().getName().equals("PROTEIN")){ //throw exception } double pepMass =...
pepMass = pepMass + 2 * Havg + Oavg;
pepMass = pepMass + 2 * hydroxMass;
public static final double getMass(SymbolList proteinSeq, String isotopicType, boolean MH_PLUS) { if(!proteinSeq.getAlphabet().getName().equals("PROTEIN")){ //throw exception } double pepMass =...
if(!hasListeners()) {
if(!hasListeners(BioEntryDB.BIOENTRYS)) {
public void removeBioEntry(String id) throws IllegalIDException, BioException, ChangeVetoException { if (!sequenceByID.containsKey(id)) throw new IllegalIDException("BioEntry with ID " + id + " could not be found"); if(!hasListeners()) { sequenceByID.remove(id); } else { C...
PropertyConstraint thisPropertyConstraint = getPropertyConstraint(key); PropertyConstraint subPropertyConstraint = subType.getPropertyConstraint(key); if (! thisPropertyConstraint.subConstraintOf(subPropertyConstraint)) {
PropertyConstraint thisPC = getPropertyConstraint(key); PropertyConstraint subPC = subType.getPropertyConstraint(key); if (! thisPC.subConstraintOf(subPC)) {
public boolean subTypeOf(AnnotationType subType) { for (Iterator i = cons.keySet().iterator(); i.hasNext();) { Object key = i.next(); PropertyConstraint thisPropertyConstraint = getPropertyConstraint(key); PropertyConstraint subPropertyConstraint = subType...
} CardinalityConstraint thisCC = getCardinalityConstraint(key); CardinalityConstraint subCC = subType.getCardinalityConstraint(key); if (!thisCC.subConstraintOf(subCC)) { return false;
public boolean subTypeOf(AnnotationType subType) { for (Iterator i = cons.keySet().iterator(); i.hasNext();) { Object key = i.next(); PropertyConstraint thisPropertyConstraint = getPropertyConstraint(key); PropertyConstraint subPropertyConstraint = subType...
System.err.println("*** Types-Fetching: " + segments);
public void runFetch() throws BioException, ParseException { DAS.startedActivity(this); URL fURL = null; try { HttpURLConnection huc = null; Set segmentObjs = ticketsBySegment.keySet(); StringBuffer sb = new StringBuffer(); for (Iterator i = segmentObjs.iterator(); i.hasNext(); ) { Object...
SymbolList five = DNATools.createDNA("aaaaa"); SymbolList agct3 = DNATools.createDNA("agctagctagct");
public void testTooShort() throws IllegalSymbolException, IllegalAlphabetException{ SymbolList zero = DNATools.createDNA(""); SymbolList one = DNATools.createDNA("a"); SymbolList five = DNATools.createDNA("aaaaa"); SymbolList agct3 = DNATools.createDNA("agctagctagct"); SymbolList agct = DNATools.creat...
SymbolList gcta = DNATools.createDNA("gcta"); SymbolList gctt = DNATools.createDNA("gctt");
public void testTooShort() throws IllegalSymbolException, IllegalAlphabetException{ SymbolList zero = DNATools.createDNA(""); SymbolList one = DNATools.createDNA("a"); SymbolList five = DNATools.createDNA("aaaaa"); SymbolList agct3 = DNATools.createDNA("agctagctagct"); SymbolList agct = DNATools.creat...
List alphaList = new ArrayList();
public FlexibleAlignment (List seqList)throws BioException{ data = new Hashtable(); labelOrder = new Vector(); alignmentRange = new RangeLocation(1,1); List alphaList = new ArrayList(); Alphabet lastAlpha = null; // go through the list make sure that all seqs are Ga...
int k=0;
public FlexibleAlignment (List seqList)throws BioException{ data = new Hashtable(); labelOrder = new Vector(); alignmentRange = new RangeLocation(1,1); List alphaList = new ArrayList(); Alphabet lastAlpha = null; // go through the list make sure that all seqs are Ga...
k++;
public FlexibleAlignment (List seqList)throws BioException{ data = new Hashtable(); labelOrder = new Vector(); alignmentRange = new RangeLocation(1,1); List alphaList = new ArrayList(); Alphabet lastAlpha = null; // go through the list make sure that all seqs are Ga...
pStream = System.out;
public SearchContentHandlerDebugger() { pStream = System.out; }
public String startElement(String string, Attributes attributes)
public String startElement(String string)
public String startElement(String string, Attributes attributes) { oElementStack.push(string); oStr.setLength(0); if (!tLastWritePCData) oStr.append(nl()); oStr.append(indent()); oStr.append("<"); oStr.append(string); int i = 0; oSpaceStore.setLe...
int i = 0; oSpaceStore.setLength(0); oSpaceStore.append(indent()); for (i = 0; i <= string.length(); i++) oSpaceStore.append(" "); for (i = 0; i < attributes.getLength() - 1; i++) { oAttName = attributes.getQName(i); oAttValue = attributes.getValue(i); oStr.append(" "); if (i > 0) oStr.append(oSpaceStore.substring(0))...
public String startElement(String string, Attributes attributes) { oElementStack.push(string); oStr.setLength(0); if (!tLastWritePCData) oStr.append(nl()); oStr.append(indent()); oStr.append("<"); oStr.append(string); int i = 0; oSpaceStore.setLe...
public void openTag(String name) throws IOException;
public void openTag(String nsURI, String localName) throws IOException;
public void openTag(String name) throws IOException;
public void closeTag(String name) throws IOException;
public void closeTag(String nsURI, String qName) throws IOException;
public void closeTag(String name) throws IOException;
final int end) { this(seq, start, end, seq.getName() + " (" + start + " - " + end + ")");
final int end, final String name) { this.parent = seq; this.parentLocation = new RangeLocation(start, end); this.symbols = seq.subList(start, end); this.name = name; this.uri = seq.getURN() + "?start=" + start + ";end=" + end; this.annotation = seq.getAnnotation();
public SubSequence(Sequence seq, final int start, final int end) { this(seq, start, end, seq.getName() + " (" + start + " - " + end + ")"); }
features = new BioEntryFeatureSet(this, seqDB, bioentry_id);
BioSQLSequence(BioSQLSequenceDB seqDB, String name, int bioentry_id, int biosequence_id, String alphaName) throws BioException { this.seqDB = seqDB; this.name = name; this.bioentry_id = bioentry_id; this.biosequence_id = biosequence_id; try { this.alphabet = AlphabetManager.alphabetForName(al...
if(overlay.containsKey(key))
if(this.getOverlay().containsKey(key))
public void setProperty(Object key, Object value) throws ChangeVetoException { // This mess is to handle cases where there is already a value associated // with the key. Object newValue; Object oldValue = null; try { if(overlay.containsKey(key)) { oldValue = this.getProperty(key); // If the old value is alread...
public AlreadyExistsException(String description) { super(description);
public AlreadyExistsException() { super();
public AlreadyExistsException(String description) { super(description); }
emissions = new HashMap();
emissionsProb = new HashMap(); emissionsOdds = new HashMap(); emissionsNull = new HashMap();
public SingleDP(MarkovModel model) throws IllegalSymbolException, IllegalTransitionException, BioException { super(model); emissions = new HashMap(); }
public double backward(SymbolList [] seq)
public double backward(SymbolList [] seq, ScoreType scoreType)
public double backward(SymbolList [] seq) throws IllegalSymbolException, IllegalAlphabetException, IllegalSymbolException { if(seq.length != 1) { throw new IllegalArgumentException("seq must be 1 long, not " + seq.length); } lockModel(); DPCursor dpCursor = new SmallCursor( getStates(), se...
double score = backward(dpCursor);
double score = backward(dpCursor, scoreType);
public double backward(SymbolList [] seq) throws IllegalSymbolException, IllegalAlphabetException, IllegalSymbolException { if(seq.length != 1) { throw new IllegalArgumentException("seq must be 1 long, not " + seq.length); } lockModel(); DPCursor dpCursor = new SmallCursor( getStates(), se...
public DPMatrix backwardMatrix(SymbolList [] seq)
public DPMatrix backwardMatrix(SymbolList [] seq, ScoreType scoreType)
public DPMatrix backwardMatrix(SymbolList [] seq) throws IllegalSymbolException, IllegalAlphabetException, IllegalSymbolException { if(seq.length != 1) { throw new IllegalArgumentException("seq must be 1 long, not " + seq.length); } lockModel(); SingleDPMatrix matrix = new SingleDPMatrix(this, s...
matrix.score = backward(dpCursor);
matrix.score = backward(dpCursor, scoreType);
public DPMatrix backwardMatrix(SymbolList [] seq) throws IllegalSymbolException, IllegalAlphabetException, IllegalSymbolException { if(seq.length != 1) { throw new IllegalArgumentException("seq must be 1 long, not " + seq.length); } lockModel(); SingleDPMatrix matrix = new SingleDPMatrix(this, s...
private void backward_initialize(DPCursor dpCursor)
private void backward_initialize(DPCursor dpCursor, ScoreType scoreType)
private void backward_initialize(DPCursor dpCursor) throws IllegalSymbolException { double [] v = dpCursor.currentCol(); State [] states = getStates(); for (int l = 0; l < states.length; l++) { if(states[l] == getModel().magicalState()) { v[l] = 0.0; } else { v[l] = Double.NEGATIVE...
private void backward_recurse(DPCursor dpCursor)
private void backward_recurse(DPCursor dpCursor, ScoreType scoreType)
private void backward_recurse(DPCursor dpCursor) throws IllegalSymbolException { State [] states = getStates(); int stateCount = states.length; int [][] transitions = getBackwardTransitions(); double [][] transitionScore = getBackwardTransitionScores(); double [] prevScores = new double[getDotStates...
double [][] transitionScore = getBackwardTransitionScores();
double [][] transitionScore = getBackwardTransitionScores(scoreType);
private void backward_recurse(DPCursor dpCursor) throws IllegalSymbolException { State [] states = getStates(); int stateCount = states.length; int [][] transitions = getBackwardTransitions(); double [][] transitionScore = getBackwardTransitionScores(); double [] prevScores = new double[getDotStates...
double [] emissions = getEmission(res);
double [] emissions = getEmission(res, scoreType);
private void backward_recurse(DPCursor dpCursor) throws IllegalSymbolException { State [] states = getStates(); int stateCount = states.length; int [][] transitions = getBackwardTransitions(); double [][] transitionScore = getBackwardTransitionScores(); double [] prevScores = new double[getDotStates...
private double backward_termination(DPCursor dpCursor)
private double backward_termination(DPCursor dpCursor, ScoreType scoreType)
private double backward_termination(DPCursor dpCursor) throws IllegalSymbolException { double [] scores = dpCursor.currentCol(); State [] states = getStates(); int l = 0; while (states[l] != getModel().magicalState()) l++; return scores[l]; }
public double forward(SymbolList [] seq)
public double forward(SymbolList [] seq, ScoreType scoreType)
public double forward(SymbolList [] seq) throws IllegalSymbolException, IllegalAlphabetException, IllegalSymbolException { if(seq.length != 1) { throw new IllegalArgumentException("seq must be 1 long, not " + seq.length); } lockModel(); DPCursor dpCursor = new SmallCursor( getStates(), seq...
double score = forward(dpCursor);
double score = forward(dpCursor, scoreType);
public double forward(SymbolList [] seq) throws IllegalSymbolException, IllegalAlphabetException, IllegalSymbolException { if(seq.length != 1) { throw new IllegalArgumentException("seq must be 1 long, not " + seq.length); } lockModel(); DPCursor dpCursor = new SmallCursor( getStates(), seq...
public DPMatrix forwardMatrix(SymbolList [] seq)
public DPMatrix forwardMatrix(SymbolList [] seq, ScoreType scoreType)
public DPMatrix forwardMatrix(SymbolList [] seq) throws IllegalSymbolException, IllegalAlphabetException, IllegalSymbolException { if(seq.length != 1) { throw new IllegalArgumentException("seq must be 1 long, not " + seq.length); } lockModel(); SingleDPMatrix matrix = new SingleDPMatrix(this, se...
matrix.score = forward(dpCursor);
matrix.score = forward(dpCursor, scoreType);
public DPMatrix forwardMatrix(SymbolList [] seq) throws IllegalSymbolException, IllegalAlphabetException, IllegalSymbolException { if(seq.length != 1) { throw new IllegalArgumentException("seq must be 1 long, not " + seq.length); } lockModel(); SingleDPMatrix matrix = new SingleDPMatrix(this, se...
private void forward_initialize(DPCursor dpCursor)
private void forward_initialize(DPCursor dpCursor, ScoreType scoreType)
private void forward_initialize(DPCursor dpCursor) throws IllegalSymbolException { double [] v = dpCursor.currentCol(); State [] states = getStates(); for (int l = 0; l < getDotStatesIndex(); l++) { if(states[l] == getModel().magicalState()) { v[l] = 0.0; } else { v[l] = Double...
double [][] transitionScore = getForwardTransitionScores();
double [][] transitionScore = getForwardTransitionScores(scoreType);
private void forward_initialize(DPCursor dpCursor) throws IllegalSymbolException { double [] v = dpCursor.currentCol(); State [] states = getStates(); for (int l = 0; l < getDotStatesIndex(); l++) { if(states[l] == getModel().magicalState()) { v[l] = 0.0; } else { v[l] = Double...
private void forward_recurse(DPCursor dpCursor)
private void forward_recurse(DPCursor dpCursor, ScoreType scoreType)
private void forward_recurse(DPCursor dpCursor) throws IllegalSymbolException { State [] states = getStates(); int stateCount = states.length; int [][] transitions = getForwardTransitions(); double [][] transitionScore = getForwardTransitionScores(); // int _index = 0; while (dpCursor.canAdvance(...
double [][] transitionScore = getForwardTransitionScores();
double [][] transitionScore = getForwardTransitionScores(scoreType);
private void forward_recurse(DPCursor dpCursor) throws IllegalSymbolException { State [] states = getStates(); int stateCount = states.length; int [][] transitions = getForwardTransitions(); double [][] transitionScore = getForwardTransitionScores(); // int _index = 0; while (dpCursor.canAdvance(...
double [] emissions = getEmission(res);
double [] emissions = getEmission(res, scoreType);
private void forward_recurse(DPCursor dpCursor) throws IllegalSymbolException { State [] states = getStates(); int stateCount = states.length; int [][] transitions = getForwardTransitions(); double [][] transitionScore = getForwardTransitionScores(); // int _index = 0; while (dpCursor.canAdvance(...
private double forward_termination(DPCursor dpCursor)
private double forward_termination(DPCursor dpCursor, ScoreType scoreType)
private double forward_termination(DPCursor dpCursor) throws IllegalSymbolException { double [] scores = dpCursor.currentCol(); State [] states = getStates(); int l = 0; while (states[l] != getModel().magicalState()) l++; return scores[l]; }
protected double [] getEmission(Symbol sym)
protected double [] getEmission(Symbol sym, ScoreType scoreType)
protected double [] getEmission(Symbol sym) throws IllegalSymbolException { double [] em = (double []) emissions.get(sym); if(em == null) { int dsi = getDotStatesIndex(); em = new double[dsi]; State [] states = getStates(); for(int i = 0; i < dsi; i++) { EmissionState es = (EmissionS...
em[i] = Math.log(dis.getWeight(sym));
em[i] = Math.log(scoreType.calculateScore(dis, sym));
protected double [] getEmission(Symbol sym) throws IllegalSymbolException { double [] em = (double []) emissions.get(sym); if(em == null) { int dsi = getDotStatesIndex(); em = new double[dsi]; State [] states = getStates(); for(int i = 0; i < dsi; i++) { EmissionState es = (EmissionS...
if(emissions != null) { emissions.clear();
if(emissionsProb != null) { emissionsProb.clear(); } if(emissionsOdds != null) { emissionsOdds.clear(); } if(emissionsNull != null) { emissionsNull.clear();
public void updateTransitions() { super.updateTransitions(); // workaround for bug in vm if(emissions != null) { emissions.clear(); } }
public StatePath viterbi(SymbolList [] resList)
public StatePath viterbi(SymbolList [] resList, ScoreType scoreType)
public StatePath viterbi(SymbolList [] resList) throws IllegalSymbolException { SymbolList r = resList[0]; DPCursor dpCursor = new SmallCursor(getStates(), r, r.iterator()); return viterbi(dpCursor); }
return viterbi(dpCursor);
return viterbi(dpCursor, scoreType);
public StatePath viterbi(SymbolList [] resList) throws IllegalSymbolException { SymbolList r = resList[0]; DPCursor dpCursor = new SmallCursor(getStates(), r, r.iterator()); return viterbi(dpCursor); }
throw new BioError(nsee, "Something is screwey - map is lieing about key/values");
throw new BioError(nsee, "Something is screwey - map is lying about key/values");
public SimpleAlignment(Map labelToResList) throws IllegalArgumentException { this.labels = Collections.unmodifiableList(new ArrayList(labelToResList.keySet())); this.labelToSymbolList = labelToResList; int length = -1; List alphaList = new ArrayList(); for(Iterator li = labels.iterator(); li.hasNext();...
"Realy confused. Can't find symbol " +
"Really confused. Can't find symbol " +
static public Symbol complement(Symbol sym) throws IllegalSymbolException { if(sym == a) { return t; } else if(sym == g) { return c; } else if(sym == c) { return g; } else if(sym == t) { return a; } Symbol s = (Symbol) symbolToComplement.get(sym); if(s != null) { return ...
throw new IllegalSymbolException("Realy confused. Can't find index for " +
throw new IllegalSymbolException("Really confused. Can't find index for " +
public static int index(Symbol sym) throws IllegalSymbolException { if(sym == a) { return 0; } else if(sym == g) { return 1; } else if(sym == c) { return 2; } else if(sym == t) { return 3; } getDNA().validate(sym); throw new IllegalSymbolException("Realy confused. Can't find i...
public void position(long pos) { this.position = pos;
public long position() { return position;
public void position(long pos) { this.position = pos; }
public int getInt()
public int getInt(long pos)
public int getInt() throws IndexOutOfBoundsException, IOException { int val = getInt(position); position += Constants.BYTES_IN_INT; return val; }
int val = getInt(position); position += Constants.BYTES_IN_INT; return val;
int offset = getOffset(pos); int index = getIndex(pos); MappedByteBuffer buffer = getBuffer(index); return buffer.getInt(offset);
public int getInt() throws IndexOutOfBoundsException, IOException { int val = getInt(position); position += Constants.BYTES_IN_INT; return val; }
sp.addRenderer(mlRend);
sp.setRenderer(mlRend);
public static void main(String[] args) throws Exception { String seqFile = null; try { seqFile = args[0]; } catch (IndexOutOfBoundsException ex) { throw new Exception("usage: java seqviewer.EmblViewer acc.embl"); } final BasicFeatureRenderer fr; final FeatureRenderer split; SequenceFo...
public FilteringRenderer( SequenceRenderer renderer, FeatureFilter filter, boolean recurse ) { super(renderer); try { setFilter(filter); setRecurse(recurse); } catch (ChangeVetoException cve) { throw new NestedError(cve, "Assertion Failure: Should have no listeners"); }
public FilteringRenderer() { filter = FeatureFilter.all; recurse = false;
public FilteringRenderer( SequenceRenderer renderer, FeatureFilter filter, boolean recurse ) { super(renderer); try { setFilter(filter); setRecurse(recurse); } catch (ChangeVetoException cve) { throw new NestedError(cve, "Assertion Failure: Should have no listeners"); } }
} catch (Throwable t) { System.out.println("Got an unexpected error:"); t.printStackTrace(); throw new BioError(t, "Unexpected error");
public PrimarySeq next(org.omg.CORBA.portable.ObjectImpl primarySeqIterator) throws org.Biocorba.Seqcore.EndOfStream, org.Biocorba.Seqcore.UnableToProcess { try { Sequence seq = si.nextSequence(); PrimarySeqImpl psi = new PrimarySeqImpl(seq, seq.getName(), seq.getURN(), seq.getURN()); _PrimarySeq_T...
public UnableToProcess(String __reason) {
public UnableToProcess() {
public UnableToProcess(String __reason) { super(); reason = __reason; }
reason = __reason;
public UnableToProcess(String __reason) { super(); reason = __reason; }
em[j] = eCache.getEmissions(symList);
em[j] = eCache.getEmissions(symList, !(( i < 1 && j < 1 ) || ((i > seqs[0].length()) && (j > seqs[1].length())) ) );
private void calcEmissions(double[][] em) throws IllegalSymbolException { if (flip) { //System.out.println("Calculating emissions at " + pos[0] + ", " + pos[1]); Symbol[] symL = new Symbol[2]; List symList = Arrays.asList(symL); int i = pos[0]; symL[0] = (i < 1 || i > seqs[0].length(...
em[i] = eCache.getEmissions(symList);
em[i] = eCache.getEmissions(symList, !(( i < 1 && j < 1 ) || ((i > seqs[0].length()) && (j > seqs[1].length())) ) );
private void calcEmissions(double[][] em) throws IllegalSymbolException { if (flip) { //System.out.println("Calculating emissions at " + pos[0] + ", " + pos[1]); Symbol[] symL = new Symbol[2]; List symList = Arrays.asList(symL); int i = pos[0]; symL[0] = (i < 1 || i > seqs[0].length(...
Symbol gap = sym[0][0] = AlphabetManager.getGapSymbol();
sym[0][0] = AlphabetManager.getGapSymbol();
public final double [] getEmissions(List symList) throws IllegalSymbolException { gopher.setList(symList); double [] emission = (double []) eMap.get(gopher); if(emission == null) { //System.out.print("."); Symbol sym[][] = new Symbol[2][2]; List ll = new ArrayList(symList); Symbol gap = ...
gap
gap[1]
public final double [] getEmissions(List symList) throws IllegalSymbolException { gopher.setList(symList); double [] emission = (double []) eMap.get(gopher); if(emission == null) { //System.out.print("."); Symbol sym[][] = new Symbol[2][2]; List ll = new ArrayList(symList); Symbol gap = ...
gap,
gap[0],
public final double [] getEmissions(List symList) throws IllegalSymbolException { gopher.setList(symList); double [] emission = (double []) eMap.get(gopher); if(emission == null) { //System.out.print("."); Symbol sym[][] = new Symbol[2][2]; List ll = new ArrayList(symList); Symbol gap = ...
if (temp.componentSequence == null) { throw new BioException("This implementation of ComponentFeature requires that sequences must already be resolved"); }
public SimpleComponentFeature(FeatureHolder parent, ComponentFeature.Template temp) throws BioException { if (locationContent(temp.location) != locationContent(temp.componentLocation)) { throw new BioException("Component and container locations must contain an equal number of symbols."); } i...
sb.append(nChar);
sb.append(noninformativeToken);
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) { SymbolL...
return N;
return noninformativeSymbol;
public Symbol symbolAt(int pos) { // System.out.println(this + " symbolAt(" + pos + ")"); Location l = locationOfPoint(pos); if (l != null) { SymbolList syms = getComponentSymbols(l); return syms.symbolAt(pos - l.getMin() + 1); } return N; }
String line;
public boolean readRichSequence(BufferedReader reader, SymbolTokenization symParser, RichSeqIOListener rlistener, Namespace ns) throws IllegalSymbolException, IOException, ParseException { String line; boolean hasAnotherSequence = true; //bool...
String currKey = null; StringBuffer currVal = 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 { ...
int linecount = 0;
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 { ...
public Group findGroup(String chainName, String pdbResnum)
public Group findGroup(String chainId, String pdbResnum)
public Group findGroup(String chainName, String pdbResnum) throws StructureException;
Iterator list = ProteinTools.getAlphabet().symbols().iterator();
Iterator list = ProteinTools.getAlphabet().iterator();
public void setSymbolModification(char symbolToken, double mass) throws IllegalSymbolException { Iterator list = ProteinTools.getAlphabet().symbols().iterator(); for(; list.hasNext(); ) { Symbol sym = (Symbol)list.next(); if(sym.g...
for (int i = 1; i <= symList.length(); i++) { Symbol sym = symList.symbolAt(i); double [] fsc = fm.scores[i]; double [] bsc = bm.scores[i]; for (int s = 0; s < dp.getDotStatesIndex(); s++) { if (! (states[s] instanceof MagicalState)) { trainer.addCount( ((EmissionState) states[s]).getDistribution(), sym, Math.exp(fsc[s...
for (int i = 1; i <= symList.length(); i++) { Symbol sym = symList.symbolAt(i); double [] fsc = fm.scores[i]; double [] bsc = bm.scores[i]; for (int s = 0; s < dp.getDotStatesIndex(); s++) { if (! (states[s] instanceof MagicalState)) { trainer.addCount( ((EmissionState) states[s]).getDistribution(), sym, mathExp(fsc[s]...
protected double singleSequenceIteration( ModelTrainer trainer, SymbolList symList ) throws IllegalSymbolException, IllegalTransitionException, IllegalAlphabetException { ScoreType scoreType = ScoreType.PROBABILITY; SingleDP dp = (SingleDP) getDP(); State [] states = dp.getStates(); int [][] forwar...
for (int i = 0; i <= symList.length(); i++) { Symbol sym = (i < symList.length()) ? symList.symbolAt(i + 1) : gap; double [] fsc = fm.scores[i]; double [] bsc = bm.scores[i+1]; double [] bsc2 = bm.scores[i]; double[] weightVector = dp.getEmission(sym, scoreType); for (int s = 0; s < states.length; s++) { int [] ts = ba...
for (int i = 0; i <= symList.length(); i++) { Symbol sym = (i < symList.length()) ? symList.symbolAt(i + 1) : gap; double [] fsc = fm.scores[i]; double [] bsc = bm.scores[i+1]; double [] bsc2 = bm.scores[i]; double[] weightVector = dp.getEmission(sym, scoreType); for (int s = 0; s < states.length; s++) { int [] ts = ba...
protected double singleSequenceIteration( ModelTrainer trainer, SymbolList symList ) throws IllegalSymbolException, IllegalTransitionException, IllegalAlphabetException { ScoreType scoreType = ScoreType.PROBABILITY; SingleDP dp = (SingleDP) getDP(); State [] states = dp.getStates(); int [][] forwar...
if(b.viewStart <= pos) {
if(pos <= b.viewStart) {
public void addGapsInView(int pos, int length) throws IndexOutOfBoundsException { if(pos < 1 || pos > (length() + 1)) { throw new IndexOutOfBoundsException( "Attempted to add a gap outside of this sequence (1.." + length() + ") at " + pos ); } int i = blocks.size() / 2; int imin = 0;...
Block b = (Block) blocks.get(i);
b = (Block) blocks.get(i);
protected final int findViewBlock(int indx) { int i = blocks.size() / 2; int imin = 0; int imax = blocks.size() - 1; //System.out.println("Searching for " + indx); do { //System.out.println(imin + " < " + i + " < " + imax); Block b = (Block) blocks.get(i); //System.out.println("Checking ...
return -1;
if(i >= blocks.size()) { return -blocks.size() - 1; } if(blocks.get(i) != b) { if(blocks.get(i-1) == b) { --i; } else if(blocks.get(i+1) == b) { ++i; } } if(indx > b.viewStart) { i++; if(i < blocks.size()) { } } return -i - 1;
protected final int findViewBlock(int indx) { int i = blocks.size() / 2; int imin = 0; int imax = blocks.size() - 1; //System.out.println("Searching for " + indx); do { //System.out.println(imin + " < " + i + " < " + imax); Block b = (Block) blocks.get(i); //System.out.println("Checking ...
public final int sourceToView(int indx) throws IndexOutOfBoundsException { if(indx < 1 || indx > source.length()) { throw new IndexOutOfBoundsException( "Attempted to address source sequence (1.." + length() + ") at " + indx ); } int j = findSourceBlock(indx); return sourceToView( (Block) blocks.get(j), indx );
protected final int sourceToView(Block b, int indx) { return indx - b.sourceStart + b.viewStart;
public final int sourceToView(int indx) throws IndexOutOfBoundsException { if(indx < 1 || indx > source.length()) { throw new IndexOutOfBoundsException( "Attempted to address source sequence (1.." + length() + ") at " + indx ); } int j = findSourceBlock(indx); return sourceToView( (...
public final int viewToSource(int indx) throws IndexOutOfBoundsException { if(indx < 1 || indx > length()) { throw new IndexOutOfBoundsException( "Attempted to address sequence (1.." + length() + ") at " + indx ); } int j = findViewBlock(indx); if(j == -1) { return -1; } else { return viewToSource( (Block) blocks.get(j...
protected final int viewToSource(Block b, int indx) { return indx - b.viewStart + b.sourceStart;
public final int viewToSource(int indx) throws IndexOutOfBoundsException { if(indx < 1 || indx > length()) { throw new IndexOutOfBoundsException( "Attempted to address sequence (1.." + length() + ") at " + indx ); } int j = findViewBlock(indx); if(j == -1) { return -1; } else { ...
} else if (a instanceof FeatureFilter.ByAncestor) { return ((OptimizableFilter) a).isDisjoint(b); } else if (b instanceof FeatureFilter.ByAncestor) { return ((OptimizableFilter) b).isDisjoint(a); } else if (a instanceof FeatureFilter.ByParent) { return ((OptimizableFilter) a).isDisjoint(b); } else if (b instanceof Feat...
public static boolean areDisjoint(FeatureFilter a, FeatureFilter b) { // Preconditions if (a == null) { throw new NullPointerException("Null FeatureFilter: a"); } if (b == null) { throw new NullPointerException("Null FeatureFilter: b"); } // Body if...
if(sub == sup) {
if(sub.equals(sup)) {
public static boolean areProperSubset(FeatureFilter sub, FeatureFilter sup) { // Preconditions if (sub == null) { throw new NullPointerException("Null FeatureFilter: sub"); } if (sup == null) { throw new NullPointerException("Null FeatureFilter: sup"); } // Bo...
svb.insert(0, "VERSION " + (String) value);
if (svb != null) { svb.insert(11, (String) value); } else { svb = new StringBuffer("VERSION " + (String) value); }
public void addSequenceProperty(Object key, Object value) throws ParseException { if (key.equals("LOCUS")) { idb.setLength(0); idb.append("LOCUS " + (String) value); } else if (key.equals("TYPE")) { typeb.append(value); } else if (key.equa...
svb.append(" GI:" + (String) value);
if (svb != null) { svb.append(" GI:" + (String) value); } else { svb = new StringBuffer("VERSION GI:" + (String) value); }
public void addSequenceProperty(Object key, Object value) throws ParseException { if (key.equals("LOCUS")) { idb.setLength(0); idb.append("LOCUS " + (String) value); } else if (key.equals("TYPE")) { typeb.append(value); } else if (key.equa...
static void addFactory(String format, SeqFileFormerFactory factory)
static void addFactory(final String format, final SeqFileFormerFactory factory)
static void addFactory(String format, SeqFileFormerFactory factory) { factories.put(format, factory); }
if(wrapped == null) { throw new NullPointerException("Can't wrap null"); } this.wrapped = wrapped;
super(wrapped);
public EmissionWrapper(EmissionState wrapped) throws NullPointerException { if(wrapped == null) { throw new NullPointerException("Can't wrap null"); } this.wrapped = wrapped; }