rem
stringlengths
0
477k
add
stringlengths
0
313k
context
stringlengths
6
599k
this.assertEquals(expected, actual);
assertEquals(expected, actual);
public void testCircularBoundedPointRangedPointRangedLocationGenbank() { String expected = "<94..(200.250)"; sb.delete(0, sb.length()); String actual = fileFormer.formatLocation(sb, mCircularBoundedPointRangedPointRangedLocation, PLUS).toString(); this.assertEquals(expected, actual); ...
this.assertEquals(expected, actual);
assertEquals(expected, actual);
public void testCircularBoundedRangedLocationGenbank() { String expected = "<345..500"; sb.delete(0, sb.length()); String actual = fileFormer.formatLocation(sb, mCircularBoundedRangedLocation, PLUS).toString(); this.assertEquals(expected, actual); }
this.assertEquals(expected, actual);
assertEquals(expected, actual);
public void testCircularRangedPointRangedPointRangedLocationGenbank() { String expected = "(122.133)..(204.221)"; sb.delete(0, sb.length()); String actual = fileFormer.formatLocation(sb, mCircularRangedPointRangedPointRangedLocation, PLUS).toString(); this.assertEquals(expected, actua...
this.assertEquals(expected, actual);
assertEquals(expected, actual);
public void testCircularRangedPointSimplePointRangedLocationGenbank() { String expected = "(23.45)..600"; sb.delete(0, sb.length()); String actual = fileFormer.formatLocation(sb, mCircularRangedPointSimplePointRangedLocation, PLUS).toString(); this.assertEquals(expected, actual); }
this.assertEquals(expected, actual);
assertEquals(expected, actual);
public void testCircularSimpleRangedLocationGenbank() { String expected = "340..565"; sb.delete(0, sb.length()); String actual = fileFormer.formatLocation(sb, mCircularSimpleRangedLocation, PLUS).toString(); this.assertEquals(expected, actual); }
this.assertEquals(expected, actual);
assertEquals(expected, actual);
public void testComplementBoundedPointLocationGenbank() { String expected = "complement(>12)"; sb.delete(0, sb.length()); String actual = fileFormer.formatLocation(sb, mBoundedPointLocation, MINUS).toString(); this.assertEquals(expected, actual); }
this.assertEquals(expected, actual);
assertEquals(expected, actual);
public void testComplementBoundedPointRangedPointRangedLocationGenbank() { String expected = "complement(<94..(200.250))"; sb.delete(0, sb.length()); String actual = fileFormer.formatLocation(sb, mBoundedPointRangedPointRangedLocation, MINUS).toString(); this.assertEquals(expected, ac...
this.assertEquals(expected, actual);
assertEquals(expected, actual);
public void testComplementBoundedRangedLocationGenbank() { String expected = "complement(<345..500)"; sb.delete(0, sb.length()); String actual = fileFormer.formatLocation(sb, mBoundedRangedLocation, MINUS).toString(); this.assertEquals(expected, actual); }
this.assertEquals(expected, actual);
assertEquals(expected, actual);
public void testComplementCircularBoundedPointRangedPointRangedLocationGenbank() { String expected = "complement(<94..(200.250))"; sb.delete(0, sb.length()); String actual = fileFormer.formatLocation(sb, mCircularBoundedPointRangedPointRangedLocation, MINUS).toString(); this.assertEqu...
this.assertEquals(expected, actual);
assertEquals(expected, actual);
public void testComplementCircularBoundedRangedLocationGenbank() { String expected = "complement(<345..500)"; sb.delete(0, sb.length()); String actual = fileFormer.formatLocation(sb, mCircularBoundedRangedLocation, MINUS).toString(); this.assertEquals(expected, actual); }
this.assertEquals(expected, actual);
assertEquals(expected, actual);
public void testComplementCircularRangedPointRangedPointRangedLocationGenbank() { String expected = "complement((122.133)..(204.221))"; sb.delete(0, sb.length()); String actual = fileFormer.formatLocation(sb, mCircularRangedPointRangedPointRangedLocation, MINUS).toString(); this.asser...
this.assertEquals(expected, actual);
assertEquals(expected, actual);
public void testComplementCircularRangedPointSimplePointRangedLocationGenbank() { String expected = "complement((23.45)..600)"; sb.delete(0, sb.length()); String actual = fileFormer.formatLocation(sb, mCircularRangedPointSimplePointRangedLocation, MINUS).toString(); this.assertEquals(...
this.assertEquals(expected, actual);
assertEquals(expected, actual);
public void testComplementCircularSimpleRangedLocationGenbank() { String expected = "complement(340..565)"; sb.delete(0, sb.length()); String actual = fileFormer.formatLocation(sb, mCircularSimpleRangedLocation, MINUS).toString(); this.assertEquals(expected, actual); }
this.assertEquals(expected, actual);
assertEquals(expected, actual);
public void testComplementRangedPointLocationGenbank() { String expected = "complement((102.110))"; sb.delete(0, sb.length()); String actual = fileFormer.formatLocation(sb, mRangedPointLocation, MINUS).toString(); this.assertEquals(expected, actual); }
this.assertEquals(expected, actual);
assertEquals(expected, actual);
public void testComplementRangedPointRangedPointRangedLocationGenbank() { String expected = "complement((122.133)..(204.221))"; sb.delete(0, sb.length()); String actual = fileFormer.formatLocation(sb, mRangedPointRangedPointRangedLocation, MINUS).toString(); this.assertEquals(expected...
this.assertEquals(expected, actual);
assertEquals(expected, actual);
public void testComplementRangedPointSimplePointRangedLocationGenbank() { String expected = "complement((23.45)..600)"; sb.delete(0, sb.length()); String actual = fileFormer.formatLocation(sb, mRangedPointSimplePointRangedLocation, MINUS).toString(); this.assertEquals(expected, actual...
this.assertEquals(expected, actual);
assertEquals(expected, actual);
public void testComplementSimplePointLocationGenbank() { String expected = "complement(467)"; sb.delete(0, sb.length()); String actual = fileFormer.formatLocation(sb, mSimplePointLocation, MINUS).toString(); this.assertEquals(expected, actual); }
this.assertEquals(expected, actual);
assertEquals(expected, actual);
public void testComplementSimpleRangedLocationGenbank() { String expected = "complement(340..565)"; sb.delete(0, sb.length() ); String actual = fileFormer.formatLocation(sb, mSimpleRangedLocation, MINUS).toString(); this.assertEquals(expected, actual); }
this.assertEquals(expected, actual);
assertEquals(expected, actual);
public void testRangedPointLocationGenbank() { String expected = "(102.110)"; sb.delete(0, sb.length()); String actual = fileFormer.formatLocation(sb, mRangedPointLocation, PLUS).toString(); this.assertEquals(expected, actual); }
this.assertEquals(expected, actual);
assertEquals(expected, actual);
public void testRangedPointRangedPointRangedLocationGenbank() { String expected = "(122.133)..(204.221)"; sb.delete(0, sb.length()); String actual = fileFormer.formatLocation(sb, mRangedPointRangedPointRangedLocation, PLUS).toString(); this.assertEquals(expected, actual); }
this.assertEquals(expected, actual);
assertEquals(expected, actual);
public void testRangedPointSimplePointRangedLocationGenbank() { String expected = "(23.45)..600"; sb.delete(0, sb.length()); String actual = fileFormer.formatLocation(sb, mRangedPointSimplePointRangedLocation, PLUS).toString(); this.assertEquals(expected, actual); }
this.assertEquals(expected, actual);
assertEquals(expected, actual);
public void testSimplePointLocationGenbank() { String expected = "467"; sb.delete(0, sb.length()); String actual = fileFormer.formatLocation(sb, mSimplePointLocation, PLUS).toString(); this.assertEquals(expected, actual); }
this.assertEquals(expected, actual);
assertEquals(expected, actual);
public void testSimpleRangedLocationGenbank() { String expected = "340..565"; sb.delete(0, sb.length()); String actual = fileFormer.formatLocation(sb, mSimpleRangedLocation, PLUS).toString(); this.assertEquals(expected, actual); }
return u;
return RNATools.u();
public Symbol translate(Symbol s) throws IllegalSymbolException { if(s == DNATools.t()) { return u; } DNATools.getDNA().validate(s); return s; }
if(s == u) {
if(s == RNATools.u()) {
public Symbol untranslate(Symbol s) throws IllegalSymbolException { if(s == u) { return DNATools.t(); } rna.validate(s); return s; }
rna.validate(s);
RNATools.getRNA().validate(s);
public Symbol untranslate(Symbol s) throws IllegalSymbolException { if(s == u) { return DNATools.t(); } rna.validate(s); return s; }
assert(LocationTools.areEqual(r1, r1)); assert(LocationTools.areEqual(r1, new PointLocation(1)));
assertTrue(LocationTools.areEqual(r1, r1)); assertTrue(LocationTools.areEqual(r1, new PointLocation(1)));
public void testAreEqual() { assert(LocationTools.areEqual(r1, r1)); assert(LocationTools.areEqual(r1, new PointLocation(1))); }
assert(LocationTools.contains(r1, new PointLocation(1))); assert(! LocationTools.contains(r1, r2));
assertTrue(LocationTools.contains(r1, new PointLocation(1))); assertTrue(! LocationTools.contains(r1, r2));
public void testContains() { assert(LocationTools.contains(r1, new PointLocation(1))); assert(! LocationTools.contains(r1, r2)); assert(r1.contains(1)); assert(! r1.contains(2)); }
assert(r1.contains(1)); assert(! r1.contains(2));
assertTrue(r1.contains(1)); assertTrue(! r1.contains(2));
public void testContains() { assert(LocationTools.contains(r1, new PointLocation(1))); assert(! LocationTools.contains(r1, r2)); assert(r1.contains(1)); assert(! r1.contains(2)); }
assert(r1.isContiguous());
assertTrue(r1.isContiguous());
public void testIsContiguous() { assert(r1.isContiguous()); }
assert(LocationTools.overlaps(r1, r1)); assert(! LocationTools.overlaps(r1, r2));
assertTrue(LocationTools.overlaps(r1, r1)); assertTrue(! LocationTools.overlaps(r1, r2));
public void testOverlaps() { assert(LocationTools.overlaps(r1, r1)); assert(! LocationTools.overlaps(r1, r2)); }
assertTrue(before.compareTo(ref) < 1); assertTrue(ref.compareTo(before) > 1);
assertTrue(before.compareTo(ref) < 0); assertTrue(ref.compareTo(before) > 0);
public void testCompareTo() { System.out.println("testCompareTo"); DocRef before = new SimpleDocRef(authors, "A", title); assertTrue(before.compareTo(ref) < 1); assertTrue(ref.compareTo(before) > 1); before = new SimpleDocRef(Collections.singletonList( new S...
assertNull(ref.getTitle());
assertEquals(this.title ,ref.getTitle());
public void testGetTitle() { System.out.println("testGetTitle"); //should be null until set assertNull(ref.getTitle()); }
if (context.getDirection() == context.HORIZONTAL)
if (context.getDirection() == SequenceRenderContext.HORIZONTAL)
public void renderImageMap(Graphics2D g2, Feature f, SequenceRenderContext context) { Rectangle bounds = g2.getDeviceConfiguration().getBounds(); // Safe to cast as bounds come from raster int ma...
builder.startDB(); builder.startGroup(); inDB = inGroup = true;
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();...
Pattern orthoPattern = Pattern.compile("^\\s*(\\d+)\\s*\\|\\s*(\\d+)\\s*\\|([Bbc]{1})\\|(.*)\\|\\s*(\\d+)\\s*\\|(.*)\\|(.*)\\|\\s*(\\d+)\\s*\\|(.*)\\|(.*)");
Pattern orthoPattern = Pattern.compile("^(\\d+)\\s*\\|\\s*(\\d+)\\s*\\|([Bbc]{1})\\|(.*)\\|\\s*(\\d+)\\s*\\|(.*)\\|(.*)\\|\\s*(\\d+)\\s*\\|(.*)\\|(.*)");
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();...
if (inGroup) builder.endGroup(); builder.startGroup();
if (!inDB) { builder.startDB(); inDB = true; } if (inGroup) { builder.endGroup(); } builder.startGroup(); inGroup = true;
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();...
if (!inDB) { builder.startDB(); inDB = true; } if (!inGroup) { builder.startGroup(); inGroup = true; }
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();...
nfe.printStackTrace();
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();...
System.err.println("Removed old feature: " + feature);
public void testEditFeatures() throws Exception { String name = "dna_1"; Sequence seq = DNATools.createDNASequence("atgctgatgatgatg", name); assertTrue(!mSequenceDB.ids().contains(name)); mSequenceDB.addSequence(seq); assertTrue(mSequenceDB.ids().contains(name)); seq = mSeq...
ops = Collections.EMPTY_SET;
if(nodes.contains(arc.from) && nodes.contains(arc.to)) { ops = Collections.EMPTY_SET; } else { throw new NullPointerException("Can't find data for arc: " + arc); }
public Set getOperations(Arc arc) { Set ops = (Set) operationsToLabel.get(arc); if(ops == null) { ops = Collections.EMPTY_SET; } return ops; }
String altLoc = line.substring (16, 17);
private void pdb_ATOM_Handler(String line) throws PDBParseException { //System.out.println(line); String recordName = line.substring (0, 6).trim (); // create new atom AtomImpl atom = new AtomImpl() ; int pdbnumber = Integer.parseInt (line.substring (6, 11)...
this.translation = temp.location.getMin() - temp.componentLocation.getMin(); this.projectedFeatures = new ProjectedFeatureHolder(componentSequence, this, translation);
if (temp.strand == StrandedFeature.NEGATIVE) { this.translation = temp.location.getMax() - temp.componentLocation.getMin() + 1; this.projectedFeatures = new ProjectedFeatureHolder(componentSequence, this, translation, true); } else if (temp.strand == StrandedFeature.POSITIVE) { this.translation = temp.location.getMin()...
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."); } t...
private String getAlphabetName() { return (this.symList==SymbolList.EMPTY_LIST?null:this.getAlphabetName()); }
private String getAlphabetName() { return (this.symList==SymbolList.EMPTY_LIST?null:this.symList.getAlphabet().getName()); }
private String getAlphabetName() { return (this.symList==SymbolList.EMPTY_LIST?null:this.getAlphabetName()); }
SequenceFormat eFormat = new EmblFormat();
SequenceFormat eFormat = new EmblLikeFormat();
public static void main(String [] args) throws Exception { if(args.length != 3) { throw new Exception("Use: EmblToGffFasta emblFile fastaOut gffOut"); } try { // make the files early to get exceptions about stupid file names File emblFile = new File(args[0]); File fastaFile = new File...
SequenceFactory sFact = new SimpleSequenceFactory();
SequenceBuilderFactory sFact = new EmblProcessor.Factory(SimpleSequenceBuilder.FACTORY);
public static void main(String [] args) throws Exception { if(args.length != 3) { throw new Exception("Use: EmblToGffFasta emblFile fastaOut gffOut"); } try { // make the files early to get exceptions about stupid file names File emblFile = new File(args[0]); File fastaFile = new File...
sym = new SimpleAtomicSymbol(token.charAt(0), token, null);
sym = AlphabetManager.createSymbol(token.charAt(0), token, null);
public SymbolParser getParser(String name) throws NoSuchElementException { if(name.equals("name")) { return new NameParser(nameToSymbol) { public Symbol parseToken(String token) throws IllegalSymbolException { Symbol sym = (Symbol) nameToSymbol.get(token); if(sym == null) { ...
s = new SimpleAtomicSymbol(c, token, null);
s = AlphabetManager.createSymbol(c, token, null);
public SymbolParser getParser(String name) throws NoSuchElementException { if(name.equals("name")) { return new NameParser(nameToSymbol) { public Symbol parseToken(String token) throws IllegalSymbolException { Symbol sym = (Symbol) nameToSymbol.get(token); if(sym == null) { ...
sym = new SimpleAtomicSymbol(token.charAt(0), token, null);
sym = AlphabetManager.createSymbol(token.charAt(0), token, null);
public Symbol parseToken(String token) throws IllegalSymbolException { Symbol sym = (Symbol) nameToSymbol.get(token); if(sym == null) { sym = new SimpleAtomicSymbol(token.charAt(0), token, null); try { addSymbol(sym); } catch (ChangeVetoException c...
s = new SimpleAtomicSymbol(c, token, null);
s = AlphabetManager.createSymbol(c, token, null);
public Symbol parseToken(String token) throws IllegalSymbolException { char c = token.charAt(0); Character ch = new Character(c); Symbol s = (Symbol) tokenToSymbol.get(ch); if(s == null) { s = new SimpleAtomicSymbol(c, token, null); try { ...
tokenSeed++, ""+tokenSeed, Annotation.EMPTY_ANNOTATION, s, this
tokenSeed++, Annotation.EMPTY_ANNOTATION, s, this
private AtomicSymbol putSymbol(List s) { AtomicSymbol ss; if(parent != null) { try { ss = (AtomicSymbol) parent.getSymbol(s); } catch (IllegalSymbolException ise) { throw new BioError(ise, "Balls up - couldn't fetch symbol from parent"); } } else { try { ss = (AtomicS...
PaymentItem p1 = new PaymentItem();
/*PaymentItem p1 = new PaymentItem();
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 == ...
return c;
return c;*/
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 == ...
/*
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 == ...
return c;*/
return c;
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 == ...
StatementItem s1 = new StatementItem();
/* StatementItem s1 = new StatementItem();
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 IWTimestam...
return c;
return c;*/
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 IWTimestam...
/*if (endpoint == null) {
if (endpoint == null) {
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 IWTimestam...
return c;*/
return c;
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 IWTimestam...
if (this.taxon!=null) throw new ParseException("Current BioEntry already has a taxon");
if (this.taxon!=null){ if(! this.taxon.equals(taxon)){ throw new ParseException("Current BioEntry already has a taxon"); } return; }
public void setTaxon(NCBITaxon taxon) throws ParseException { if (taxon==null) throw new ParseException("Taxon cannot be null"); if (this.taxon!=null) throw new ParseException("Current BioEntry already has a taxon"); this.taxon = taxon; }
invalid=invalid==null?null:invalid;
public void testGetEnzyme() { RestrictionEnzyme ecoRI = RestrictionEnzymeManager.getEnzyme("EcoRI"); assertEquals("EcoRI", ecoRI.getName()); try { RestrictionEnzyme invalid = RestrictionEnzymeManager.getEnzyme("xxxx"); } catch (IllegalArgumentException iae) ...
invalid=invalid==null?null:invalid;
public void testGetIsoschizomers() { Set isoAvaI = RestrictionEnzymeManager.getIsoschizomers("AvaI"); assertEquals(1, isoAvaI.size()); Set isoAvrI = RestrictionEnzymeManager.getIsoschizomers("AvrI"); assertEquals(1, isoAvrI.size()); RestrictionEnzyme avaI = RestrictionEnzymeMan...
String rebaseDataFileName = "/org/biojava/bio/molbio/rebase.dat";
String rebaseDataFileName = "org/biojava/bio/molbio/rebase.dat";
public void testloadEnzymeFile() { String rebaseDataFileName = "/org/biojava/bio/molbio/rebase.dat"; InputStream is = getClass().getClassLoader().getResourceAsStream(rebaseDataFileName); RestrictionEnzymeManager.loadEnzymeFile(is,true); Set re = RestrictionEnzymeManager.getAllEnzymes(); ...
if(properties.containsKey(key))
if(this.getProperties().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(properties.containsKey(key)) { oldValue = this.getProperty(key); // If the old value is alr...
String returnFormat = seqURL.getReturnFormat();
protected URL getAddress(String id) throws MalformedURLException { String defaultReturnFormat = "text"; FetchURL seqURL = new FetchURL(DBName, defaultReturnFormat); String baseurl = seqURL.getbaseURL(); String db = seqURL.getDB(); String returnFormat = seqURL.getReturnFormat(); String url = baseurl ...
SequenceFormat sFormat = getSequenceFormat(); SequenceBuilder sbuilder = new SimpleSequenceBuilder(); SequenceBuilderFactory sFact = new GenbankProcessor.Factory( SimpleSequenceBuilder.FACTORY); Alphabet alpha = getAlphabet(); SymbolTokenization rParser = alpha.getTokenization("token");
public Sequence getSequence(String id) throws BioException { try { IOExceptionFound = false; ExceptionFound = false; URL queryURL = getAddress(id); //achieve URL based on ID // System.err.println("query is "+ queryURL.toString()); SequenceFormat sFormat = getSequenceFormat(); //get incom...
} else if (CostMatrix[i][j] == CostMatrix[i-1][j-1] - matchReplace(query, subject, i, j)) {
} else if ((CostMatrix[i][j] == CostMatrix[i-1][j-1] - matchReplace(query, subject, i, j)) && !(gap_extend[0] || gap_extend[1])) {
public double pairwiseAlignment(Sequence query, Sequence subject) throws BioRuntimeException { if (query.getAlphabet().equals(subject.getAlphabet()) && query.getAlphabet().equals(subMatrix.getAlphabet())) { long time = System.currentTimeMillis(); int i, j; this.CostMatrix = new double[query.l...
} else if (CostMatrix[i][j] == E[i][j]) {
} else if (CostMatrix[i][j] == E[i][j] || gap_extend[0]) { gap_extend[0] = (E[i][j] != CostMatrix[i][j-1] + insert + gapExt);
public double pairwiseAlignment(Sequence query, Sequence subject) throws BioRuntimeException { if (query.getAlphabet().equals(subject.getAlphabet()) && query.getAlphabet().equals(subMatrix.getAlphabet())) { long time = System.currentTimeMillis(); int i, j; this.CostMatrix = new double[query.l...
gap_extend[1] = (F[i][j] != CostMatrix[i-1][j] + delete + gapExt);
public double pairwiseAlignment(Sequence query, Sequence subject) throws BioRuntimeException { if (query.getAlphabet().equals(subject.getAlphabet()) && query.getAlphabet().equals(subMatrix.getAlphabet())) { long time = System.currentTimeMillis(); int i, j; this.CostMatrix = new double[query.l...
if(max > min) throw new IllegalArgumentException("min must be less than max: "+min+" : "+max);
if(max < min) throw new IllegalArgumentException("min must be less than max: "+min+" : "+max);
SubIntegerAlphabet(int min, int max) throws IllegalArgumentException{ if(max > min) throw new IllegalArgumentException("min must be less than max: "+min+" : "+max); this.min = min; this.max = max; for(int i = min; i <= max; i++){ try{ this.addSymbol(new IntegerSymbol(i)); ...
if(AlphabetManager.alphabetForName(name) == null){ FiniteAlphabet a = new SubIntegerAlphabet(min, max); AlphabetManager.registerAlphabet(a.getName(),a); }
FiniteAlphabet a = new SubIntegerAlphabet(min, max); AlphabetManager.registerAlphabet(a.getName(),a);
public static FiniteAlphabet getSubAlphabet(int min, int max)throws IllegalArgumentException{ String name = "SubIntegerAlphabet["+min+".."+max+"]"; if(AlphabetManager.alphabetForName(name) == null){ FiniteAlphabet a = new SubIntegerAlphabet(min, max); AlphabetManager.registerAlphabet(a.getName(),a); ...
public SequenceDBSearchHit(String sequenceID, double score, double eValue, double pValue, List subHits, Annotation annotation)
public SequenceDBSearchHit(final String sequenceID, final double score, final double eValue, final double pValue, final List subHits, final Annotation annotation)
public SequenceDBSearchHit(String sequenceID, double score, double eValue, double pValue, List subHits, Annotation annotation) { Contract.pre(sequenceID != null, "sequenceID was null"); Contract.pre(! Double.isNaN(score), "score was NaN"); // pVa...
public boolean equals(Object other)
public boolean equals(final Object other)
public boolean equals(Object other) { if (other == this) return true; if (other == null) return false; // Eliminate other if its class is not the same if (! other.getClass().equals(this.getClass())) return false; // Downcast and compare fields SequenceDBSearchHit that = (SequenceDBSearchHit) other; if (! Obj...
idLine = id;
public void setName(String id) throws ParseException { idLine = id; }
setIntValue(Integer.parseInt(data.toString()));
setIntValue(Integer.parseInt((data.toString()).trim()));
public void endElement( String nsURI, String localName, String qName, StAXContentHandler handler ) throws SAXException { level--; if (level == 0) { try { setIntValue(Integer.parseInt(data.toString())); } catch (NumberFormatException nfe) { throw new SAXException(nfe); }...
min = Integer.parseInt(numString.toString());
if (numString.length() > 0) min = Integer.parseInt(numString.toString()); else min = 0;
private Range getIterations() throws AutomatonException { int min = 0; int max = 0; // consume the left brace toke.getToken(); // there can either be one or two numbers boolean onSecondArg = false; StringBuffer numString = new StringBuffer(); while (...
toke.getToken();
Range parseIterations() throws AutomatonException { int tokenType = toke.nextTokenType(); switch (tokenType) { case Tokenizer.LEFT_BRACE: return getIterations(); case Tokenizer.PLUS: toke.getToken(); return new Range(1, Integ...
else toke.getToken();
NfaSubModel parseSubPattern(NfaBuilder delegate) throws AutomatonException { NfaSubModel returnSubModel; // consume the left bracket toke.getToken(); returnSubModel = parse(delegate); // consume the right bracket if (toke.nextTokenType() != Tokenizer.RIGHT_BRACKET...
returnSubModel.addTransition(pre, post, sym); returnSubModel.addEpsilonTransition(returnSubModel.getStart(), pre); returnSubModel.addEpsilonTransition(post, returnSubModel.getEnd());
if (sym instanceof AtomicSymbol) { returnSubModel.addTransition(pre, post, sym); returnSubModel.addEpsilonTransition(returnSubModel.getStart(), pre); returnSubModel.addEpsilonTransition(post, returnSubModel.getEnd()); } else { for (Iterator symI = ((FiniteAlphabet) sym.getMatches()).iterator(); symI.hasNext(); ) { Symb...
NfaSubModel parseSymbol(NfaBuilder delegate) throws AutomatonException { NfaSubModel returnSubModel = new NfaSubModel(delegate); Symbol sym; try { sym = symtoke.parseToken(Character.toString(toke.getToken())); } catch (IllegalSymbolException ise) { ...
private String getTaxonHiddenChar() {
String getTaxonHiddenChar() {
private String getTaxonHiddenChar() { return isTaxonHidden()?TAXONISHIDDEN:null; }
private void setNCBITaxID(int NCBITaxID) { this.NCBITaxID = NCBITaxID; }
void setNCBITaxID(int NCBITaxID) { this.NCBITaxID = NCBITaxID; }
private void setNCBITaxID(int NCBITaxID) { this.NCBITaxID = NCBITaxID; }
private void setNameSet(Set names) {
void setNameSet(Set names) {
private void setNameSet(Set names) { this.names = names; // original for Hibernate // convert set to map this.namesMap.clear(); for (Iterator i = names.iterator(); i.hasNext(); ) { SimpleNCBITaxonName n = (SimpleNCBITaxonName)i.next(); try { this.addN...
private void setTaxonHiddenChar(final String isHiddenChar) throws ChangeVetoException {
void setTaxonHiddenChar(final String isHiddenChar) throws ChangeVetoException {
private void setTaxonHiddenChar(final String isHiddenChar) throws ChangeVetoException { setTaxonHidden(isHiddenChar!=null || (isHiddenChar!=null && isHiddenChar.length() > 0));// any character will set }
this.fetchEncoding = fetchEncoding;
public DASSegmentHandler(SeqIOListener siol, String fetchEncoding) { this.siol = siol; this.fetchEncoding = fetchEncoding; }
long startFetch = (new Date()).getTime();
public void runFetch() throws BioException, ParseException { // get time long startFetch = (new Date()).getTime(); DAS.startedActivity(this); URL fURL = null; try { String fetchEncoding = "dasgff"; if (DASCapabilities.checkCapable(new URL(dataSource, "../"), DASCapabilities.CAPABIL...
while (!reachedEnd && parseStart < bytesRead) {
while (!reachedEnd && parseStart < bytesRead && cache[parseStart] != '>') {
private boolean readSequenceData(BufferedReader r, SymbolParser parser, SeqIOListener listener) throws IOException, IllegalSymbolException { char[] cache = new char[256]; boolean reachedEnd = false, seenEOF = false; StreamParser sparser = parser.parseStream(listener); while (!reachedEnd) ...
if (parseStart < bytesRead && cache[parseStart] == '>') { r.reset(); if (r.skip(parseStart) != parseStart) throw new IOException("Couldn't reset to start of next sequence"); reachedEnd = true; }
} if (parseStart < bytesRead && cache[parseStart] == '>') { r.reset(); if (r.skip(parseStart) != parseStart) throw new IOException("Couldn't reset to start of next sequence"); reachedEnd = true;
private boolean readSequenceData(BufferedReader r, SymbolParser parser, SeqIOListener listener) throws IOException, IllegalSymbolException { char[] cache = new char[256]; boolean reachedEnd = false, seenEOF = false; StreamParser sparser = parser.parseStream(listener); while (!reachedEnd) ...
public ProjectedFeatureHolder(FeatureHolder fh,
public ProjectedFeatureHolder(FeatureHolder fh, FeatureFilter filter,
public ProjectedFeatureHolder(FeatureHolder fh, FeatureHolder parent, int translation, boolean oppositeStrand) { this.wrapped = fh; this.parent = parent; this.translate = translation; this.oppositeStrand = oppositeStrand; underlyingFeaturesChange = new ChangeListener() { public void preChan...
this.filter = filter;
public ProjectedFeatureHolder(FeatureHolder fh, FeatureHolder parent, int translation, boolean oppositeStrand) { this.wrapped = fh; this.parent = parent; this.translate = translation; this.oppositeStrand = oppositeStrand; underlyingFeaturesChange = new ChangeListener() { public void preChan...
return wrapped.countFeatures();
return getProjectedFeatures().countFeatures();
public int countFeatures() { return wrapped.countFeatures(); }
for (Iterator i = wrapped.features(); i.hasNext(); ) {
for (Iterator i = toProject.features(); i.hasNext(); ) {
protected FeatureHolder getProjectedFeatures() { if (projectedFeatures == null) { SimpleFeatureHolder sfh = new SimpleFeatureHolder(); for (Iterator i = wrapped.features(); i.hasNext(); ) { Feature f = (Feature) i.next(); Feature wf = projectFeature(f); try { sfh.addFeature(wf); } catch (ChangeVeto...
System.err.println("*** Generating " + pclass.getName());
private static Class getProjectionClass(Class face) { Class projection = (Class) _projectionClasses.get(face); if (projection == null) { try { Class baseClass = ProjectedFeatureWrapper.class; if (StrandedFeature.class.isAssignableFrom(face)) baseClass = ProjectedStrandedFeatureWrapper.class; StringTok...
Annotation oba = annf.makeAnnotation(matrix) ;
Annotation oba = AnnotationFactory.makeAnnotation(matrix) ;
private void MATRIXhandler(Attributes atts) { HashMap matrix = new HashMap() ; //String intObjectId = atts.getValue("intObjectId"); matrix.put("intObjectId" ,intObjectId); for ( int x=1; x<=3; x++){ for ( int y=1; y<=3; y++){ String mat = "mat"+x+y...
Annotation s = annf.makeAnnotation(score);
Annotation s = AnnotationFactory.makeAnnotation(score);
private void SCOREhandler(Attributes atts) { System.out.println("SCOREhandler not implemented,yet..."); HashMap score = new HashMap() ; String metnam = atts.getValue("methodName"); String value = atts.getValue("value"); score.put("methodName",metnam); score...
Annotation oba = annf.makeAnnotation(vector) ;
Annotation oba = AnnotationFactory.makeAnnotation(vector) ;
private void VECTORhandler(Attributes atts) { //System.out.println("VECTORhandler"); //String intObjectId = atts.getValue("intObjectId"); String xs = atts.getValue("x"); String ys = atts.getValue("y"); String zs = atts.getValue("z"); AtomImpl atom = new AtomImp...
Annotation oba = annf.makeAnnotation(current_object) ;
Annotation oba = AnnotationFactory.makeAnnotation(current_object) ;
public void endElement (String uri, String name, String qName){ //System.out.println("endElement >" + qName + "< >" + name + "<") ; if (qName.equals("geo3D")) { intObjectId = null ; } if (qName.equals("alignObject")) { try { Annotation oba = ...
Annotation sega = annf.makeAnnotation(current_segment);
Annotation sega = AnnotationFactory.makeAnnotation(current_segment);
public void endElement (String uri, String name, String qName){ //System.out.println("endElement >" + qName + "< >" + name + "<") ; if (qName.equals("geo3D")) { intObjectId = null ; } if (qName.equals("alignObject")) { try { Annotation oba = ...
Annotation bloa = annf.makeAnnotation(current_block);
Annotation bloa = AnnotationFactory.makeAnnotation(current_block);
public void endElement (String uri, String name, String qName){ //System.out.println("endElement >" + qName + "< >" + name + "<") ; if (qName.equals("geo3D")) { intObjectId = null ; } if (qName.equals("alignObject")) { try { Annotation oba = ...
Annotation a = annf.makeAnnotation(detail);
Annotation a = AnnotationFactory.makeAnnotation(detail);
public void endElement (String uri, String name, String qName){ //System.out.println("endElement >" + qName + "< >" + name + "<") ; if (qName.equals("geo3D")) { intObjectId = null ; } if (qName.equals("alignObject")) { try { Annotation oba = ...
in.mark(120);
in.mark(MAX_LINELENGTH);
public Sequence readSequence(StreamReader.Context context, SymbolParser resParser, SequenceFactory sf) throws IllegalSymbolException, IOException { final BufferedReader in = context.getReader(); StringBuffer sb = new StringBuffer(); String l...