rem
stringlengths
0
477k
add
stringlengths
0
313k
context
stringlengths
6
599k
System.err.println(_prefix + "Ending true");
System.err.println(_prefix + "Ending true: identical"); return true; } else if(object == ANY) { System.err.println(_prefix + "Ending true: any");
public static boolean isa( Term subject, Term object ) throws OntologyException { String _prefix = "isa(" + subject + "," + object + ") "; System.err.println(_prefix + "Starting"); if(subject == object) { System.err.println(_prefix + "Ending true"); return true; } OntologyOps o...
oo = DEFAULT_OPS;
final Ontology so = subject.getOntology(); oo = new DefaultOps() { public Ontology getOntology() { return so; } };
public static boolean isa( Term subject, Term object ) throws OntologyException { String _prefix = "isa(" + subject + "," + object + ") "; System.err.println(_prefix + "Starting"); if(subject == object) { System.err.println(_prefix + "Ending true"); return true; } OntologyOps o...
System.err.println(_prefix + "Computing transitive closure");
System.err.println(_prefix + "Computing transitive closure for ");
public static boolean isa( Term subject, Term object ) throws OntologyException { String _prefix = "isa(" + subject + "," + object + ") "; System.err.println(_prefix + "Starting"); if(subject == object) { System.err.println(_prefix + "Ending true"); return true; } OntologyOps o...
REMOTE_TERM, ANY, IS_A
subject, ANY, IS_A
public static boolean isa( Term subject, Term object ) throws OntologyException { String _prefix = "isa(" + subject + "," + object + ") "; System.err.println(_prefix + "Starting"); if(subject == object) { System.err.println(_prefix + "Ending true"); return true; } OntologyOps o...
System.err.println(_prefix + "Searching closure for " + subject);
System.err.println(_prefix + "Searching closure for " + subject + " " + remoteTriples);
public static boolean isa( Term subject, Term object ) throws OntologyException { String _prefix = "isa(" + subject + "," + object + ") "; System.err.println(_prefix + "Starting"); if(subject == object) { System.err.println(_prefix + "Ending true"); return true; } OntologyOps o...
System.err.println(_prefix + "Evaluating " + triple);
public static boolean isa( Term subject, Term object ) throws OntologyException { String _prefix = "isa(" + subject + "," + object + ") "; System.err.println(_prefix + "Starting"); if(subject == object) { System.err.println(_prefix + "Ending true"); return true; } OntologyOps o...
Object ob = staxenv.featureTemplate.annotation.getProperty("qualifier");
Object ob = null; if (staxenv.featureTemplate.annotation.containsProperty("qualifier")) { ob = staxenv.featureTemplate.annotation.getProperty("qualifier"); }
public void addProperty(AGAVEProperty prop) { try{ Object ob = staxenv.featureTemplate.annotation.getProperty("qualifier"); if( ob != null ) ((List)ob).add( prop ) ; else { List props = new ArrayList(1) ; props.add( prop ) ; staxen...
transWeights.put(prev, fa);
transWeights.put(prev, dist);
public WMAsMM(WeightMatrix wm) throws IllegalSymbolException { try { changeSupport = new ChangeSupport(); distForwarder = new MarkovModel.DistributionForwarder(this, changeSupport); transFrom = new HashMap(); transTo = new HashMap(); transWeights = new HashMap(); this.wm = wm; th...
super(name.charAt(0), name, null);
super(name, name.charAt(0), null);
public SimpleModelInState(MarkovModel model, String name) { super(name.charAt(0), name, null); this.model = model; }
BasisSymbol bs = (BasisSymbol) symList.get(indx);
Symbol bs = (Symbol) symList.get(indx);
private static Set expandMatches(Alphabet parent, List symList, List built) { int indx = built.size(); if(indx < symList.size()) { BasisSymbol bs = (BasisSymbol) symList.get(indx); if(bs instanceof AtomicSymbol) { built.add(bs); return expandMatches(parent, symList, built); } else {...
Contract.pre(queryStrand != null, "queryStrand was null"); Contract.pre(subjectStrand != null, "subjectStrand was null");
public SequenceDBSearchSubHit(final double score, final double eValue, final double pValue, final int queryStart, final int queryEnd, final Strand queryStrand, final int subjectStart, final int subjectEnd, final ...
if( sRC.getDirection() == sRC.VERTICAL ) {
if( sRC.getDirection() == SequenceRenderContext.VERTICAL ) {
public void paint( Graphics2D g, SequenceRenderContext sRC ) { Paint selectedFill = Color.yellow; Paint textColor = Color.black; Paint notSelectedFill = g.getBackground(); Stroke beadStroke = new BasicStroke(); ...
return (o instanceof And) && (( ((And) o).getChild1().equals(this.getChild1()) && ((And) o).getChild2().equals(this.getChild2()) ) || ( ((And) o).getChild1().equals(this.getChild2()) && ((And) o).getChild2().equals(this.getChild1()) ));
if(o instanceof FeatureFilter) { return FilterUtils.areEqual(this, (FeatureFilter) o); } else { return false; }
public boolean equals(Object o) { return (o instanceof And) && (( ((And) o).getChild1().equals(this.getChild1()) && ((And) o).getChild2().equals(this.getChild2()) ) || ( ((And) o).getChild1().equals(this.getChild2()) && ((And) o).getChild2().equals(this.getChil...
return (o instanceof Or) && (( ((Or) o).getChild1().equals(this.getChild1()) && ((Or) o).getChild2().equals(this.getChild2()) ) || ( ((Or) o).getChild1().equals(this.getChild2()) && ((Or) o).getChild2().equals(this.getChild1()) ));
if(o instanceof FeatureFilter) { return FilterUtils.areEqual(this, (FeatureFilter) o); } else { return false; }
public boolean equals(Object o) { return (o instanceof Or) && (( ((Or) o).getChild1().equals(this.getChild1()) && ((Or) o).getChild2().equals(this.getChild2()) ) || ( ((Or) o).getChild1().equals(this.getChild2()) && ((Or) o).getChild2().equals(this.getChild1())...
processWord(word, pos - wordLength);
processWord(word, pos - wordLength + 1);
public void addSymbols(Alphabet alpha, Symbol[] syms, int start, int length) throws IllegalAlphabetException { if (alpha != packing.getAlphabet()) { throw new IllegalAlphabetException("Alphabet " + alpha.getName() + " doesn't match packing"); } int stepCounter = stepSize; for (int i = start; i < (...
if (sl1.length() != sl2.length()) { return false; } Iterator si1 = sl1.iterator(); Iterator si2 = sl2.iterator(); while (si1.hasNext()) { if (! (si1.next() == si2.next())) { return false; } }
if (sl1.length() != sl2.length()) { return false; }
private boolean compareSymbolList(SymbolList sl1, SymbolList sl2) { if (sl1.length() != sl2.length()) { return false; } Iterator si1 = sl1.iterator(); Iterator si2 = sl2.iterator(); while (si1.hasNext()) { if (! (si1.next() == si2.next())) { return false; } } return true; }
return true;
Iterator si1 = sl1.iterator(); Iterator si2 = sl2.iterator(); while (si1.hasNext()) { if (! (si1.next() == si2.next())) { return false; } } return true;
private boolean compareSymbolList(SymbolList sl1, SymbolList sl2) { if (sl1.length() != sl2.length()) { return false; } Iterator si1 = sl1.iterator(); Iterator si2 = sl2.iterator(); while (si1.hasNext()) { if (! (si1.next() == si2.next())) { return false; } } return true; }
ts1.edit(new Edit(ts1.length()+1, 0, sl2)); assertTrue(compareSymbolList(ts1, DNATools.createDNA("gatacaatggaatgga")));
public void testInsertAtEnd() throws Exception { SimpleSymbolList ts1 = new SimpleSymbolList(sl1); ts1.edit(new Edit(7,0,sl2)); assertTrue(compareSymbolList(ts1, DNATools.createDNA("gatacaatgga"))); }
private String getURIString() {
String getURIString() {
private String getURIString() { if (this.URI==null) return null; else return this.URI.toASCIIString(); }
private void setName(String name) { this.name = name; }
void setName(String name) { this.name = name; }
private void setName(String name) { this.name = name; }
private void setURIString(String URI) throws ChangeVetoException, URISyntaxException {
void setURIString(String URI) throws ChangeVetoException, URISyntaxException {
private void setURIString(String URI) throws ChangeVetoException, URISyntaxException { if (URI!=null) this.setURI(new URI(URI)); else this.URI=null; }
return true; } else if (line.startsWith("; al_display_start:")) { dataMap.put(name + "AlDispStart", parseCoord(line));
private boolean parseSequence(String line, String name, Map dataMap) { if (line.startsWith(";")) { // Check the sequence type given by the report if (line.equals("; sq_type: p")) { dataMap.put(name, "protein"); return true; } else if (line.equals("; sq_type: D")) { dataMap.put(name, "d...
if (src.getDirection() == src.HORIZONTAL) {
if (src.getDirection() == SequenceRenderContext.HORIZONTAL) {
protected Shape getLabelGlyph( SequenceRenderContext src, FontRenderContext frc ) { Shape s; if (src.getDirection() == src.HORIZONTAL) { if(labelGlyphH == null) { Font font = src.getFont(); labelGlyphH = font.createGlyphVector(frc, label).getOutline(); } s = label...
if (sp.getDirection() == sp.HORIZONTAL) {
if (sp.getDirection() == SequenceRenderContext.HORIZONTAL) {
private void renderLabel( Graphics2D g, Shape gv, Rectangle2D labelBox, SequenceRenderContext sp, SequenceRenderContext.Border border ) { Rectangle2D bounds = gv.getBounds2D(); double along = 0.0; double across = 0.0; if (sp.getDirection() == sp.HORIZONTAL) { across = labe...
if (balign == border.LEADING)
if (balign == SequenceRenderContext.Border.LEADING)
private void renderLabel( Graphics2D g, Shape gv, Rectangle2D labelBox, SequenceRenderContext sp, SequenceRenderContext.Border border ) { Rectangle2D bounds = gv.getBounds2D(); double along = 0.0; double across = 0.0; if (sp.getDirection() == sp.HORIZONTAL) { across = labe...
else if (balign == border.TRAILING)
else if (balign == SequenceRenderContext.Border.TRAILING)
private void renderLabel( Graphics2D g, Shape gv, Rectangle2D labelBox, SequenceRenderContext sp, SequenceRenderContext.Border border ) { Rectangle2D bounds = gv.getBounds2D(); double along = 0.0; double across = 0.0; if (sp.getDirection() == sp.HORIZONTAL) { across = labe...
else if (balign == border.CENTER)
else if (balign == SequenceRenderContext.Border.CENTER)
private void renderLabel( Graphics2D g, Shape gv, Rectangle2D labelBox, SequenceRenderContext sp, SequenceRenderContext.Border border ) { Rectangle2D bounds = gv.getBounds2D(); double along = 0.0; double across = 0.0; if (sp.getDirection() == sp.HORIZONTAL) { across = labe...
} else { toStamp.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"); Layer headerLayer = new Layer(Layer.DIV); headerLayer.setStyleClass("caseHeader"); layer.add(hea...
this.readingFrame = template.readingFrame;
this.readingFrame = FramedFeature.Template.readingFrame;
public SimpleFramedFeature(Sequence sourceSeq, FeatureHolder parent, FramedFeature.Template template) throws IllegalAlphabetException { super(sourceSeq,parent,template); this.readingFrame = template.readingFrame; if (sourceSeq.getAlphabet() == RNATools.getRNA() && template.strand == NEGATIVE) { throw...
ft.readingFrame = getReadingFrame();
FramedFeature.Template.readingFrame = getReadingFrame();
protected void fillTemplate(FramedFeature.Template ft){ super.fillTemplate(ft); ft.readingFrame = getReadingFrame(); }
public void setCircularLength(int sourceSeqLength) throws ChangeVetoException {
public void setCircularLength(int circularLength) throws ChangeVetoException {
public void setCircularLength(int sourceSeqLength) throws ChangeVetoException { if(!this.hasListeners(RichLocation.CIRCULAR)) { this.circularLength = circularLength; } else { ChangeEvent ce = new ChangeEvent( this, RichLocation.CIRCULAR, ...
if (ff instanceof IsLeaf) { return true; }
public boolean isDisjoint(FeatureFilter ff) { if (ff instanceof IsLeaf) { return true; } if (ff instanceof OnlyChildren) { return FilterUtils.areDisjoint( getFilter(), ((OnlyChildren) ff).getFilter() ...
if (ff instanceof IsLeaf) { return true; } else if (ff instanceof OnlyDescendants) {
if (ff instanceof OnlyDescendants) {
public boolean isDisjoint(FeatureFilter ff) { if (ff instanceof IsLeaf) { return true; } else if (ff instanceof OnlyDescendants) { return FilterUtils.areDisjoint( getFilter(), ((OnlyDescendants) ff).getFilter() ...
getOverlay().put(key, value);
getOverlay().put(key, newValue);
public void setProperty(Object key, Object value) throws ChangeVetoException { if(changeSupport == null) { getOverlay().put(key, value); } else { ChangeEvent ce = new ChangeEvent( this, Annotation.PROPERTY, new Object[] {key, value}, new Object[] {key, getProperty(key)} ...
new Object[] {key, value},
new Object[] {key, newValue},
public void setProperty(Object key, Object value) throws ChangeVetoException { if(changeSupport == null) { getOverlay().put(key, value); } else { ChangeEvent ce = new ChangeEvent( this, Annotation.PROPERTY, new Object[] {key, value}, new Object[] {key, getProperty(key)} ...
int motifNo = 0;
public Meme(InputStream is, SymbolTokenization symParser) throws IOException, IllegalSymbolException, IllegalAlphabetException { StreamTokenizer st = new StreamTokenizer( new BufferedReader(new InputStreamReader(is))); st.eolIsSignificant(true); st.wordChars('*', '*'); st.parseNumbers(); S...
motifNo = (int) st.nval;
public Meme(InputStream is, SymbolTokenization symParser) throws IOException, IllegalSymbolException, IllegalAlphabetException { StreamTokenizer st = new StreamTokenizer( new BufferedReader(new InputStreamReader(is))); st.eolIsSignificant(true); st.wordChars('*', '*'); st.parseNumbers(); S...
case 0: framed.readingFrame = FramedFeature.FRAME_0;
case 0: Template.readingFrame = FramedFeature.FRAME_0;
public Sequence annotate(Sequence seq) throws BioException, ChangeVetoException { Feature.Template plain = new Feature.Template(); StrandedFeature.Template stranded = new StrandedFeature.Template(); FramedFeature.Template framed = new FramedFeature.Template(); plain.annotation = Annota...
case 1: framed.readingFrame = FramedFeature.FRAME_1;
case 1: Template.readingFrame = FramedFeature.FRAME_1;
public Sequence annotate(Sequence seq) throws BioException, ChangeVetoException { Feature.Template plain = new Feature.Template(); StrandedFeature.Template stranded = new StrandedFeature.Template(); FramedFeature.Template framed = new FramedFeature.Template(); plain.annotation = Annota...
case 2: framed.readingFrame = FramedFeature.FRAME_2;
case 2: Template.readingFrame = FramedFeature.FRAME_2;
public Sequence annotate(Sequence seq) throws BioException, ChangeVetoException { Feature.Template plain = new Feature.Template(); StrandedFeature.Template stranded = new StrandedFeature.Template(); FramedFeature.Template framed = new FramedFeature.Template(); plain.annotation = Annota...
Distribution old = (Distribution) dists.get(sym); if( (old != null) && (weightForwarder != null) ) { old.removeChangeListener(weightForwarder); } if(weightForwarder != null) { dist.addChangeListener(weightForwarder); }
public void setDistribution(Symbol sym, Distribution dist) throws IllegalSymbolException, IllegalAlphabetException { firstA.validate(sym); if(dist.getAlphabet() != lastA) { throw new IllegalAlphabetException( "The distribution must be over " + lastA + ", not " + dist.getAlphabet() ); ...
this.seqID = seqID;
FeatureTableParser(SeqIOListener listener, String source) { this.listener = listener; this.featureSource = source; this.seqID = seqID; featureBuf = new StringBuffer(); locParser = new EmblLikeLocationParser(seqID); }
Iterator list = ProteinTools.getAlphabet().iterator();
private Symbol getSymbolForChar(char symbolToken) throws IllegalSymbolException{ Iterator list = ProteinTools.getAlphabet().iterator(); SymbolTokenization toke; try { toke = ProteinTools.getAlphabet().getTokenization("token"); } catch (BioException ex) { ...
Iterator list = ProteinTools.getAlphabet().iterator();
public void setSymbolModification(char symbolToken, double mass) throws IllegalSymbolException { Iterator list = ProteinTools.getAlphabet().iterator(); SymbolTokenization toke; try { toke = ProteinTools.getAlphabet().getTokenization("token"); } catch (BioException ex...
subdoub = DoubleAlphabet.getInstance().getSubAlphabet(20.0,99.0);
protected void setUp() throws java.lang.Exception { super.setUp(); integer = IntegerAlphabet.getInstance(); subint = IntegerAlphabet.getSubAlphabet(20,99); subdoub = DoubleAlphabet.getInstance().getSubAlphabet(20.0,99.0); doub = DoubleAlphabet.getInstance(); phred = PhredTo...
subdoub = DoubleAlphabet.getSubAlphabet(20.0,99.0);
protected void setUp() throws java.lang.Exception { super.setUp(); integer = IntegerAlphabet.getInstance(); subint = IntegerAlphabet.getSubAlphabet(20,99); subdoub = DoubleAlphabet.getInstance().getSubAlphabet(20.0,99.0); doub = DoubleAlphabet.getInstance(); phred = PhredTo...
assertTrue(doub.getInstance() == doub2.getInstance());
public void testDoubleSerialization()throws Exception{ DoubleAlphabet doub2 = (DoubleAlphabet)serialize(doub); assertTrue(doub == doub2); assertTrue(doub.getInstance() == doub2.getInstance()); assertTrue(doub.equals(doub2)); assertTrue(doub.getSymbol(12.0) == doub2.getSymbol(12.0)...
assertTrue(integer.getInstance() == integer2.getInstance());
public void testIntegerSerialization()throws Exception{ IntegerAlphabet integer2 = (IntegerAlphabet)serialize(integer); assertTrue(integer == integer2); assertTrue(integer.getInstance() == integer2.getInstance()); assertTrue(integer.equals(integer2)); assertTrue(integer.getSymbol(...
* tests all wonky as mixing static and non static stuff */
public void testIntegerSerialization()throws Exception{ IntegerAlphabet integer2 = (IntegerAlphabet)serialize(integer); assertTrue(integer == integer2); assertTrue(integer.getInstance() == integer2.getInstance()); assertTrue(integer.equals(integer2)); assertTrue(integer.getSymbol(...
if(!(bpi.state instanceof EmissionState)) {
if(bpi.state instanceof EmissionState) { dj--; } else {
public StatePath viterbi(SymbolList[] seqs, ScoreType scoreType) throws IllegalSymbolException, IllegalAlphabetException, IllegalTransitionException { if (seqs.length != 2) { throw new IllegalArgumentException("This DP object only runs on pairs."); } lockModel(); SymbolList seq0 = seqs[0]...
dj--;
public StatePath viterbi(SymbolList[] seqs, ScoreType scoreType) throws IllegalSymbolException, IllegalAlphabetException, IllegalTransitionException { if (seqs.length != 2) { throw new IllegalArgumentException("This DP object only runs on pairs."); } lockModel(); SymbolList seq0 = seqs[0]...
List alphas = alpha.getAlphabets(); this.gap = new Symbol[alphas.size()]; for(int i = 0; i < this.gap.length; i++) { this.gap[i] = ((Alphabet) alphas.get(i)).getGapSymbol(); }
public EmissionCache( Alphabet alpha, State[] states, int dsi, ScoreType scoreType ) { this.eMap = new HashMap(); this.gopher = new ListWrapper(); this.alpha = alpha; this.states = states; this.dsi = dsi; this.scoreType = scoreType; }
super(testName);ChangeEventRecorder cr;
super(testName);
public SimpleRankedCrossRefTest(String testName) { super(testName);ChangeEventRecorder cr; }
throw new BioError("Feature doesn't seem to have a Sequence ancestor.");
throw new BioError("Feature doesn't seem to have a Sequence ancestor: " + fh);
public Sequence getSequence() { FeatureHolder fh = this; while (fh instanceof Feature) { fh = ((Feature) fh).getParent(); } try { return (Sequence) fh; } catch (ClassCastException ex) { throw new BioError("Feature doesn't seem to have a Sequence ancestor."); } }
for (int i = 0; i < paramsList.size(); i++) types[i] = paramsList.get(i).getClass();
for (int i = 0; i < paramsList.size(); i++) { if (paramsList.get(i) instanceof Set) types[i] = Set.class; else if (paramsList.get(i) instanceof List) types[i] = List.class; else types[i] = paramsList.get(i).getClass(); }
public Object buildObject(Class clazz, List paramsList) { // put the class into the hashmap if not there already if (!objects.containsKey(clazz)) objects.put(clazz,new HashMap()); Map contents = (Map)objects.get(clazz); // return the constructed object from the hashmap if there already ...
else paramsstuff.append(paramsList.get(i).toString());
else paramsstuff.append(paramsList.get(i).getClass());
public Object buildObject(Class clazz, List paramsList) { // put the class into the hashmap if not there already if (!objects.containsKey(clazz)) objects.put(clazz,new HashMap()); Map contents = (Map)objects.get(clazz); // return the constructed object from the hashmap if there already ...
System.out.println(termMass);
private static double calcTermMass(String isotopicType, boolean MH_PLUS){ double termMass = 0.0; if(isotopicType.equals(SymbolPropertyTable.AVG_MASS)){ //Add the C-terminal OH and N-Term H termMass += Havg + Oavg + Havg; //Add the extra H if(MH_PLUS){ termMass += Havg; } } e...
symList = DNATools.complement(symList);
symList = DNATools.reverseComplement(symList);
public SymbolList getSymbols() { SymbolList symList = super.getSymbols(); if(getStrand() == NEGATIVE) { try { symList = DNATools.complement(symList); } catch (IllegalAlphabetException iae) { throw new BioError( iae, "Could not retrieve symbols for feature as " + "the alphabet can not be ...
*/
private static String getCreateDBStatement() { if(CREATE_DB_STATEMENT == null) { StringBuffer stmt = new StringBuffer(); BufferedReader stmtIn = new BufferedReader( new InputStreamReader( ClassTools.getClassLoader(SQLUnigeneFactory.class).getResourceAsStream( "/org/biojava/bio/...
double[] sCol; if (states[tr[ci]] instanceof EmissionState) { advance = ((EmissionState)states[tr[ci]]).getAdvance(); sCol = (double[]) matrix[advance[0]][advance[1]]; } else { sCol = (double[]) matrix[0][0]; }
private void forwardCalcStepMatrix() throws IllegalResidueException, IllegalAlphabetException, IllegalTransitionException { double[] curCol = (double[]) matrix[0][0]; int[] advance; for (int l = 0; l < states.length; ++l) { // System.out.println("State = " + states[l].getName()); if (states[l] instanceof...
transitions = getForwardTransitions(); transitionScores = getForwardTransitionScores();
public double runForward(ResidueList seq0, ResidueList seq1, PairDPCursor curs) throws IllegalResidueException, IllegalAlphabetException, IllegalTransitionException { states = getStates(); cursor = curs; alpha = (CrossProductAlphabet) getModel().emissionAlphabet(); // Forward initialization double[] col ...
public CrossProductResidue getResidue(List l) throws IllegalAlphabetException {
public CrossProductResidue getResidue(List l) throws IllegalResidueException {
public CrossProductResidue getResidue(List l) throws IllegalAlphabetException { CrossProductResidue r; synchronized(gopher) { gopher.l = l; r = (CrossProductResidue) ourResidues.get(gopher); } if (r == null) { throw new IllegalAlphabetException( "Unable to find CrossProduct residue f...
throw new IllegalAlphabetException(
throw new IllegalResidueException(
public CrossProductResidue getResidue(List l) throws IllegalAlphabetException { CrossProductResidue r; synchronized(gopher) { gopher.l = l; r = (CrossProductResidue) ourResidues.get(gopher); } if (r == null) { throw new IllegalAlphabetException( "Unable to find CrossProduct residue f...
if(theFeature.getAnnotation().containsProperty("JoinType"))
Annotation ann = theFeature.getAnnotation(); if (ann.containsProperty(Feature.PROPERTY_DATA_KEY))
public String formatLocation(Feature theFeature) { String formattedLocation = null; StrandedFeature.Strand featureStrand = StrandedFeature.POSITIVE; String joinType = "join"; if(theFeature.getAnnotation().containsProperty("JoinType")) { joinType = (String)theFeature....
joinType = (String)theFeature.getAnnotation().getProperty("JoinType");
Map dat = (Map) ann.getProperty(Feature.PROPERTY_DATA_KEY); if (dat.containsKey("JoinType")) { joinType = (String) dat.get("JoinType"); }
public String formatLocation(Feature theFeature) { String formattedLocation = null; StrandedFeature.Strand featureStrand = StrandedFeature.POSITIVE; String joinType = "join"; if(theFeature.getAnnotation().containsProperty("JoinType")) { joinType = (String)theFeature....
public Iterator blockIterator() { return Collections.unmodifiableCollection(this.members).iterator(); }
public Iterator blockIterator() { return Collections.unmodifiableCollection(this.sortedMembers).iterator(); }
public Iterator blockIterator() { return Collections.unmodifiableCollection(this.members).iterator(); }
public void addFeatureProperty(Object key, Object value)
public void addFeatureProperty(final Object key, final Object value)
public void addFeatureProperty(Object key, Object value) throws ParseException { // There are 19 spaces in the leader String leader = "FT "; // Default is to quote unknown qualifiers String form = "quoted"; StringBuffer tb = new StringBuffer("/" + key); if (qualifierData.containsKey...
StringBuffer tb = new StringBuffer("/" + key);
public void addFeatureProperty(Object key, Object value) throws ParseException { // There are 19 spaces in the leader String leader = "FT "; // Default is to quote unknown qualifiers String form = "quoted"; StringBuffer tb = new StringBuffer("/" + key); if (qualifierData.containsKey...
if (form.equals("quoted")) tb.append("=\"" + value + "\""); else if (form.equals("bare")) tb.append("=" + value); else if (form.equals("paren")) tb.append("(" + value + ")"); else if (! form.equals("empty")) throw new ParseException("Unrecognised qualifier format: " + form); stream.println(SeqFormatTools.formatQualifi...
if (Collection.class.isInstance(value)) { for (Iterator vi = ((Collection) value).iterator(); vi.hasNext();) { String qualifer = makeStringsByForm(key, vi.next(), form); stream.println(SeqFormatTools.formatQualifierBlock(qualifer, leader, 80)); } } else { String qualifer = makeStringsByForm(key, value, form); stream.pr...
public void addFeatureProperty(Object key, Object value) throws ParseException { // There are 19 spaces in the leader String leader = "FT "; // Default is to quote unknown qualifiers String form = "quoted"; StringBuffer tb = new StringBuffer("/" + key); if (qualifierData.containsKey...
public void addSequenceProperty(Object key, Object value)
public void addSequenceProperty(final Object key, final Object value)
public void addSequenceProperty(Object key, Object value) throws ParseException { // stream.println("Key: " + key + " Value: " + value); if (key.equals(EmblProcessor.PROPERTY_EMBL_ACCESSIONS)) { StringBuffer sb = new StringBuffer("AC "); for (Iterator ai = ((List) value).iterator(); ai.hasNext()...
public void addSymbols(Alphabet alpha, Symbol[] syms, int start, int length)
public void addSymbols(final Alphabet alpha, final Symbol[] syms, final int start, final int length)
public void addSymbols(Alphabet alpha, Symbol[] syms, int start, int length) throws IllegalAlphabetException { int aCount = 0; int cCount = 0; int gCount = 0; int tCount = 0; int oCount = 0; for (int i = 0; i < syms.length; i++) { char c = syms[i].getToken(); switch (c) { ca...
public void setName(String id) throws ParseException { }
public void setName(final String id) throws ParseException { }
public void setName(String id) throws ParseException { // stream.println("ID " + id); }
public void setPrintStream(PrintStream stream)
public void setPrintStream(final PrintStream stream)
public void setPrintStream(PrintStream stream) { this.stream = stream; }
public void setURI(String uri) throws ParseException { }
public void setURI(final String uri) throws ParseException { }
public void setURI(String uri) throws ParseException { // stream.println("URI " + uri); }
public void startFeature(Feature.Template templ)
public void startFeature(final Feature.Template templ)
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.getValue(); StringBuffer lb = SeqFormatTo...
if(!hasListeners()) {
if(!hasListeners(RichSequenceDB.SEQUENCES)) {
public void removeSequence(String id) throws IllegalIDException, BioException, ChangeVetoException { if (!sequenceByID.containsKey(id)) throw new IllegalIDException("Sequence with ID " + id + " could not be found"); if(!hasListeners()) { sequenceByID.remove(id); } else { C...
featureSpanName = s.trim();
protected void setStringValue(String s) { featureSpanName = s.trim(); }
s = new Rectangle2D.Double(min, 0, Math.min(1.0, max-min), 2.0*arrowScoop + arrowSize);
s = new Rectangle2D.Double(min, 0, Math.max(1.0, max-min), 2.0*arrowScoop + arrowSize);
public void renderFeature( Graphics2D g, Feature f, SequenceRenderContext src ) { Shape s = null; Location loc = f.getLocation(); float min = (float) src.sequenceToGraphics(loc.getMin()); float max = (float) src.sequenceToGraphics(loc.getMax()); float depth = (float) (arrowSize + 2.0 * arrow...
s = new Rectangle2D.Double(0, min, 2.0*arrowScoop + arrowSize, Math.min(1.0, max-min));
s = new Rectangle2D.Double(0, min, 2.0*arrowScoop + arrowSize, Math.max(1.0, max-min));
public void renderFeature( Graphics2D g, Feature f, SequenceRenderContext src ) { Shape s = null; Location loc = f.getLocation(); float min = (float) src.sequenceToGraphics(loc.getMin()); float max = (float) src.sequenceToGraphics(loc.getMax()); float depth = (float) (arrowSize + 2.0 * arrow...
output.println("--pdb "+ pdb_code);
output.println("--pdb "+ pdb_code.toLowerCase());
private BufferedReader getBufferedReader() throws IOException { // getz -view PDBdata '[pdb:5pti] Socket client = null; DataInputStream input = null; PrintStream output = null; String machine = "" ; int port = 0 ; String message = "please set System properties PFETCH...
buf.mark(100); String line = buf.readLine(); buf.reset(); if ( line.equals("no match")) { System.out.println("first line: " + line ); throw new IOException("no pdb with code "+pdb_code.toLowerCase() +" found"); }
private BufferedReader getBufferedReader() throws IOException { // getz -view PDBdata '[pdb:5pti] Socket client = null; DataInputStream input = null; PrintStream output = null; String machine = "" ; int port = 0 ; String message = "please set System properties PFETCH...
public Structure getStructure()
public synchronized Structure getStructure()
public Structure getStructure() throws IOException { BufferedReader buf ; //inStream = getInputStream(); buf = getBufferedReader() ; /*String line = buf.readLine (); while (line != null) { System.out.println (line); line = buf.readLine (); } return null ; */ try{ System.out.println("Starting ...
System.out.println("Starting to parse PDB file " + getTimeStamp()); parsePDBFile(buf) ; System.out.println("Done parsing PDB file " + getTimeStamp());
s = parsePDBFile(buf) ;
public Structure getStructure() throws IOException { BufferedReader buf ; //inStream = getInputStream(); buf = getBufferedReader() ; /*String line = buf.readLine (); while (line != null) { System.out.println (line); line = buf.readLine (); } return null ; */ try{ System.out.println("Starting ...
return structure ;
notifyAll(); return s ;
public Structure getStructure() throws IOException { BufferedReader buf ; //inStream = getInputStream(); buf = getBufferedReader() ; /*String line = buf.readLine (); while (line != null) { System.out.println (line); line = buf.readLine (); } return null ; */ try{ System.out.println("Starting ...
if(l[i] != ' ')
try
private boolean hasHeaderTag(String line) { boolean isHeaderTag = false; char[] l = line.toCharArray(); for (int i = 0; i < TAG_LENGTH; i++) { if(l[i] != ' ') { isHeaderTag = true; break; } } return isHeaderTag; }
isHeaderTag = true; break; }
if(l[i] != ' ') { isHeaderTag = true; break; } } catch(ArrayIndexOutOfBoundsException e) { isHeaderTag = false; }
private boolean hasHeaderTag(String line) { boolean isHeaderTag = false; char[] l = line.toCharArray(); for (int i = 0; i < TAG_LENGTH; i++) { if(l[i] != ' ') { isHeaderTag = true; break; } } return isHeaderTag; }
if(locusTokens.countTokens() != 8)
if((locusTokens.countTokens() == 8) || (locusTokens.countTokens() == 7)) { boolean includedStrandTag = (locusTokens.countTokens() == 8); locusTokens.nextToken(); saveSeqAnno2(GenbankFormat.LOCUS_TAG, locusTokens.nextToken()); saveSeqAnno2(GenbankFormat.SIZE_TAG, locusTokens.nextToken()); locusTokens.nextToken(...
private void parseLocusLinePost127(String theLine) throws ParseException { if (theLine.length() < 79) { throw new ParseException("LOCUS line too short [" + theLine + "]"); } StringTokenizer locusTokens = new StringTokenizer(theLine); if(locusTokens.countTokens() != 8) { throw new ParseException("LO...
locusTokens.nextToken(); saveSeqAnno2(GenbankFormat.LOCUS_TAG, locusTokens.nextToken()); saveSeqAnno2(GenbankFormat.SIZE_TAG, locusTokens.nextToken()); locusTokens.nextToken(); String strandString = locusTokens.nextToken(); StringTokenizer strandTokens = new StringTokenizer(strandString, "-"); if(strandTokens.cou...
private void parseLocusLinePost127(String theLine) throws ParseException { if (theLine.length() < 79) { throw new ParseException("LOCUS line too short [" + theLine + "]"); } StringTokenizer locusTokens = new StringTokenizer(theLine); if(locusTokens.countTokens() != 8) { throw new ParseException("LO...
System.out.print("Forward... ");
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...
System.out.println("Score = " + fs);
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...
System.out.print("Backward... ");
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...
System.out.println("Score = " + bs);
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...
s.add(a.keys());
s.addAll(a.keys());
public Set keys() { Set s = new HashSet(); for (Iterator i = mergeSet.iterator(); i.hasNext();) { Annotation a = (Annotation) i.next(); s.add(a.keys()); } return s; }
dateString.replace('T', ' ');
dateString = dateString.replace('T', ' ');
public Collection getPaymentItems(String communeNumber, String personalId, String endpoint) { Collection c = new Vector(); /*PaymentItem p1 = new PaymentItem(); p1.setName("Test type"); p1.setAmount(100.0d); p1.setEntryTypeId(1); p1.setLastDate(new IWTimestamp()); c.add(p1); return c;*/ if (endpoint =...
dateString.replace('T', ' ');
dateString = dateString.replace('T', ' ');
public Collection getStatementItems(String communeNumber, String personalId, PaymentItem pType, IWTimestamp fromStamp, IWTimestamp toStamp, String endpoint) { Collection c = new Vector();/* StatementItem s1 = new StatementItem(); s1.setName("Statement type 1"); s1.setAmount(50.0d); s1.setLastDate(new IWTimest...
if (key.equals(Feature.PROPERTY_DATA_KEY)) return;
public void addFeatureProperty(final Object key, final Object value) throws ParseException { // There are 19 spaces in the leader String leader = "FT "; // Default is to quote unknown qualifiers String form = "quoted"; if (qualifierData.containsKe...
super(name, name.charAt(0), null);
super(name, null);
public SimpleModelInState(MarkovModel model, String name) { super(name, name.charAt(0), null); this.model = model; }
isa = onto.importTerm(relations, master_isa); partof = onto.importTerm(relations, master_partof);
isa = onto.importTerm(master_isa); partof = onto.importTerm(master_partof);
protected void setUp() throws Exception { Ontology relations = new Ontology.Impl("relations", "Some standard relations"); Term master_isa = relations.createTerm("is-a", ""); Term master_partof = relations.createTerm("part-of", ""); onto = new Ontology.Impl("test", "Test ontology"...
dummy = new Term.Impl("dummy", "Silly dummy term");
dummy = new Ontology.Impl("", "").createTerm("dummy", "Silly dummy term");
protected void setUp() throws Exception { Ontology relations = new Ontology.Impl("relations", "Some standard relations"); Term master_isa = relations.createTerm("is-a", ""); Term master_partof = relations.createTerm("part-of", ""); onto = new Ontology.Impl("test", "Test ontology"...
out.close();
public void commit() throws BioException { try { PrintWriter out = new PrintWriter( new FileWriter( indexFile.toString(), true ) ); for(Iterator i = uncommited.values().iterator(); i.hasNext(); ) { Index indx = (Index) i.next(); out.println( getF...