rem stringlengths 0 477k | add stringlengths 0 313k | context stringlengths 6 599k |
|---|---|---|
if (context.getDirection() == context.HORIZONTAL) | if (context.getDirection() == PairwiseRenderContext.HORIZONTAL) | public SequenceViewerEvent processMouseEvent(PairwiseRenderContext context, MouseEvent me, List path) { path.add(this); // Only hit the point with left button if (! Swi... |
distGap = new PairDistribution(dist, gap); | protected void setUp() { // create distributions try { dist = DistributionFactory.DEFAULT.createDistribution(DNATools.getDNA()); gap = new GapDistribution(DNATools.getDNA()); gapDist = new PairDistribution(gap, dist); distGap = new PairDistribution(dist, gap); } catch (IllegalAlphabetExce... | |
PairDPMatrix matrix | PairDPMatrix matrix, ScoreType scoreType | public AbstractMatrixPairDPCursor( SymbolList seq1, SymbolList seq2, CrossProductAlphabet alpha, int start1, int start2, int depth1, int depth2, PairDPMatrix matrix ) throws IllegalSymbolException { this.numStates = matrix.states().length; this.zeroCol = new doub... |
ei[j] = getEmission(symList, alpha); | ei[j] = getEmission(symList, alpha, scoreType); | public AbstractMatrixPairDPCursor( SymbolList seq1, SymbolList seq2, CrossProductAlphabet alpha, int start1, int start2, int depth1, int depth2, PairDPMatrix matrix ) throws IllegalSymbolException { this.numStates = matrix.states().length; this.zeroCol = new doub... |
PairDPMatrix matrix | PairDPMatrix matrix, ScoreType scoreType | public BackMatrixPairDPCursor( SymbolList seq1, SymbolList seq2, CrossProductAlphabet alpha, int depth1, int depth2, PairDPMatrix matrix ) throws IllegalSymbolException { super( seq1, seq2, alpha, seq1.length()+1, seq2.length()+1, depth1, depth2, mat... |
matrix | matrix, scoreType | public BackMatrixPairDPCursor( SymbolList seq1, SymbolList seq2, CrossProductAlphabet alpha, int depth1, int depth2, PairDPMatrix matrix ) throws IllegalSymbolException { super( seq1, seq2, alpha, seq1.length()+1, seq2.length()+1, depth1, depth2, mat... |
curCol[l] = Double.NEGATIVE_INFINITY; | curCol[l] = Double.NaN; | private void calcCell(Cell [][] cells) throws IllegalSymbolException, IllegalAlphabetException, IllegalTransitionException { Cell curCell = cells[0][0]; double[] curCol = curCell.scores; STATELOOP: for (int l = states.length - 1; l >= 0; --l) { //System.out.println("State = " +... |
double score = 0.0; | private void calcCell(Cell [][] cells) throws IllegalSymbolException, IllegalAlphabetException, IllegalTransitionException { Cell curCell = cells[0][0]; double[] curCol = curCell.scores; STATELOOP: for (int l = states.length - 1; l >= 0; --l) { //System.out.println("State = " +... | |
int ci = 0; while (ci < tr.length && sourceScores[ci] == Double.NEGATIVE_INFINITY) { ++ci; | double constant = Double.NaN; for( int ci = 0; ci < tr.length && ( constant == Double.NEGATIVE_INFINITY || constant == Double.NaN ); ci++ ) { constant = sourceScores[tr[ci]]; | private void calcCell(Cell [][] cells) throws IllegalSymbolException, IllegalAlphabetException, IllegalTransitionException { Cell curCell = cells[0][0]; double[] curCol = curCell.scores; STATELOOP: for (int l = states.length - 1; l >= 0; --l) { //System.out.println("State = " +... |
double constant = (ci < tr.length) ? sourceScores[ci] : 0.0; for (int kc = 0; kc < tr.length; ++kc) { | if(Double.isNaN(constant)) { curCol[l] = Double.NaN; } else { double score = 0.0; for (int kc = 0; kc < tr.length; ++kc) { | private void calcCell(Cell [][] cells) throws IllegalSymbolException, IllegalAlphabetException, IllegalTransitionException { Cell curCell = cells[0][0]; double[] curCol = curCell.scores; STATELOOP: for (int l = states.length - 1; l >= 0; --l) { //System.out.println("State = " +... |
int k = tr[kc]; double skc = sourceScores[kc]; if (skc != Double.NEGATIVE_INFINITY) { double t = trs[kc]; score += Math.exp(t + skc - constant); | int k = tr[kc]; double skc = sourceScores[kc]; if (skc != Double.NEGATIVE_INFINITY && !Double.isNaN(skc)) { double t = trs[kc]; score += Math.exp(t + skc - constant); } | private void calcCell(Cell [][] cells) throws IllegalSymbolException, IllegalAlphabetException, IllegalTransitionException { Cell curCell = cells[0][0]; double[] curCol = curCell.scores; STATELOOP: for (int l = states.length - 1; l >= 0; --l) { //System.out.println("State = " +... |
curCol[l] = Math.log(score) + constant; | private void calcCell(Cell [][] cells) throws IllegalSymbolException, IllegalAlphabetException, IllegalTransitionException { Cell curCell = cells[0][0]; double[] curCol = curCell.scores; STATELOOP: for (int l = states.length - 1; l >= 0; --l) { //System.out.println("State = " +... | |
PairDPCursor curs | PairDPCursor curs, ScoreType scoreType | public double runBackward( PairDPCursor curs ) throws IllegalSymbolException, IllegalAlphabetException, IllegalTransitionException { states = getStates(); cursor = curs; alpha = (CrossProductAlphabet) getModel().emissionAlphabet(); transitions = getBackwardTransitions()... |
transitionScores = getBackwardTransitionScores(); | transitionScores = getBackwardTransitionScores(scoreType); | public double runBackward( PairDPCursor curs ) throws IllegalSymbolException, IllegalAlphabetException, IllegalTransitionException { states = getStates(); cursor = curs; alpha = (CrossProductAlphabet) getModel().emissionAlphabet(); transitions = getBackwardTransitions()... |
curCol[l] = Double.NEGATIVE_INFINITY; | curCol[l] = Double.NaN; | private void calcCell(Cell [][] cells) throws IllegalSymbolException, IllegalAlphabetException, IllegalTransitionException { Cell curCell = cells[0][0]; double[] curCol = curCell.scores; double[] emissions = curCell.emissions; STATELOOP: for (int l = 0; l < states.length... |
if(weight == Double.NEGATIVE_INFINITY) { curCol[l] = Double.NEGATIVE_INFINITY; | if(weight == Double.NEGATIVE_INFINITY || Double.isNaN(weight)) { curCol[l] = Double.NaN; | private void calcCell(Cell [][] cells) throws IllegalSymbolException, IllegalAlphabetException, IllegalTransitionException { Cell curCell = cells[0][0]; double[] curCol = curCell.scores; double[] emissions = curCell.emissions; STATELOOP: for (int l = 0; l < states.length... |
double score = 0.0; | private void calcCell(Cell [][] cells) throws IllegalSymbolException, IllegalAlphabetException, IllegalTransitionException { Cell curCell = cells[0][0]; double[] curCol = curCell.scores; double[] emissions = curCell.emissions; STATELOOP: for (int l = 0; l < states.length... | |
int ci = 0; while (ci < tr.length && sourceScores[ci] == Double.NEGATIVE_INFINITY) { ++ci; | double constant = Double.NaN; for ( int ci = 0; ci < tr.length && ( constant == Double.NEGATIVE_INFINITY || Double.isNaN(constant) ); ci++ ) { constant = sourceScores[tr[ci]]; | private void calcCell(Cell [][] cells) throws IllegalSymbolException, IllegalAlphabetException, IllegalTransitionException { Cell curCell = cells[0][0]; double[] curCol = curCell.scores; double[] emissions = curCell.emissions; STATELOOP: for (int l = 0; l < states.length... |
double constant = (ci < tr.length) ? sourceScores[ci] : 0.0; for (int kc = 0; kc < tr.length; ++kc) { | if(Double.isNaN(constant)) { curCol[l] = Double.NaN; } else { double score = 0.0; for (int kc = 0; kc < tr.length; ++kc) { | private void calcCell(Cell [][] cells) throws IllegalSymbolException, IllegalAlphabetException, IllegalTransitionException { Cell curCell = cells[0][0]; double[] curCol = curCell.scores; double[] emissions = curCell.emissions; STATELOOP: for (int l = 0; l < states.length... |
int k = tr[kc]; double sk = sourceScores[k]; if (sk != Double.NEGATIVE_INFINITY) { double t = trs[kc]; score += Math.exp(t + sk - constant); | int k = tr[kc]; double sk = sourceScores[k]; if (sk != Double.NEGATIVE_INFINITY && !Double.isNaN(sk)) { double t = trs[kc]; score += Math.exp(t + sk - constant); } | private void calcCell(Cell [][] cells) throws IllegalSymbolException, IllegalAlphabetException, IllegalTransitionException { Cell curCell = cells[0][0]; double[] curCol = curCell.scores; double[] emissions = curCell.emissions; STATELOOP: for (int l = 0; l < states.length... |
curCol[l] = weight + Math.log(score) + constant; | private void calcCell(Cell [][] cells) throws IllegalSymbolException, IllegalAlphabetException, IllegalTransitionException { Cell curCell = cells[0][0]; double[] curCol = curCell.scores; double[] emissions = curCell.emissions; STATELOOP: for (int l = 0; l < states.length... | |
public double runForward(PairDPCursor curs) | public double runForward(PairDPCursor curs, ScoreType scoreType) | public double runForward(PairDPCursor curs) throws IllegalSymbolException, IllegalAlphabetException, IllegalTransitionException { states = getStates(); cursor = curs; transitions = getForwardTransitions(); transitionScores = getForwardTransitionScores(); Cell[][] cells = cursor.p... |
transitionScores = getForwardTransitionScores(); | transitionScores = getForwardTransitionScores(scoreType); | public double runForward(PairDPCursor curs) throws IllegalSymbolException, IllegalAlphabetException, IllegalTransitionException { states = getStates(); cursor = curs; transitions = getForwardTransitions(); transitionScores = getForwardTransitionScores(); Cell[][] cells = cursor.p... |
int numStates | int numStates, ScoreType scoreType | public LightPairDPCursor( SymbolList seq1, SymbolList seq2, CrossProductAlphabet alpha, int depth1, int depth2, int numStates ) throws IllegalSymbolException { this.numStates = numStates; this.alpha = alpha; this.zeroCol = new double[this.numStates]; // don't touch th... |
em[j] = getEmission(symList, alpha); | em[j] = getEmission(symList, alpha, scoreType); | 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... |
em[i] = getEmission(symList, alpha); | em[i] = getEmission(symList, alpha, scoreType); | 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... |
PairDPMatrix matrix | PairDPMatrix matrix, ScoreType scoreType | public MatrixPairDPCursor( SymbolList seq1, SymbolList seq2, CrossProductAlphabet alpha, int depth1, int depth2, PairDPMatrix matrix ) throws IllegalSymbolException { super(seq1, seq2, alpha, 0, 0, depth1, depth2, matrix); } |
super(seq1, seq2, alpha, 0, 0, depth1, depth2, matrix); | super(seq1, seq2, alpha, 0, 0, depth1, depth2, matrix, scoreType); | public MatrixPairDPCursor( SymbolList seq1, SymbolList seq2, CrossProductAlphabet alpha, int depth1, int depth2, PairDPMatrix matrix ) throws IllegalSymbolException { super(seq1, seq2, alpha, 0, 0, depth1, depth2, matrix); } |
curCol[l] = Double.NEGATIVE_INFINITY; | curCol[l] = Double.NaN; | private void calcCell(Cell [][] cells) throws IllegalSymbolException, IllegalAlphabetException, IllegalTransitionException { Cell curCell = cells[0][0]; double[] curCol = curCell.scores; BackPointer[] curBPs = curCell.backPointers; double[] emissions = curCell.emissions; ... |
if(weight == Double.NEGATIVE_INFINITY) { curCol[l] = Double.NEGATIVE_INFINITY; | if(weight == Double.NEGATIVE_INFINITY || Double.isNaN(weight)) { curCol[l] = Double.NaN; | private void calcCell(Cell [][] cells) throws IllegalSymbolException, IllegalAlphabetException, IllegalTransitionException { Cell curCell = cells[0][0]; double[] curCol = curCell.scores; BackPointer[] curBPs = curCell.backPointers; double[] emissions = curCell.emissions; ... |
if (sk != Double.NEGATIVE_INFINITY) { | if (sk != Double.NEGATIVE_INFINITY && !Double.isNaN(sk)) { | private void calcCell(Cell [][] cells) throws IllegalSymbolException, IllegalAlphabetException, IllegalTransitionException { Cell curCell = cells[0][0]; double[] curCol = curCell.scores; BackPointer[] curBPs = curCell.backPointers; double[] emissions = curCell.emissions; ... |
/*System.out.println( | /*System.out.println("Weight = " + weight); System.out.println("Score = " + score); System.out.println( | private void calcCell(Cell [][] cells) throws IllegalSymbolException, IllegalAlphabetException, IllegalTransitionException { Cell curCell = cells[0][0]; double[] curCol = curCell.scores; BackPointer[] curBPs = curCell.backPointers; double[] emissions = curCell.emissions; ... |
} else { System.out.print("\n"); | private void calcCell(Cell [][] cells) throws IllegalSymbolException, IllegalAlphabetException, IllegalTransitionException { Cell curCell = cells[0][0]; double[] curCol = curCell.scores; BackPointer[] curBPs = curCell.backPointers; double[] emissions = curCell.emissions; ... | |
public StatePath runViterbi(SymbolList seq0, SymbolList seq1) | public StatePath runViterbi(SymbolList seq0, SymbolList seq1, ScoreType scoreType) | public StatePath runViterbi(SymbolList seq0, SymbolList seq1) throws IllegalSymbolException, IllegalAlphabetException, IllegalTransitionException { State magic = getModel().magicalState(); TERMINAL_BP = new BackPointer(magic); states = getStates(); cursor = new LightPairDPC... |
2, 2, states.length | 2, 2, states.length, scoreType | public StatePath runViterbi(SymbolList seq0, SymbolList seq1) throws IllegalSymbolException, IllegalAlphabetException, IllegalTransitionException { State magic = getModel().magicalState(); TERMINAL_BP = new BackPointer(magic); states = getStates(); cursor = new LightPairDPC... |
transitionScores = getForwardTransitionScores(); | transitionScores = getForwardTransitionScores(scoreType); | public StatePath runViterbi(SymbolList seq0, SymbolList seq1) throws IllegalSymbolException, IllegalAlphabetException, IllegalTransitionException { State magic = getModel().magicalState(); TERMINAL_BP = new BackPointer(magic); states = getStates(); cursor = new LightPairDPC... |
super(mm); magicalState = mm.magicalState(); emissions = new HashMap(); | super(mm); magicalState = mm.magicalState(); emissionsProb = new HashMap(); emissionsOdds = new HashMap(); emissionsNull = new HashMap(); | public PairwiseDP(MarkovModel mm) throws IllegalSymbolException, IllegalTransitionException, BioException { super(mm); magicalState = mm.magicalState(); emissions = new HashMap(); } |
public double backward(SymbolList[] seqs) | public double backward(SymbolList[] seqs, ScoreType scoreType) | public double backward(SymbolList[] seqs) throws IllegalSymbolException, IllegalAlphabetException, IllegalTransitionException { return backwardMatrix(seqs).getScore(); } |
return backwardMatrix(seqs).getScore(); | return backwardMatrix(seqs, scoreType).getScore(); | public double backward(SymbolList[] seqs) throws IllegalSymbolException, IllegalAlphabetException, IllegalTransitionException { return backwardMatrix(seqs).getScore(); } |
public DPMatrix backwardMatrix(SymbolList[] seqs) | public DPMatrix backwardMatrix(SymbolList[] seqs, ScoreType scoreType) | public DPMatrix backwardMatrix(SymbolList[] seqs) throws IllegalSymbolException, IllegalAlphabetException, IllegalTransitionException { if (seqs.length != 2) { throw new IllegalArgumentException("This DP object only runs on pairs."); } lockModel(); Backward b = new Backward(); PairDPMatrix mat... |
matrix | matrix, scoreType | public DPMatrix backwardMatrix(SymbolList[] seqs) throws IllegalSymbolException, IllegalAlphabetException, IllegalTransitionException { if (seqs.length != 2) { throw new IllegalArgumentException("This DP object only runs on pairs."); } lockModel(); Backward b = new Backward(); PairDPMatrix mat... |
double score = b.runBackward(cursor); | double score = b.runBackward(cursor, scoreType); | public DPMatrix backwardMatrix(SymbolList[] seqs) throws IllegalSymbolException, IllegalAlphabetException, IllegalTransitionException { if (seqs.length != 2) { throw new IllegalArgumentException("This DP object only runs on pairs."); } lockModel(); Backward b = new Backward(); PairDPMatrix mat... |
public double forward(SymbolList[] seqs) | public double forward(SymbolList[] seqs, ScoreType scoreType) | public double forward(SymbolList[] seqs) throws IllegalSymbolException, IllegalAlphabetException, IllegalTransitionException { if (seqs.length != 2) { throw new IllegalArgumentException("This DP object only runs on pairs."); } lockModel(); Forward f = new Forward(); PairDPCursor cursor = new L... |
2, 2, getStates().length | 2, 2, getStates().length, scoreType | public double forward(SymbolList[] seqs) throws IllegalSymbolException, IllegalAlphabetException, IllegalTransitionException { if (seqs.length != 2) { throw new IllegalArgumentException("This DP object only runs on pairs."); } lockModel(); Forward f = new Forward(); PairDPCursor cursor = new L... |
return f.runForward(cursor); | return f.runForward(cursor, scoreType); | public double forward(SymbolList[] seqs) throws IllegalSymbolException, IllegalAlphabetException, IllegalTransitionException { if (seqs.length != 2) { throw new IllegalArgumentException("This DP object only runs on pairs."); } lockModel(); Forward f = new Forward(); PairDPCursor cursor = new L... |
public DPMatrix forwardMatrix(SymbolList[] seqs) | public DPMatrix forwardMatrix(SymbolList[] seqs, ScoreType scoreType) | public DPMatrix forwardMatrix(SymbolList[] seqs) throws IllegalSymbolException, IllegalAlphabetException, IllegalTransitionException { if (seqs.length != 2) { throw new IllegalArgumentException("This DP object only runs on pairs."); } lockModel(); Forward f = new Forward(); PairDPMatri... |
2, 2, matrix | 2, 2, matrix, scoreType | public DPMatrix forwardMatrix(SymbolList[] seqs) throws IllegalSymbolException, IllegalAlphabetException, IllegalTransitionException { if (seqs.length != 2) { throw new IllegalArgumentException("This DP object only runs on pairs."); } lockModel(); Forward f = new Forward(); PairDPMatri... |
double score = f.runForward(cursor); | double score = f.runForward(cursor, scoreType); | public DPMatrix forwardMatrix(SymbolList[] seqs) throws IllegalSymbolException, IllegalAlphabetException, IllegalTransitionException { if (seqs.length != 2) { throw new IllegalArgumentException("This DP object only runs on pairs."); } lockModel(); Forward f = new Forward(); PairDPMatri... |
protected double [] getEmission(List symList, CrossProductAlphabet alpha) | protected double [] getEmission(List symList, CrossProductAlphabet alpha, ScoreType scoreType) | protected double [] getEmission(List symList, CrossProductAlphabet alpha) throws IllegalSymbolException { gopher.setList(symList); double [] emission = (double []) emissions.get(gopher); if(emission == null) { //System.out.print("."); Symbol sym[][] = new Symbol[2][2]; List ll = new ArrayList... |
double [] emission = (double []) emissions.get(gopher); | Map eMap; if(scoreType == DP.PROBABILITY) { eMap = emissionsProb; } else if(scoreType == DP.ODDS) { eMap = emissionsOdds; } else if(scoreType == DP.NULL_MODEL) { eMap = emissionsNull; } else { throw new BioError("Unknown score type: " + scoreType); } double [] emission = (double []) eMap.get(gopher); | protected double [] getEmission(List symList, CrossProductAlphabet alpha) throws IllegalSymbolException { gopher.setList(symList); double [] emission = (double []) emissions.get(gopher); if(emission == null) { //System.out.print("."); Symbol sym[][] = new Symbol[2][2]; List ll = new ArrayList... |
emission[i] = Math.log(dis.getWeight(s)); | emission[i] = Math.log(scoreType.calculateScore(dis, s)); | protected double [] getEmission(List symList, CrossProductAlphabet alpha) throws IllegalSymbolException { gopher.setList(symList); double [] emission = (double []) emissions.get(gopher); if(emission == null) { //System.out.print("."); Symbol sym[][] = new Symbol[2][2]; List ll = new ArrayList... |
emissions.put(new ListWrapper(ll), emission); | eMap.put(new ListWrapper(ll), emission); | protected double [] getEmission(List symList, CrossProductAlphabet alpha) throws IllegalSymbolException { gopher.setList(symList); double [] emission = (double []) emissions.get(gopher); if(emission == null) { //System.out.print("."); Symbol sym[][] = new Symbol[2][2]; List ll = new ArrayList... |
public StatePath viterbi(SymbolList[] seqs) | public StatePath viterbi(SymbolList[] seqs, ScoreType scoreType) | public StatePath viterbi(SymbolList[] seqs) throws IllegalSymbolException, IllegalAlphabetException, IllegalTransitionException { if (seqs.length != 2) { throw new IllegalArgumentException("This DP object only runs on pairs."); } lockModel(); Viterbi v = new Viterbi(); StatePath sp = v... |
StatePath sp = v.runViterbi(seqs[0], seqs[1]); | StatePath sp = v.runViterbi(seqs[0], seqs[1], scoreType); | public StatePath viterbi(SymbolList[] seqs) throws IllegalSymbolException, IllegalAlphabetException, IllegalTransitionException { if (seqs.length != 2) { throw new IllegalArgumentException("This DP object only runs on pairs."); } lockModel(); Viterbi v = new Viterbi(); StatePath sp = v... |
throw new IOException("Premature end of stream or missing end tag ' | throw new IOException("Premature end of stream or missing end tag"); | public boolean read( BufferedReader reader, TagValueParser parser, TagValueListener listener ) throws IOException, ParserException { final List stack = new ArrayList(); push(stack, new Frame(parser, listener, null)); Context ctxt = new Context(); listener.startRecord(); for... |
g.setTransform(at); g.setClip(clip); | public void paint(Graphics2D g, SequenceRenderContext src) { for (Iterator i = src.getFeatures().filter(new FeatureFilter.OverlapsLocation(src.getRange()), false).features(); i.hasNext();) { Feature f = (Feature) i.next(); Locatio... | |
double y2 = target[i2]; | private int examineExample(int i2) { double y2 = target[i2]; double alpha2 = model.getAlpha(i2); double alpha2star = model.getAlphaStar(i2); double phi2 = getError(i2); /* if (Math.abs(phi2) < epsilon) return 0; */ if ( (+phi2 < epsilon && alpha2star < C) || (+phi2 < epsilon && alpha... | |
double alpha1old = alpha1; double alpha1starold = alpha1star; double alpha2old = alpha2; double alpha2starold = alpha2star; | private boolean takeStep(int i1, int i2) { //System.out.print("+"); if (i1 == i2) { return false; } double y1 = target[i1]; double y2 = target[i2]; double alpha1 = model.getAlpha(i1); double alpha2 = model.getAlpha(i2); double alpha1star = model.getAlphaStar(i1); double alpha2star =... | |
protected SimpleSymbol( char token, String name, Annotation annotation ) { | protected SimpleSymbol(char token, Annotation annotation) { | protected SimpleSymbol( char token, String name, Annotation annotation ) { this.token = token; this.name = name; this.annotation = new SimpleAnnotation(annotation); } |
this.name = name; | protected SimpleSymbol( char token, String name, Annotation annotation ) { this.token = token; this.name = name; this.annotation = new SimpleAnnotation(annotation); } | |
return name; } | Alphabet a = getMatches(); if (this instanceof BasisSymbol) { List l = ((BasisSymbol) this).getSymbols(); if (l.size() > 1) { StringBuffer sb = new StringBuffer(); sb.append('('); for (Iterator si = l.iterator(); si.hasNext(); ) { Symbol sym = (Symbol) si.next(); sb.append(sym.getName()); if (si.hasNext()) sb.append('... | public String getName() { return name; } |
String sym = m.group(3); | public static void instantiateDB(URL url, HomologeneBuilder builder) throws OperationNotSupportedException, FileNotFoundException, IOException { boolean inDB = false; boolean inGroup = false; if (!url.getProtocol().equals("file")) throw new OperationNotSupportedException();... | |
public Collection getPaymentItems(String communeNumber, String personalId) { | public Collection getPaymentItems(String communeNumber, String personalId, String endpoint) { | public Collection getPaymentItems(String communeNumber, String personalId) { Collection c = new Vector(); PaymentItem p1 = new PaymentItem(); p1.setName("Fasteignagjld"); p1.setAmount(45346); p1.setLastDate( new IWTimestamp() ); PaymentItem p2 = new PaymentItem(); p2.setName("Leiksklagjld"); p2.setAmount(122... |
if (endpoint == null) { endpoint = PAYMENT_ITEMS_ENDPOINT; } try { WSFinanceDataGetState2_GetState_SoapPortLocator state_locator = new WSFinanceDataGetState2_GetState_SoapPortLocator(); WSFinanceDataGetState2_GetState_SoapPortSoap_PortType state_port = state_locator.getWSFinanceDataGetState2_GetState_SoapPortSoap(new ... | public Collection getPaymentItems(String communeNumber, String personalId) { Collection c = new Vector(); PaymentItem p1 = new PaymentItem(); p1.setName("Fasteignagjld"); p1.setAmount(45346); p1.setLastDate( new IWTimestamp() ); PaymentItem p2 = new PaymentItem(); p2.setName("Leiksklagjld"); p2.setAmount(122... | |
public Collection getStatementItems(String communeNumber, String personalId, PaymentItem pType, IWTimestamp fromStamp, IWTimestamp toStamp) { | public Collection getStatementItems(String communeNumber, String personalId, PaymentItem pType, IWTimestamp fromStamp, IWTimestamp toStamp, String endpoint) { | public Collection getStatementItems(String communeNumber, String personalId, PaymentItem pType, IWTimestamp fromStamp, IWTimestamp toStamp) { Collection c = new Vector(); StatementItem s1 = new StatementItem(); s1.setName("Upphafsstaa"); s1.setAmount(0); s1.setLastDate( new IWTimestamp() ); StatementItem s2 = ... |
return new SubList(sstart + start - 1, sstart + end - 1); | return new SubList(sstart + start - 1, send + start - 1); | public SymbolList subList(int sstart, int send) { return new SubList(sstart + start - 1, sstart + end - 1); } |
return items[indx]; | try { return items[indx]; } catch (IndexOutOfBoundsException iobe) { throw new IndexOutOfBoundsException("Can't access index " + indx + ":" + items.length); } | public Object getObject(int indx) { return items[indx]; } |
StringBuffer sb = new StringBuffer(getObject(0).toString()); | StringBuffer sb = new StringBuffer("("); sb.append(getObject(0).toString()); | public String toString() { StringBuffer sb = new StringBuffer(getObject(0).toString()); for(int i = 1; i < getClassList().size(); i++) { sb.append(","); sb.append(getObject(i).toString()); } return sb.toString(); } |
sb.append(")"); | public String toString() { StringBuffer sb = new StringBuffer(getObject(0).toString()); for(int i = 1; i < getClassList().size(); i++) { sb.append(","); sb.append(getObject(i).toString()); } return sb.toString(); } | |
private StringBuffer formatRange(StringBuffer sb, RangeLocation rl) | private StringBuffer formatRange(StringBuffer sb, Location rl) | private StringBuffer formatRange(StringBuffer sb, RangeLocation rl) { // 123..567 sb.append(rl.getMin()); sb.append(".."); sb.append(rl.getMax()); return sb; } |
box = new Rectangle2D.Double(min, 5, max-min, 20); | box = new Rectangle2D.Double(min, 5, max-min, 15); | public void paint(Graphics2D g, SequencePanel sp) { for (Iterator i = sp.getSequence().filter(filter, true).features(); i.hasNext(); ) { Feature f = (Feature) i.next(); Location l = f.getLocation(); double min = sp.sequenceToGraphics(l.getMin()); double max = sp.sequenceToGraphics(l.getMax() + ... |
public SocketClazzSet(AceURL url, AceSet parent) { | public SocketClazzSet(String name, AceURL url, AceSet parent, SocketDatabase ourDB) { | public SocketClazzSet(AceURL url, AceSet parent) { this.url = url; this.parent = parent; } |
this.ourDB = ourDB; | public SocketClazzSet(AceURL url, AceSet parent) { this.url = url; this.parent = parent; } | |
return Ace.fetch(url.relativeURL("?" + rule)); | return ourDB.select(name, rule); | public AceSet filter(String rule) throws AceException { return Ace.fetch(url.relativeURL("?" + rule)); } |
features = new BioSQLTiledFeatures(this, seqDB, bioentry_id, 10000); | if (length() < 100000) { features = new BioSQLAllFeatures(this, seqDB, bioentry_id); } else { features = new BioSQLTiledFeatures(this, seqDB, bioentry_id, 50000); } | private RealizingFeatureHolder getFeatures() { if (features == null) { features = new BioSQLTiledFeatures(this, seqDB, bioentry_id, 10000); } return features; } |
rendererBorders = renderer.getMinimumLeader(this) + renderer.getMinimumTrailer(this); | if (sequence != null) rendererBorders = renderer.getMinimumLeader(this) + renderer.getMinimumTrailer(this); | private void _setRenderer(SequenceRenderer renderer) { // Remove our listeners from the old renderer, if necessary if (this.renderer != null && Changeable.class.isInstance(this.renderer)) { Changeable c = (Changeable) this.renderer; c.removeChangeListener(lay... |
if (! isActive()) _setRenderer(renderer); | public void setRenderer(SequenceRenderer renderer) throws ChangeVetoException { if (hasListeners()) { ChangeSupport cs = getChangeSupport(RENDERER); // We are originating a change event so use this // constructor ChangeEvent ce = new ChangeEvent(th... | |
} | public void setSequence(Sequence sequence) { Sequence prevSequence = this.sequence; // Remove out listener from the sequence, if necessary if (prevSequence != null) prevSequence.removeChangeListener(layoutListener); this.sequence = sequence; // Add our listener to th... | |
for(Iterator i = target.items().iterator(); i.hasNext(); ) { | for(Iterator i = model.items().iterator(); i.hasNext(); ) { | public void classify() { new Thread() { public void run() { Cursor c = getCursor(); setCursor(new Cursor(Cursor.WAIT_CURSOR)); System.out.println("Training"); model = trainer.trainModel(target, kernel, null); System.out.println("Threshold = " + model.getThres... |
for(Iterator i = target.items().iterator(); i.hasNext(); ) { | for(Iterator i = model.items().iterator(); i.hasNext(); ) { | public void run() { Cursor c = getCursor(); setCursor(new Cursor(Cursor.WAIT_CURSOR)); System.out.println("Training"); model = trainer.trainModel(target, kernel, null); System.out.println("Threshold = " + model.getThreshold()); for(Iterator i = target.items(... |
FeatureFilter childFilter = new FeatureFilter.Not(new FeatureFilter.IsTopLevel()); | FeatureFilter childFilter = new FeatureFilter.Not(FeatureFilter.top_level); | public FeatureHolder filter(FeatureFilter ff) { FeatureFilter childFilter = new FeatureFilter.Not(new FeatureFilter.IsTopLevel()); if (FilterUtils.areDisjoint(ff, childFilter)) { return FeatureHolder.EMPTY_FEATURE_HOLDER; } el... |
int strand = 0; if (templ instanceof StrandedFeature.Template) strand = ((StrandedFeature.Template) templ).strand.getValue(); | public void startFeature(Feature.Template templ) throws ParseException { // There are 19 spaces in the leader String leader = "FT "; int strand = 0; if (templ instanceof StrandedFeature.Template) strand = ((StrandedFeature.Template) templ).strand.getVal... | |
this.translation = temp.location.getMax() + temp.componentLocation.getMin(); | this.translation = temp.location.getMax() + 1; | public DistComponentFeature(DistributedSequence parent, ComponentFeature.Template temp) throws BioException { if(temp.location == null) { throw new NullPointerException("Template has null location: " + temp); } if(temp.componentLocation == null) { throw new NullPoint... |
this.translation = temp.location.getMin() - temp.componentLocation.getMin(); | this.translation = temp.location.getMin() - 1; | public DistComponentFeature(DistributedSequence parent, ComponentFeature.Template temp) throws BioException { if(temp.location == null) { throw new NullPointerException("Template has null location: " + temp); } if(temp.componentLocation == null) { throw new NullPoint... |
getComponentSequence(), | new SubSequence(getComponentSequence(), getComponentLocation().getMin(), getComponentLocation().getMax()), | protected FeatureHolder getProjectedFeatures() { if (projectedFeatures == null) { projectedFeatures = new ProjectedFeatureHolder( new TranslateFlipContext( this, getComponentSequence(), translation, ... |
this.advance = advance; | public WMState(int index) { super(emissionAlphabet()); this.index = index; this.advance = advance; } | |
stateList = new WMState[wm.columns()]; | this.stateList = new WMState[wm.columns()]; | public WMAsMM(WeightMatrix wm) throws IllegalResidueException { this.wm = wm; stateList = new WMState[wm.columns()]; SimpleAlphabet sa = new SimpleAlphabet(); sa.addResidue(magicalState); for(int i = 0; i < wm.columns(); i++) { stateList[i] = new WMState(i); sa.addResidue(stateList[i]); ... |
this.stateAlpha = sa; | public WMAsMM(WeightMatrix wm) throws IllegalResidueException { this.wm = wm; stateList = new WMState[wm.columns()]; SimpleAlphabet sa = new SimpleAlphabet(); sa.addResidue(magicalState); for(int i = 0; i < wm.columns(); i++) { stateList[i] = new WMState(i); sa.addResidue(stateList[i]); ... | |
all_and_all = new FeatureFilter.And(FeatureFilter.all, FeatureFilter.all); all_and_none = new FeatureFilter.And(FeatureFilter.all, FeatureFilter.none); none_and_all = new FeatureFilter.And(FeatureFilter.none, FeatureFilter.all); none_and_none = new FeatureFilter.And(FeatureFilter.none, FeatureFilter.none); all_or_a... | protected void setUp() throws Exception { // // Three type filters (opaque but mutually disjoint). // tf1 = new FeatureFilter.ByType("hello"); tf2 = new FeatureFilter.ByType("goodbye"); tf3 = new FeatureFilter.ByType("moo"); // // Three annotation-property filters (opaque, non-disjoint) // pf1 = new FeatureFilter.H... | |
pf4 = new FeatureFilter.ByAnnotation("foo", "fish"); pf5 = new FeatureFilter.ByAnnotation("foo", "cat"); pf6 = new FeatureFilter.ByAnnotation("bar", "fish"); | protected void setUp() throws Exception { // // Three type filters (opaque but mutually disjoint). // tf1 = new FeatureFilter.ByType("hello"); tf2 = new FeatureFilter.ByType("goodbye"); tf3 = new FeatureFilter.ByType("moo"); // // Three annotation-property filters (opaque, non-disjoint) // pf1 = new FeatureFilter.H... | |
assertTrue(FilterUtils.areProperSubset(pf1_and_pf2, pf1)); assertTrue(! FilterUtils.areDisjoint(pf1_and_pf2, pf1)); assertTrue(FilterUtils.areProperSubset(pf1_and_pf2, pf2)); assertTrue(! FilterUtils.areProperSubset(pf1_and_pf2, pf3)); assertTrue(! FilterUtils.areProperSubset(pf2_and_pf3, pf1_and_pf2)); assertTrue(Filt... | assertTrue("are subset: " + all_and_all + ", " + FeatureFilter.all, FilterUtils.areProperSubset(all_and_all, FeatureFilter.all)); assertFalse("not disjoint: " + all_and_all + ", " + FeatureFilter.all, FilterUtils.areDisjoint(all_and_all, FeatureFilter.all)); assertTrue("are subset: " + FeatureFilter.all + ", " + all_an... | public void testAnd() throws Exception { assertTrue(FilterUtils.areProperSubset(pf1_and_pf2, pf1)); assertTrue(! FilterUtils.areDisjoint(pf1_and_pf2, pf1)); assertTrue(FilterUtils.areProperSubset(pf1_and_pf2, pf2)); assertTrue(! FilterUtils.areProperSubset(pf1_and_pf2, pf3)); assertTrue(! FilterUtils.areProperSubse... |
assertTrue(FilterUtils.areProperSubset(pf1_and_pf2_and_tf1, pf1_and_pf2)); assertTrue(FilterUtils.areProperSubset(pf1_and_pf2_and_tf1, pf1_and_tf1)); | assertFalse("not subset: " + all_and_all + ", " + FeatureFilter.none, FilterUtils.areProperSubset(all_and_all, FeatureFilter.none)); assertTrue("are disjoint: " + all_and_all + ", " + FeatureFilter.none, FilterUtils.areDisjoint(all_and_all, FeatureFilter.none)); assertTrue("are subset: " + FeatureFilter.none + ", " + a... | public void testAnd() throws Exception { assertTrue(FilterUtils.areProperSubset(pf1_and_pf2, pf1)); assertTrue(! FilterUtils.areDisjoint(pf1_and_pf2, pf1)); assertTrue(FilterUtils.areProperSubset(pf1_and_pf2, pf2)); assertTrue(! FilterUtils.areProperSubset(pf1_and_pf2, pf3)); assertTrue(! FilterUtils.areProperSubse... |
assertTrue(FilterUtils.areDisjoint(pf1_and_tf1, tf2)); assertTrue(FilterUtils.areDisjoint(pf1_and_pf2_and_tf1, tf2)); | assertTrue("are subset: " + none_and_all + ", " + FeatureFilter.all, FilterUtils.areProperSubset(none_and_all, FeatureFilter.all)); assertTrue("are disjoint: " + none_and_all + ", " + FeatureFilter.all, FilterUtils.areDisjoint(none_and_all, FeatureFilter.all)); assertFalse("not subset: " + FeatureFilter.all + ", " + no... | public void testAnd() throws Exception { assertTrue(FilterUtils.areProperSubset(pf1_and_pf2, pf1)); assertTrue(! FilterUtils.areDisjoint(pf1_and_pf2, pf1)); assertTrue(FilterUtils.areProperSubset(pf1_and_pf2, pf2)); assertTrue(! FilterUtils.areProperSubset(pf1_and_pf2, pf3)); assertTrue(! FilterUtils.areProperSubse... |
return exec(args, input, stdout, stderr, 0L); | return exec(args, null, null, input, stdout, stderr, 0L); | public static int exec( String[] args, Reader input, Writer stdout, Writer stderr ) throws IOException { try { return exec(args, input, stdout, stderr, 0L); } catch (ProcessTimeoutException ex) { throw new Error("Assertion failed: unexpected p... |
return new Tuple(); | throw new MappingException("can't map null"); | public Tuple backMap(Object obj, TypeMapper typeMapper) throws MappingException { if (obj == null) { return new Tuple(); } try { Tuple t = new Tuple(); String clname = obj.getClass().getName(); String relname = (String) classNameBackMap.get(clname); t.setRelationName(relname); Map desc = BeanUtils.des... |
classNameBackMap.put(cls, name); | public void configure(Configuration arg0) throws ConfigurationException { Configuration[] confs = arg0.getChildren("relation"); for (int i = 0; i < confs.length; i++) { String name = confs[i].getAttribute("name"); String cls = confs[i].getAttribute("class"); classNameMap.put(name, cls); } } | |
rlistener.setNamespace(RichObjectFactory.getDefaultLocalNamespace()); | rlistener.setNamespace(RichObjectFactory.getGenbankNamespace()); | public boolean readRichSequence(BufferedReader reader, SymbolTokenization symParser, RichSeqIOListener rlistener) throws IllegalSymbolException, IOException, ParseException { String line; boolean hasAnotherSequence = true; boolean hasInternalWhitespace = fals... |
if (!symParser.getAlphabet().getName().equals(m.group(3))) throw new ParseException("Genbank alphabet does not match expected alphabet in parser"); | public boolean readRichSequence(BufferedReader reader, SymbolTokenization symParser, RichSeqIOListener rlistener) throws IllegalSymbolException, IOException, ParseException { String line; boolean hasAnotherSequence = true; boolean hasInternalWhitespace = fals... | |
author = s.trim(); | protected void setStringValue(String s) { author = s.trim(); } | |
featureSetName = s.trim(); | protected void setStringValue(String s) { featureSetName = s.trim(); } |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.