rem
stringlengths
0
477k
add
stringlengths
0
313k
context
stringlengths
6
599k
return wrapped.alphabet();
return this.getSource().alphabet();
public Alphabet alphabet() { return wrapped.alphabet(); }
return wrapped.getAdvance();
return this.getSource().getAdvance();
public int [] getAdvance() { return wrapped.getAdvance(); }
return wrapped.getName() + "-f";
return super.getName() + "-f";
public String getName() { return wrapped.getName() + "-f"; }
return wrapped;
return this.getSource();
public State getWrapped() { return wrapped; }
this.transFrom = new HashMap(); this.transTo = new HashMap(); this.transModelTrans = new HashMap();
public FlatModel(MarkovModel model) throws IllegalResidueException, IllegalAlphabetException { this.source = model; this.stateAlpha = new SimpleAlphabet(); this.transFrom = new HashMap(); this.transTo = new HashMap(); this.transModelTrans = new HashMap(); stateAlpha.setName("flat " + model.stat...
transFrom.put(s, new HashSet()); transTo.put(s, new HashSet());
super.addState(s);
private void addAState(State s) { //System.out.println("Adding state: " + s.getName()); try { stateAlpha.addResidue(s); transFrom.put(s, new HashSet()); transTo.put(s, new HashSet()); } catch (Exception e) { throw new BioError(e, "Something got stuffed up while adding state " + s.getName(...
private void createTransition( State from, State to, MarkovModel within, State source, State dest ) { try { ModelTransition mt = getMT(from, to); if(mt == null) { transModelTrans.put( new Transition(from, to), new ModelTransition(within, source, dest) ); } Set f = (Set) transFrom.get(from); Set t = (Set) transTo.get(t...
public void createTransition(State from, State to) throws IllegalResidueException, UnsupportedOperationException { Alphabet a = stateAlphabet(); a.validate(from); a.validate(to); throw new UnsupportedOperationException("createTransition not supported by FlatModel");
private void createTransition( State from, State to, MarkovModel within, State source, State dest ) { //System.out.println("Adding: " + from.getName() + " -> " + to.getName()); try { ModelTransition mt = getMT(from, to); if(mt == null) { transModelTrans.put( new Transition(from,...
public IllegalResidueException(Residue res, String message) { super(message); this.res = res;
public IllegalResidueException(String message) { this(null, null, message);
public IllegalResidueException(Residue res, String message) { super(message); this.res = res; }
public IllegalTransitionException(State from, State to) { this(from, to, "");
public IllegalTransitionException(State from, State to, String message) { super(message + "[" + from.getName() + " -> " + to.getName() + "]"); this.from = from; this.to = to;
public IllegalTransitionException(State from, State to) { this(from, to, ""); }
public SeqException(Exception ex, String message) { super(ex, message);
public SeqException(String message) { super(message);
public SeqException(Exception ex, String message) { super(ex, message); }
public RagbagSequence(String name, String urn, SequenceBuilder builder)
public RagbagSequence(String name, String urn)
public RagbagSequence(String name, String urn, SequenceBuilder builder) { this.builder = builder; this.name = name; this.urn = urn; }
this.builder = builder; this.name = name; this.urn = urn;
builder = new SimpleSequenceBuilder(); this.name = name; this.urn = urn; System.out.println("RagbagSequence constructor: " + name + " " + urn);
public RagbagSequence(String name, String urn, SequenceBuilder builder) { this.builder = builder; this.name = name; this.urn = urn; }
setFeatureProperty("sequence.id", s);
ComponentFeatureHandler.this.setFeatureProperty("sequence.id", s);
protected StAXContentHandler getComponentIDHandler() { return new StringElementHandlerBase() { protected void setStringValue(String s) throws SAXException { try { setFeatureProperty("sequence.id", s); } catch (Exception ex) { throw new SAXException("Couldn't set property", ex); } } }...
setFeatureProperty("sequence.id", s);
ComponentFeatureHandler.this.setFeatureProperty("sequence.id", s);
protected void setStringValue(String s) throws SAXException { try { setFeatureProperty("sequence.id", s); } catch (Exception ex) { throw new SAXException("Couldn't set property", ex); } }
! (featC.isAssignableFrom(getClass())) && ! (getClass().isAssignableFrom(featC));
! (featC.isAssignableFrom(getTestClass())) && ! (getTestClass().isAssignableFrom(featC));
public boolean isDisjoint(FeatureFilter feat) { if(feat instanceof ByClass) { Class featC = ((ByClass) feat).getClass(); return ! (featC.isAssignableFrom(getClass())) && ! (getClass().isAssignableFrom(featC)); } return (feat instanceof AcceptNoneFilter); }
protected SimpleSymbol(char token, Annotation annotation)
protected SimpleSymbol(Annotation annotation)
protected SimpleSymbol(char token, Annotation annotation) { this.token = token; this.annotation = new SimpleAnnotation(annotation); }
this.token = token;
protected SimpleSymbol(char token, Annotation annotation) { this.token = token; this.annotation = new SimpleAnnotation(annotation); }
for(int j = wordLength+2; j <= seq.length(); j++) {
for(int j = wordLength + 1; j <= seq.length(); j++) {
public DataStore buildDataStore( File storeFile, SequenceDB seqDB, Packing packing, int wordLength, int threshold ) throws IllegalAlphabetException, IOException, BioException { ByteArrayOutputStream packingStream = new ByteArrayOutputStream(); ObjectOutputStream packingSerializer = new...
writeRecord(hashTable, hitTable, j - wordLength, seqNumber, word);
writeRecord(hashTable, hitTable, j - wordLength + 1, seqNumber, word);
public DataStore buildDataStore( File storeFile, SequenceDB seqDB, Packing packing, int wordLength, int threshold ) throws IllegalAlphabetException, IOException, BioException { ByteArrayOutputStream packingStream = new ByteArrayOutputStream(); ObjectOutputStream packingSerializer = new...
private static Set fillSet(String [] tokenArray, Set set)
private static Set fillSet(final String [] tokenArray, final Set set)
private static Set fillSet(String [] tokenArray, Set set) { for (int i = 0; i < tokenArray.length; i++) set.add(tokenArray[i]); return set; }
private Integer parseCoord(String line)
private Integer parseCoord(final String line)
private Integer parseCoord(String line) { int sepIndex = line.lastIndexOf(":"); String coord = line.substring(sepIndex + 1); return Integer.valueOf(coord.trim()); }
private String parseDB(String line)
private String parseDB(final String line)
private String parseDB(String line) throws ParserException { StringTokenizer st = new StringTokenizer(line); String db; String previous = null; String current = null; // The database filename is the second-to-last token on the line while (st.hasMoreTokens()) { if (current == null) current = st.nextToken();...
private String parseID(String line)
private String parseID(final String line)
private String parseID(String line) throws ParserException { StringTokenizer st = new StringTokenizer(line); String id; if (st.hasMoreTokens()) id = st.nextToken(); else throw new ParserException("Fasta parser failed to parse a sequence ID", null, lineNumber, line); // For Hit ...
private boolean parseLine(String line, Set tokenSet, Map dataMap)
private boolean parseLine(final String line, final Set tokenSet, final Map dataMap)
private boolean parseLine(String line, Set tokenSet, Map dataMap) throws ParserException { int idTokenStart = line.indexOf(";"); int idTokenEnd = line.indexOf(":"); String idToken = line.substring(idTokenStart + 1, idTokenEnd); idToken = idToken.trim(); String idValue = line.substring(idTokenEnd +...
public boolean parseSearch(BufferedReader reader, SearchContentHandler scHandler)
public boolean parseSearch(final BufferedReader reader, final SearchContentHandler scHandler)
public boolean parseSearch(BufferedReader reader, SearchContentHandler scHandler) throws IOException, BioException, ParserException { boolean foundQuerySeqID = false; lineNumber = 0; FastaSearchBuilder handler = (FastaSearchBuilder) scHandler; LINE: while ((line = reader.readLine()) != null) { ...
private boolean parseSequence(String line, String name, Map dataMap)
private boolean parseSequence(final String line, final String name, final Map dataMap)
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...
Feature f = new SimpleFeature(this, template);
Feature f = SimpleFeatureRealizer.DEFAULT.realizeFeature(this, template);
public AceSequence(AceObject seqObj) throws AceException, BioException { this.name = seqObj.getName(); this.fHolder = new SimpleMutableFeatureHolder(); try { // load in relevent ACeDB object & construct annotation wrapper annotation = new AceAnnotation(seqObj); // load in the corresp...
return "urn:
return "urn:sequence/acedb:" + getName();
public String getURN() { return "urn://sequence:acedb/" + getName(); }
public RichStreamReader(BufferedReader reader,
public RichStreamReader(InputStream is,
public RichStreamReader(BufferedReader reader, RichSequenceFormat format, SymbolTokenization symParser, RichSequenceBuilderFactory sf, Namespace ns) { this.reader = reader; this.format = format; this.symParser = symParser; this.sf = sf; ...
this.reader = reader; this.format = format; this.symParser = symParser; this.sf = sf; this.ns = ns;
this(new BufferedReader(new InputStreamReader(is)), format,symParser,sf,ns);
public RichStreamReader(BufferedReader reader, RichSequenceFormat format, SymbolTokenization symParser, RichSequenceBuilderFactory sf, Namespace ns) { this.reader = reader; this.format = format; this.symParser = symParser; this.sf = sf; ...
this.annotation = (annotation == null ? new SimpleAnnotation() : annotation);
this.annotation = annotation; this.sequenceDB.addChangeListener(ChangeListener.ALWAYS_VETO); this.querySeq.addChangeListener(ChangeListener.ALWAYS_VETO); this.annotation.addChangeListener(ChangeListener.ALWAYS_VETO);
public SequenceDBSearchResult(SequenceDB sequenceDB, Map searchParameters, SymbolList querySeq, Annotation annotation, List hits) { Contract.pre(querySeq != null, "querySeq was null"); Contract.pre(sequenceDB != null, "sequenceDB was null"); // searchParameters may be null Cont...
throw new AlreadyExistsException("Ontology " + getName() + " already contains " + name);
throw new AlreadyExistsException("Ontology " + getName() + " already contains " + t.getName());
private void addTerm(Term t) throws AlreadyExistsException, IllegalArgumentException, ChangeVetoException { if (terms.containsKey(t.getName())) { throw new AlreadyExistsException("Ontology " + getName() + " already contains " + name); } ...
public RemoteTerm importTerm(Term t, String name)
public Term importTerm(Term t, String name)
public RemoteTerm importTerm(Term t, String name) throws IllegalArgumentException, ChangeVetoException { RemoteTerm rt = (RemoteTerm) remoteTerms.get(t); if (rt == null) { rt = new RemoteTerm.Impl(this, t, name); try { addTerm(rt); } catch (AlreadyExistsExceptio...
while(t instanceof RemoteTerm) { t = ((RemoteTerm) t).getRemoteTerm(); } if(t.getOntology() == this) { return t; }
public RemoteTerm importTerm(Term t, String name) throws IllegalArgumentException, ChangeVetoException { RemoteTerm rt = (RemoteTerm) remoteTerms.get(t); if (rt == null) { rt = new RemoteTerm.Impl(this, t, name); try { addTerm(rt); } catch (AlreadyExistsExceptio...
public RemoteTerm importTerm(Term t, String localName)
public Term importTerm(Term t, String localName)
public RemoteTerm importTerm(Term t, String localName) throws ChangeVetoException, IllegalArgumentException;
public SimpleSymbol( char token, String name, Annotation annotation, Set bases
protected SimpleSymbol( char token, String name, Annotation annotation
public SimpleSymbol( char token, String name, Annotation annotation, Set bases ) { this.token = token; this.name = name; this.annotation = new SimpleAnnotation(annotation); if(bases == null) { this.bases = null; } else { this.bases = Collections.unmodifiableSet(bases); } }
if(bases == null) { this.bases = null; } else { this.bases = Collections.unmodifiableSet(bases); }
public SimpleSymbol( char token, String name, Annotation annotation, Set bases ) { this.token = token; this.name = name; this.annotation = new SimpleAnnotation(annotation); if(bases == null) { this.bases = null; } else { this.bases = Collections.unmodifiableSet(bases); } }
Set bases = getBases(); Set mat = new HashSet(); for(Iterator i = bases.iterator(); i.hasNext(); ) { BasisSymbol bs = (BasisSymbol) i.next(); if(bs instanceof AtomicSymbol) { mat.add(bs); } else { FiniteAlphabet ma = (FiniteAlphabet) bs.getMatches(); for(Iterator j = ma.iterator(); j.hasNext(); ) { mat.add((AtomicSymbo...
throw new BioError("Assertion Failure: Matches alphabet is null");
protected Alphabet createMatches() { Set bases = getBases(); Set mat = new HashSet(); for(Iterator i = bases.iterator(); i.hasNext(); ) { BasisSymbol bs = (BasisSymbol) i.next(); if(bs instanceof AtomicSymbol) { mat.add(bs); } else { FiniteAlphabet ma = (FiniteAlphabet) bs.getMat...
dp.setFeature("http:
static DOMParser nonvalidatingParser() { DOMParser dp = new DOMParser(); try { dp.setFeature("http://xml.org/sax/features/validation", false); // dp.setFeature("http://xml.org/sax/features/external-parameter-entities", false); dp.setFeature("http://apache.org/xml/features/nonvalidating/load-dtd-grammar"...
try { componentID = (String) temp.annotation.getProperty("sequence.id"); } catch (NoSuchElementException ex) { throw new BioRuntimeException("No sequence.id property");
componentID = temp.componentSequenceName; if (componentID == null) { try { componentID = (String) temp.annotation.getProperty("sequence.id"); } catch (NoSuchElementException ex) { throw new BioRuntimeException("No sequence.id property"); }
public DASComponentFeature(DASSequence 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."); } ...
public Ticket requestFeatures(String id, SeqIOListener l, String type, String category) { Ticket t = new Ticket(id, l, type, category); openTickets.add(t); return t;
public Ticket requestFeatures(String id, SeqIOListener l) { return requestFeatures(id, l, null, null);
public Ticket requestFeatures(String id, SeqIOListener l, String type, String category) { Ticket t = new Ticket(id, l, type, category); openTickets.add(t); return t; }
public DNANoAmbPack(Symbol placeHolderSymbol) { this.placeHolder = pack(placeHolderSymbol);
public DNANoAmbPack(byte placeHolder) { this.placeHolder = placeHolder;
public DNANoAmbPack(Symbol placeHolderSymbol) { this.placeHolder = pack(placeHolderSymbol); }
Element segment = null;
public Set ids() { if (rootIDs == null) { try { DAS.startedActivity(this); Set ids = new HashSet(); URL epURL = new URL(dataSourceURL, "entry_points"); HttpURLConnection huc = (HttpURLConnection) epURL.openConnection(); try...
Map seqMap = new HashMap();
Map seqMap = new LinkedHashMap();
public Alignment read(BufferedReader br) { try { SequenceIterator seqs = null; br.mark(200); String line = br.readLine(); line = br.readLine(); br.reset(); for (int i = 0; i < line.length(); i++) { if (Character.toUpperCase(line...
public void addSequence(Sequence seq) { sequenceByID.put(idMaker.calcID(seq), seq);
public void addSequence(String id, Sequence seq) { sequenceByID.put(id, seq);
public void addSequence(Sequence seq) { sequenceByID.put(idMaker.calcID(seq), seq); }
if (!(value instanceof String)) value = value.toString();
if ((value != null) && !(value instanceof String)) value = value.toString();
public void addFeatureProperty(Object key, Object value) throws ParseException { if (this.featureStack.size() == 0) throw new ParseException("Assertion failed: Not within a feature"); if (!(key instanceof ComparableTerm)) key = RichObjectFactory.getDefaultOntology().getOrCreateTerm(key.toString()); ...
} catch (IllegalAlphabetException iae) {
} catch (IllegalResidueException iae) {
public Residue residueAt(int index) throws IndexOutOfBoundsException { if(index < 1 || index > length()) { throw new IndexOutOfBoundsException( "index must be within (1 .. " + length() + "), not " + index ); } index = (index-1)*width + 1; try { return alpha.getResidue...
throws IllegalAlphabetException;
throws IllegalResidueException;
public CrossProductResidue getResidue(List rl) throws IllegalAlphabetException;
this(fh, null, parent, translation, oppositeStrand);
this.wrapped = fh; this.parent = parent; this.translate = translation; this.oppositeStrand = oppositeStrand; this.filter = filter; underlyingFeaturesChange = new ChangeListener() { public void preChange(ChangeEvent e) throws ChangeVetoException { if (changeSupport != null) { changeSupport.firePreChangeEvent(new Change...
public ProjectedFeatureHolder(FeatureHolder fh, FeatureHolder parent, int translation, boolean oppositeStrand) { this(fh, null, parent, translation, oppositeStrand); }
return new PointLocation(this.point + dist);
if (dist == 0) return this; return new PointLocation(this.point + dist);
public Location translate(int dist) { return new PointLocation(this.point + dist); }
this.alfa = alfa;
public Search(FiniteAlphabet alfa) { this.alfa = alfa; factory = PatternFactory.makeFactory(alfa); }
public org.biojava.utils.regex.Matcher reset(SymbolList sl)
public org.biojava.utils.regex.Matcher reset()
public org.biojava.utils.regex.Matcher reset(SymbolList sl) { this.sl = sl; matcher = matcher.reset(new SymbolListCharSequence(sl)); return this; }
this.sl = sl; matcher = matcher.reset(new SymbolListCharSequence(sl));
matcher = matcher.reset();
public org.biojava.utils.regex.Matcher reset(SymbolList sl) { this.sl = sl; matcher = matcher.reset(new SymbolListCharSequence(sl)); return this; }
public boolean find(int start) throws IndexOutOfBoundsException { return matcher.find(start); }
public boolean find() { return matcher.find(); }
public boolean find(int start) throws IndexOutOfBoundsException { return matcher.find(start); }
public int start() { return matcher.start(); }
public int start() { return matcher.start() + 1; }
public int start() { return matcher.start(); }
public int end() { return matcher.end(); }
public int end() { return matcher.end() + 1; }
public int end() { return matcher.end(); }
for(Iterator i = alphabet.iterator(); i.hasNext(); ) { weight.put(i.next(), new Double(Double.NaN)); }
public SimpleDistribution(FiniteAlphabet alphabet) { this.alphabet = alphabet; this.weight = new HashMap(); for(Iterator i = alphabet.iterator(); i.hasNext(); ) { weight.put(i.next(), new Double(Double.NaN)); } try { setNullModel(new UniformDistribution(alphabet)); } catch (Exception e) { ...
for(Iterator i = ((FiniteAlphabet) sym.getMatches()).iterator(); i.hasNext(); ) {
FiniteAlphabet matches = (FiniteAlphabet) sym.getMatches(); if(matches.size() == 0) { if(sym.equals(AlphabetManager.getGapSymbol())) { return true; } else if(sym instanceof BasisSymbol) { if(((BasisSymbol) sym).getSymbols().size() == getAlphabets().size()) { return true; } } return true; } for(Iterator i = matches....
public final boolean contains(Symbol sym) { if(sym instanceof AtomicSymbol) { return containsImpl((AtomicSymbol) sym); } else { if(sym == null) { throw new NullPointerException("Symbols can't be null"); } for(Iterator i = ((FiniteAlphabet) sym.getMatches()).iterator(); i.hasNext(); ) ...
Iterator i = iterator();
/*Iterator i = iterator();
public final void validate(Symbol sym) throws IllegalSymbolException { if(!contains(sym)) { StringBuffer sb = new StringBuffer("{"); Iterator i = iterator(); if(i.hasNext()) { sb.append(((Symbol) i.next()).getToken()); } while(i.hasNext()) { sb.append(','); sb.append(...
sb.append(((Symbol) i.next()).getToken());
sb.append(((Symbol) i.next()).getName());
public final void validate(Symbol sym) throws IllegalSymbolException { if(!contains(sym)) { StringBuffer sb = new StringBuffer("{"); Iterator i = iterator(); if(i.hasNext()) { sb.append(((Symbol) i.next()).getToken()); } while(i.hasNext()) { sb.append(','); sb.append(...
sb.append("}");
sb.append("}");*/
public final void validate(Symbol sym) throws IllegalSymbolException { if(!contains(sym)) { StringBuffer sb = new StringBuffer("{"); Iterator i = iterator(); if(i.hasNext()) { sb.append(((Symbol) i.next()).getToken()); } while(i.hasNext()) { sb.append(','); sb.append(...
static public Symbol createSymbol( char token, Annotation annotation, Set symSet, Alphabet alpha ) throws IllegalSymbolException { if(symSet.size() == 0) { return getGapSymbol(); } Set asSet = new HashSet(); int len = -1; for( Iterator i = symSet.iterator(); i.hasNext(); ) { Symbol s = (Symbol) i.next(); if(s instanceo...
static public AtomicSymbol createSymbol( char token, String name, Annotation annotation ) { AtomicSymbol as = new FundamentalAtomicSymbol(name, token, annotation); return as;
static public Symbol createSymbol( char token, Annotation annotation, Set symSet, Alphabet alpha ) throws IllegalSymbolException { if(symSet.size() == 0) { return getGapSymbol(); } Set asSet = new HashSet(); int len = -1; for( Iterator i = symSet.iterator(); i.hasNext(); ) { ...
public void add(LabelIncrementer labelIncrementer) { this.labelIncrementer = labelIncrementer;
public void add(CCDateFormat dateFormat) { this.dateFormat = dateFormat;
public void add(LabelIncrementer labelIncrementer) { this.labelIncrementer = labelIncrementer; }
int stateCount = states.length;
private void forward_recurse(DPCursor dpCursor, ScoreType scoreType) throws IllegalSymbolException { State [] states = getStates(); int stateCount = states.length; int [][] transitions = getForwardTransitions(); double [][] transitionScore = getForwardTransitionScores(scoreType); // int _index = 0; ...
char [] emptyLine = new char [80];
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; int end = start + length - 1; for (int i = start; i <= end; i++) { char c = syms[i].getTo...
Contract.pre(queryStrand != null, "queryStrand was null"); Contract.pre(subjectStrand != null, "subjectStrand was null");
public SimpleSeqSimilaritySearchSubHit(double score, double eValue, double pValue, int queryStart, int queryEnd, Strand queryStrand, int subjectStart, int subjectEnd, Strand subjectStran...
throw new IllegalAlphabetException();
throw new IllegalAlphabetException( "Unable to find CrossProduct residue for " + l + " in alphabet " + getName() );
public CrossProductResidue getResidue(List l) throws IllegalAlphabetException { gopher.l = l; CrossProductResidue r = (CrossProductResidue) ourResidues.get(gopher); if (r == null) { throw new IllegalAlphabetException(); } return r; }
int end)
int length)
public void characters(char[] ch, int start, int end) throws SAXException { }
if(pos > symList.size()) {
if(pos > symList.length()) {
public int end() { if(pos == 0) { throw new IllegalStateException("Can't call end() before find()"); } if(pos > symList.size()) { throw new IllegalStateException("Can't call end() after find() has returned false"); } return pos + length - 1; }
pos = symList.size() + 1;
pos = symList.length() + 1;
public boolean find() { try { // are we doing the 1st find? if(pos == 0) { // can't find an n-long sub-sequence of a <n-long super-sequence if(length > symList.length()) { return false; } // getting the initial counts for(int i = 1; i <= length; i++) { ...
if(pos > symList.size()) {
if(pos > symList.length()) {
public SymbolList group() { if(pos == 0) { throw new IllegalStateException("Can't call group() before find()"); } if(pos > symList.size()) { throw new IllegalStateException("Can't call group() after find() has returned false"); } return symList.subList(pos, pos + length - 1); }
if(pos > symList.size()) {
if(pos > symList.length()) {
public int start() { if(pos == 0) { throw new IllegalStateException("Can't call start() before find()"); } if(pos > symList.size()) { throw new IllegalStateException("Can't call start() after find() has returned false"); } return pos; }
public SimpleXMLEmitter(boolean flag)
public SimpleXMLEmitter()
public SimpleXMLEmitter(boolean flag) { oXMLWriter = new BaseXMLWriter(); tEmitQNames = true; setEmitQNames(flag); System.out.println("<?xml version=\"1.0\"?>"); }
setEmitQNames(flag);
public SimpleXMLEmitter(boolean flag) { oXMLWriter = new BaseXMLWriter(); tEmitQNames = true; setEmitQNames(flag); System.out.println("<?xml version=\"1.0\"?>"); }
StrandedFeature.Template t = new StrandedFeature.Template();
RestrictionSite.Template t = new RestrictionSite.Template();
public void run() { SymbolListCharSequence charSeq = new SymbolListCharSequence(target); try { Pattern [] patterns = RestrictionEnzymeManager.getPatterns(enzyme); String name = enzyme.getName(); int siteLen = enzyme.getRecognitionSite().length(); i...
t.enzyme = enzyme;
public void run() { SymbolListCharSequence charSeq = new SymbolListCharSequence(target); try { Pattern [] patterns = RestrictionEnzymeManager.getPatterns(enzyme); String name = enzyme.getName(); int siteLen = enzyme.getRecognitionSite().length(); i...
if (accept(property)) {
if (accept(value)) {
public void setProperty(Annotation ann, Object property, Object value) throws ChangeVetoException { if (accept(property)) { ann.setProperty(property, value); } else { throw new ChangeVetoException("Value not accepted"); } }
this.matches = getInstance().getSubAlphabet(minVal, maxVal);
this.matches = DoubleAlphabet.getSubAlphabet(minVal, maxVal);
protected DoubleRange(double minVal, double maxVal) { this.minVal = minVal; this.maxVal = maxVal; this.matches = getInstance().getSubAlphabet(minVal, maxVal); }
throw new BioRuntimeException(ex, "Assertion failure: trivial URI manipulation failed");
throw new BioException(ex, "Assertion failure: trivial URI manipulation failed");
public DASSequenceDB(URL dataSourceURL) throws BioException { String s = dataSourceURL.toString(); if (! (s.endsWith("/"))) { try { dataSourceURL = new URL(s + "/"); } catch (MalformedURLException ex) { throw new BioRuntimeException(ex, "Assertion failure: trivial URI manipulation failed"); } } t...
int lead = (int) (leadingPixles / src.getScale()); int trail = (int) (trailingPixles / src.getScale());
protected List doLayer(SequenceRenderContext src, FeatureFilter filt) { FeatureHolder features = src.getFeatures(); List layers = new ArrayList(); List layerLocs = new ArrayList(); for( Iterator fi = features.filter( filt, false ).features(); fi.hasNext(); ) { Feature f =...
if(!fLoc.isContiguous()) { fLoc = new RangeLocation(fLoc.getMin(), fLoc.getMax()); }
fLoc = new RangeLocation(fLoc.getMin() - lead, fLoc.getMax() + trail);
protected List doLayer(SequenceRenderContext src, FeatureFilter filt) { FeatureHolder features = src.getFeatures(); List layers = new ArrayList(); List layerLocs = new ArrayList(); for( Iterator fi = features.filter( filt, false ).features(); fi.hasNext(); ) { Feature f =...
public SequenceRendererWrapper(SequenceRenderer renderer) { this.renderer = renderer; }
public SequenceRendererWrapper() {}
public SequenceRendererWrapper(SequenceRenderer renderer) { this.renderer = renderer; }
dotStates.add(0, state);
dotStates.add(state);
public static State[] stateList(MarkovModel mm) throws IllegalResidueException, IllegalTransitionException { Alphabet alpha = mm.stateAlphabet(); List emissionStates = new ArrayList(); HMMOrderByTransition comp = new HMMOrderByTransition(mm); List dotStates = new LinkedList(); for (Iterator addStates = alpha.res...
public void addFeatureProperty(final Object key, final Object value)
public void addFeatureProperty(Object key, Object value)
public void addFeatureProperty(final Object key, final Object value) throws ParseException { // There are 19 spaces in the leader String leader = "FT "; // Don't print internal data structures if (key.equals(Feature.PROPERTY_DATA_KEY)) return; // The value may be...
qb.setLength(0); ub.setLength(0); StringBuffer fb = formatQualifierBlock(qb, formatQualifier(ub, key, vi.next()).toString(), leader, 80);
qb.setLength(0); ub.setLength(0); StringBuffer fb = formatQualifierBlock(qb, formatQualifier(ub, key, vi.next()).substring(0), leader, 80);
public void addFeatureProperty(final Object key, final Object value) throws ParseException { // There are 19 spaces in the leader String leader = "FT "; // Don't print internal data structures if (key.equals(Feature.PROPERTY_DATA_KEY)) return; // The value may be...
StringBuffer fb = formatQualifierBlock(qb, formatQualifier(ub, key, value).toString(), leader, 80);
StringBuffer fb = formatQualifierBlock(qb, formatQualifier(ub, key, value).substring(0), leader, 80);
public void addFeatureProperty(final Object key, final Object value) throws ParseException { // There are 19 spaces in the leader String leader = "FT "; // Don't print internal data structures if (key.equals(Feature.PROPERTY_DATA_KEY)) return; // The value may be...
public void addSequenceProperty(final Object key, final Object value)
public void addSequenceProperty(Object key, Object value)
public void addSequenceProperty(final Object key, final Object value) throws ParseException { if (key.equals("ID")) { idb.setLength(0); idb.append("ID " + (String) value); } else if (key.equals("DT") || key.equals("MDAT")) { dtb = new StringBuffer(se...
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)
public void addSymbols(final Alphabet alpha, final Symbol [] syms, final int start, final int length) throws IllegalAlphabetException { try { int aCount = 0; int cCount = 0; int gCount = 0; int tCoun...
for (int i = start; i <= end; i++) { char c = dnaTokenization.tokenizeSymbol(syms[i]).charAt(0);
switch (c) { case 'a': case 'A': aCount++; break; case 'c': case 'C': cCount++; break; case 'g': case 'G': gCount++; break; case 't': case 'T': tCount++; break;
public void addSymbols(final Alphabet alpha, final Symbol [] syms, final int start, final int length) throws IllegalAlphabetException { try { int aCount = 0; int cCount = 0; int gCount = 0; int tCoun...
switch (c) { case 'a': case 'A': aCount++; break; case 'c': case 'C': cCount++; break; case 'g': case 'G': gCount++; break; case 't': case 'T': tCount++; break; default: oCount++; } }
default: oCount++; } }
public void addSymbols(final Alphabet alpha, final Symbol [] syms, final int start, final int length) throws IllegalAlphabetException { try { int aCount = 0; int cCount = 0; int gCount = 0; int tCoun...
Arrays.fill(lineLens, 60); lineLens[lineCount - 1] = partLine;
Arrays.fill(lineLens, 60);
public void addSymbols(final Alphabet alpha, final Symbol [] syms, final int start, final int length) throws IllegalAlphabetException { try { int aCount = 0; int cCount = 0; int gCount = 0; int tCoun...
char [] emptyLine = new char [80];
if (partLine > 0) lineLens[lineCount - 1] = partLine;
public void addSymbols(final Alphabet alpha, final Symbol [] syms, final int start, final int length) throws IllegalAlphabetException { try { int aCount = 0; int cCount = 0; int gCount = 0; int tCoun...
for (int i = 0; i < lineLens.length; i++) { sq.setLength(0); ub.setLength(0);
char [] emptyLine = new char [80];
public void addSymbols(final Alphabet alpha, final Symbol [] syms, final int start, final int length) throws IllegalAlphabetException { try { int aCount = 0; int cCount = 0; int gCount = 0; int tCoun...
int len = lineLens[i];
for (int i = 0; i < lineLens.length; i++) { sq.setLength(0); ub.setLength(0);
public void addSymbols(final Alphabet alpha, final Symbol [] syms, final int start, final int length) throws IllegalAlphabetException { try { int aCount = 0; int cCount = 0; int gCount = 0; int tCoun...
Arrays.fill(emptyLine, ' '); sq.append(emptyLine);
int len = lineLens[i];
public void addSymbols(final Alphabet alpha, final Symbol [] syms, final int start, final int length) throws IllegalAlphabetException { try { int aCount = 0; int cCount = 0; int gCount = 0; int tCoun...
Symbol [] sa = new Symbol [len];
Arrays.fill(emptyLine, ' '); sq.append(emptyLine);
public void addSymbols(final Alphabet alpha, final Symbol [] syms, final int start, final int length) throws IllegalAlphabetException { try { int aCount = 0; int cCount = 0; int gCount = 0; int tCoun...
System.arraycopy(syms, start + (i * 60), sa, 0, len);
Symbol [] sa = new Symbol [len];
public void addSymbols(final Alphabet alpha, final Symbol [] syms, final int start, final int length) throws IllegalAlphabetException { try { int aCount = 0; int cCount = 0; int gCount = 0; int tCoun...
String blocks = (formatTokenBlock(ub, sa, 10, dnaTokenization)).toString();
System.arraycopy(syms, start + (i * 60), sa, 0, len);
public void addSymbols(final Alphabet alpha, final Symbol [] syms, final int start, final int length) throws IllegalAlphabetException { try { int aCount = 0; int cCount = 0; int gCount = 0; int tCoun...
sq.replace(5, blocks.length() + 5, blocks);
String blocks = (formatTokenBlock(ub, sa, 10, dnaTokenization)).toString();
public void addSymbols(final Alphabet alpha, final Symbol [] syms, final int start, final int length) throws IllegalAlphabetException { try { int aCount = 0; int cCount = 0; int gCount = 0; int tCoun...
String count = Integer.toString((i * 60) + len); sq.replace((80 - count.length()), 80, count);
sq.replace(5, blocks.length() + 5, blocks);
public void addSymbols(final Alphabet alpha, final Symbol [] syms, final int start, final int length) throws IllegalAlphabetException { try { int aCount = 0; int cCount = 0; int gCount = 0; int tCoun...