rem stringlengths 0 477k | add stringlengths 0 313k | context stringlengths 6 599k |
|---|---|---|
char [] emptyLine = new char [80]; | public void addSymbols(final Alphabet alpha, final Symbol [] syms, final int start, final int length) throws IllegalAlphabetException { int aCount = 0; int cCount = 0; int gCount = 0; int... | |
String line2 = br.readLine(); | public static int guessFileType(File seqFile) throws IOException, FileNotFoundException { //First tries by matching an extension String fileName = seqFile.getName(); try { if (Pattern.matches(".*\\u002eem.*", fileName)) { return SeqIOConstants.EMBL_DNA; ... | |
name = s.trim(); | protected void setStringValue(String s) { name = s.trim(); } | |
association = attrs.getValue("association"); | public void startElementHandler( String nsURI, String localName, String qName, Attributes attrs) { association = attrs.getValue("association"); } | |
return filter(ff, !FilterUtils.areProperSubset(ff, new FeatureFilter.IsTopLevel())); | return filter(ff, !FilterUtils.areProperSubset(ff, FeatureFilter.top_level)); | public FeatureHolder filter(FeatureFilter ff) { return filter(ff, !FilterUtils.areProperSubset(ff, new FeatureFilter.IsTopLevel())); } |
this, | protected FeatureHolder getProjectedFeatures() { if (projectedFeatures == null) { projectedFeatures = new ProjectedFeatureHolder( new TranslateFlipContext( getComponentSequence(), this, translation, ... | |
begin = Math.min(end, seq.length());; | begin = Math.min(end, seq.length()); | public void search(Sequence seq) { for (Iterator patternsI = patterns.iterator(); patternsI.hasNext(); ) { PatternInfo info = (PatternInfo) patternsI.next(); if (info.matcher == null) { info.matcher = info.pattern.matcher(seq); } else { ... |
this.alfa = alfa; | PatternMaker(String patternString, FiniteAlphabet alfa) throws BioException { this.alfa = alfa; toke = new Tokenizer(patternString); nfa = new Nfa(patternString, alfa); symtoke = alfa.getTokenization("token"); } | |
FeatureFilter hasID = FilterUtils.hasAnnotation("id"); | public void testUseCases() { // schemas for our database features FeatureFilter transcript = FilterUtils.byType("transcript"); FeatureFilter exon = FilterUtils.byType("exon"); FeatureFilter repeat = FilterUtils.byType("repeat"); AnnotationType.Impl tsType = new AnnotationType.Impl(); ... | |
Strand querySeqStrand = StrandedFeature.POSITIVE; | private SeqSimilaritySearchHit makeHit(final Map hitData, final Annotation hitAnnotation) throws BioException { String seqType = (String) hitData.get("query_sq_type"); String subjectSeqID = (String) hitData.get("id"); double score = Double.parseDouble(... | |
Strand subjectSeqStrand; if (((String) hitData.get("fa_frame")).equals("f")) subjectSeqStrand = StrandedFeature.POSITIVE; else subjectSeqStrand = StrandedFeature.NEGATIVE; | Strand querySeqStrand = null; Strand subjectSeqStrand = null; if (seqType.equals("dna")) { if (((String) hitData.get("fa_frame")).equals("f")) subjectSeqStrand = StrandedFeature.POSITIVE; else subjectSeqStrand = StrandedFeature.NEGATIVE; } | private SeqSimilaritySearchHit makeHit(final Map hitData, final Annotation hitAnnotation) throws BioException { String seqType = (String) hitData.get("query_sq_type"); String subjectSeqID = (String) hitData.get("id"); double score = Double.parseDouble(... |
if (seqType.equals("DNA")) | if (seqType.equals("dna")) | private SeqSimilaritySearchHit makeHit(final Map hitData, final Annotation hitAnnotation) throws BioException { String seqType = (String) hitData.get("query_sq_type"); String subjectSeqID = (String) hitData.get("id"); double score = Double.parseDouble(... |
for(Iterator i = ((FiniteAlphabet) getConditioningAlphabet()).iterator(); i.hasNext(); ) { Symbol si = (Symbol) i.next(); dists.put(si, df.createDistribution(getConditionedAlphabet())); } | for(Iterator i = ((FiniteAlphabet) getConditioningAlphabet()).iterator(); i.hasNext(); ) { Symbol si = (Symbol) i.next(); dists.put(si.getName(), df.createDistribution(getConditionedAlphabet())); } | GeneralNthOrderDistribution(Alphabet alpha, DistributionFactory df) throws IllegalAlphabetException { super(alpha); dists = new HashMap(); for(Iterator i = ((FiniteAlphabet) getConditioningAlphabet()).iterator(); i.hasNext(); ) { Symbol si = (Symbol) i.next(); dists.put(si, df.createDistribution(... |
Distribution d = (Distribution) dists.get(sym); if(d == null) { getConditioningAlphabet().validate(sym); } return d; | Distribution d = (Distribution) dists.get(sym.getName()); if(d == null) { getConditioningAlphabet().validate(sym); } return d; | public Distribution getDistribution(Symbol sym) throws IllegalSymbolException { Distribution d = (Distribution) dists.get(sym); if(d == null) { getConditioningAlphabet().validate(sym); } return d; } |
getConditioningAlphabet().validate(sym); if(dist.getAlphabet() != getConditionedAlphabet()) { throw new IllegalAlphabetException( "The distribution must be over " + getConditionedAlphabet() + ", not " + dist.getAlphabet()); } Distribution old = (Distribution) dists.get(sym); if( (old != null) && (weightForwarder != nu... | getConditioningAlphabet().validate(sym); if(dist.getAlphabet() != getConditionedAlphabet()) { throw new IllegalAlphabetException( "The distribution must be over " + getConditionedAlphabet() + ", not " + dist.getAlphabet()); } Distribution old = (Distribution) dists.get(sym); if( (old != null) && (weightForwarder != nu... | public void setDistribution(Symbol sym, Distribution dist) throws IllegalSymbolException, IllegalAlphabetException { getConditioningAlphabet().validate(sym); if(dist.getAlphabet() != getConditionedAlphabet()) { throw new IllegalAlphabetException( "The distribution must be over " + getConditionedAlphabe... |
listener.addSequenceProperty(tag, rest); | ReferenceAnnotation refAnnot = new ReferenceAnnotation(); if (tag.equals(REFERENCE_TAG)) { try { refAnnot.setProperty(tag, rest); while (!(tag.equals(SEPARATOR_TAG))) { line = reader.readLine(); tag = line.substring(0, 2); if (line.length() > 5) { rest = line.substring(5); } else { rest = null; } if (refAnnot.c... | public boolean readSequence(BufferedReader reader, SymbolTokenization symParser, SeqIOListener listener) throws IllegalSymbolException, IOException, ParseException { if (listener instanceof ParseErrorSource) { ((ParseErrorSource)(l... |
this.getScientificName().equals(t.getScientificName()) && this.getCommonName().equals(t.getCommonName()) && this.getChildren().equals(t.getChildren()) | safeEq(this.getScientificName(), t.getScientificName()) && safeEq(this.getCommonName(), t.getCommonName()) && safeEq(this.getChildren(), t.getChildren()) | public boolean equals(Object o) { if(o instanceof Taxa) { Taxa t = (Taxa) o; return this == t || ( this.getScientificName().equals(t.getScientificName()) && this.getCommonName().equals(t.getCommonName()) && this.getChildren().equals(t.getChildren()) ); } ... |
System.out.println("Class " + clazz); System.out.println("Socket " + sock); | public AceObject getObject(AceType.ClassType clazz, String name) throws AceException { String cacheName = clazz.getName() + ":" + name; AceObject o = (AceObject) getFromCache(cacheName); if (o != null) return o; // get object AceSocket sock = null; try { sock = takeSocket(); System.out.p... | |
System.out.println("found "+numFound); | public AceSet select(AceType.ClassType clazz, String namePattern) throws AceException { AceSocket sock = null; try { sock = takeSocket(); String result = sock.transact("find " + clazz.getName() + " " + namePattern); int mpos = result.indexOf("// Found "); if (mpos < 0) retur... | |
System.out.println("Actually got :" + nameList.size()); | public AceSet select(AceType.ClassType clazz, String namePattern) throws AceException { AceSocket sock = null; try { sock = takeSocket(); String result = sock.transact("find " + clazz.getName() + " " + namePattern); int mpos = result.indexOf("// Found "); if (mpos < 0) retur... | |
private Alignment createAlignment(Map dataMap) | private Alignment createAlignment(String subjectSeqID, Map dataMap) | private Alignment createAlignment(Map dataMap) throws IllegalSymbolException { String seqType = (String) dataMap.get("query"); FiniteAlphabet alpha; // What happens if Fasta is given an RNA sequence? if (seqType.equals("dna")) alpha = DNATools.getDNA(); else alpha = ProteinTools.getAlphabet(); TokenParse... |
TokenParser tp = new TokenParser(alpha); StringBuffer querySeqTokens = new StringBuffer((String) dataMap.get("querySeqTokens")); | StringBuffer querySeqTokens = new StringBuffer(prepSeqTokens("query", dataMap)); | private Alignment createAlignment(Map dataMap) throws IllegalSymbolException { String seqType = (String) dataMap.get("query"); FiniteAlphabet alpha; // What happens if Fasta is given an RNA sequence? if (seqType.equals("dna")) alpha = DNATools.getDNA(); else alpha = ProteinTools.getAlphabet(); TokenParse... |
new StringBuffer((String) dataMap.get("querySeqTokens")); StringBuffer ungappedQuerySeqTokens = new StringBuffer(); StringBuffer ungappedSubjectSeqTokens = new StringBuffer(); | new StringBuffer(prepSeqTokens("subject", dataMap)); | private Alignment createAlignment(Map dataMap) throws IllegalSymbolException { String seqType = (String) dataMap.get("query"); FiniteAlphabet alpha; // What happens if Fasta is given an RNA sequence? if (seqType.equals("dna")) alpha = DNATools.getDNA(); else alpha = ProteinTools.getAlphabet(); TokenParse... |
labelMap.put("query", tp.parse("")); labelMap.put("subject", tp.parse("")); | GappedSymbolListBuilder gslBuilder = new GappedSymbolListBuilder(alpha); labelMap.put(SeqSimilaritySearchSubHit.QUERY_LABEL, gslBuilder.makeGappedSymbolList(querySeqTokens)); labelMap.put(subjectSeqID, gslBuilder.makeGappedSymbolList(subjectSeqTokens)); | private Alignment createAlignment(Map dataMap) throws IllegalSymbolException { String seqType = (String) dataMap.get("query"); FiniteAlphabet alpha; // What happens if Fasta is given an RNA sequence? if (seqType.equals("dna")) alpha = DNATools.getDNA(); else alpha = ProteinTools.getAlphabet(); TokenParse... |
String subjectID = (String) dataMap.get("id"); Double score = (Double) dataMap.get("fa_z-score"); Double eValue = (Double) dataMap.get("fa_expect"); Double pValue = (Double) dataMap.get("fa_expect"); | String subjectSeqID = (String) dataMap.get("id"); Double score = (Double) dataMap.get("fa_z-score"); Double eValue = (Double) dataMap.get("fa_expect"); Double pValue = (Double) dataMap.get("fa_expect"); | private SeqSimilaritySearchHit createHit(Map dataMap, Annotation hitAnnotation) throws BioException { String subjectID = (String) dataMap.get("id"); Double score = (Double) dataMap.get("fa_z-score"); Double eValue = (Double) dataMap.get("fa_expect"); Double pValue = (Double) dataMap... |
Alignment alignment = createAlignment(dataMap); | Alignment alignment = createAlignment(subjectSeqID, dataMap); | private SeqSimilaritySearchHit createHit(Map dataMap, Annotation hitAnnotation) throws BioException { String subjectID = (String) dataMap.get("id"); Double score = (Double) dataMap.get("fa_z-score"); Double eValue = (Double) dataMap.get("fa_expect"); Double pValue = (Double) dataMap... |
+ subjectID); | + subjectSeqID); | private SeqSimilaritySearchHit createHit(Map dataMap, Annotation hitAnnotation) throws BioException { String subjectID = (String) dataMap.get("id"); Double score = (Double) dataMap.get("fa_z-score"); Double eValue = (Double) dataMap.get("fa_expect"); Double pValue = (Double) dataMap... |
return new SequenceDBSearchHit(subjectID, | return new SequenceDBSearchHit(subjectSeqID, | private SeqSimilaritySearchHit createHit(Map dataMap, Annotation hitAnnotation) throws BioException { String subjectID = (String) dataMap.get("id"); Double score = (Double) dataMap.get("fa_z-score"); Double eValue = (Double) dataMap.get("fa_expect"); Double pValue = (Double) dataMap... |
public SequenceDBSearchResult(SequenceDB sequenceDB, Map searchParameters, SymbolList querySeq, Annotation annotation, List hits) | public SequenceDBSearchResult(final SequenceDB sequenceDB, final Map searchParameters, final SymbolList querySeq, final Annotation annotation, final List hits) | 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... |
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 SequenceDBSearchResult that = (SequenceDBSearchResult) other; if (! O... |
alongDim = Math.ceil((double) width); | alongDim = symbolsPerLine * scale; | public void resizeAndValidate() { System.out.println("resizeAndValidate starting"); Dimension d = null; int realLines; double acrossDim; if(sequence == null) { System.out.println("No sequence"); // no sequence - collapse down to no size at all alongDim = 0.0; acrossDim = 0.0; ... |
throw new NoSuchElementException("Autogenerated gapped alphabets aren't clever enough to have parsers yet..."); } | throw new NoSuchElementException("No parsers associated with " + getName()); } | public ResidueParser getParser(String name) { throw new NoSuchElementException("Autogenerated gapped alphabets aren't clever enough to have parsers yet..."); } |
if (! ((child.contains(r) || r == gapResidue))) throw new IllegalResidueException("Residue " + r.getName() + " is not found in Alphabet " + getName()); } | if (!( (child.contains(r) || r == gapResidue) )) { throw new IllegalResidueException("Residue " + r.getName() + " is not found in Alphabet " + getName()); } } | public void validate(Residue r) throws IllegalResidueException { if (! ((child.contains(r) || r == gapResidue))) throw new IllegalResidueException("Residue " + r.getName() + " is not found in Alphabet " + getName()); } |
if (a.contains(gapResidue)) { return a; | if(a == null) { throw new NullPointerException("Can't add a gap to 'null'"); } if (a.contains(gapResidue)) { return a; } Alphabet b = (Alphabet) gappedAlphabets.get(a); if (b == null) { if(a instanceof FiniteAlphabet) { b = new FiniteGappedAlphabet((FiniteAlphabet) a); } else { b = new GappedAlphabet(a); | public Alphabet getGappedAlphabet(Alphabet a) { if (a.contains(gapResidue)) { return a; } Alphabet b = (Alphabet) gappedAlphabets.get(a); if (b == null) { if(a instanceof FiniteAlphabet) { b = new FiniteGappedAlphabet((FiniteAlphabet) a); } else { b = new G... |
Alphabet b = (Alphabet) gappedAlphabets.get(a); if (b == null) { if(a instanceof FiniteAlphabet) { b = new FiniteGappedAlphabet((FiniteAlphabet) a); } else { b = new GappedAlphabet(a); } gappedAlphabets.put(a, b); } return b; | gappedAlphabets.put(a, b); | public Alphabet getGappedAlphabet(Alphabet a) { if (a.contains(gapResidue)) { return a; } Alphabet b = (Alphabet) gappedAlphabets.get(a); if (b == null) { if(a instanceof FiniteAlphabet) { b = new FiniteGappedAlphabet((FiniteAlphabet) a); } else { b = new G... |
return b; } | public Alphabet getGappedAlphabet(Alphabet a) { if (a.contains(gapResidue)) { return a; } Alphabet b = (Alphabet) gappedAlphabets.get(a); if (b == null) { if(a instanceof FiniteAlphabet) { b = new FiniteGappedAlphabet((FiniteAlphabet) a); } else { b = new G... | |
ChangeSupport cs = getChangeSupport(SymbolList.EDIT); | public void preChange(ChangeEvent cev) throws ChangeVetoException{ // let the listeners know that they have to be converted or veto the change; ChangeSupport cs = getChangeSupport(SymbolList.EDIT); // lets not bother making any changes if the edit would not effect us or our children Obje... | |
FeatureFilter membershipFilter = new FeatureFilter.And(new FeatureFilter.Not(new FeatureFilter.IsTopLevel()), | FeatureFilter membershipFilter = new FeatureFilter.And(new FeatureFilter.Not(FeatureFilter.top_level), | public FeatureHolder filter(FeatureFilter ff) { FeatureFilter membershipFilter = new FeatureFilter.And(new FeatureFilter.Not(new FeatureFilter.IsTopLevel()), new FeatureFilter.ContainedByLocation(getLocation())); if (FilterUtils.areDisjoint(ff, mem... |
registerFeatureFetcher(tileNum, new Object()); | registerFeatureFetcher(tileNum, null); | protected FeatureHolder getFeatures() { if (tileFeatures[tileNum] != null) { FeatureHolder fh = (FeatureHolder) tileFeatures[tileNum].get(); if (fh != null) { return fh; } } registerFeatureFetcher(tileNum, new Object()); try { featureTickets[tileNum].doFetch(); } catch (Exception ex) { th... |
throw new BioException("Not a DAS server: " + dataSourceURL); | throw new BioException("Not a DAS server: " + dataSourceURL + " Query: " + epURL); | public Set ids() { if (!gotAllIDs) { try { URL epURL = new URL(dataSourceURL, "entry_points"); HttpURLConnection huc = (HttpURLConnection) epURL.openConnection(); try { huc.connect(); } catch (Exception e) { throw new BioException(e, "Can't connect to " + epURL); } // int status = huc.getHeaderF... |
Gettypes_response response = port.getTypes(new Gettypes_request("8200")); | Gettypes_response response = port.getTypes(new Gettypes_request("1")); | public static void main(String[] args) { try { String endpoint = "http://213.167.155.148/WSFinanceDataGetTypes/WSFinanceDataGetTypes_GetTypes_SoapPort.asmx"; String endpoint2 = "http://213.167.155.148/WSFinanceDataGetState2/WSFinanceDataGetState2_GetState_SoapPort.asmx"; String endpoint3 = "http://213.167.155.1... |
Getstate_responseRecords state_records[] = state_port.getState(new GetStateRequest("1", "2707724049")); | Getstate_responseRecords state_records[] = state_port.getState(new GetStateRequest("8200", "2707724049")); | public static void main(String[] args) { try { String endpoint = "http://213.167.155.148/WSFinanceDataGetTypes/WSFinanceDataGetTypes_GetTypes_SoapPort.asmx"; String endpoint2 = "http://213.167.155.148/WSFinanceDataGetState2/WSFinanceDataGetState2_GetState_SoapPort.asmx"; String endpoint3 = "http://213.167.155.1... |
Getmovements_responseMovements movements[] = movement_port.getMovements(new Getmovements_request(1, "2707724049", "2005-12-01", "2006-03-01", 1)); | Getmovements_responseMovements movements[] = movement_port.getMovements(new Getmovements_request(8200, "2707724049", "2005-12-01", "2006-03-01", 1)); | public static void main(String[] args) { try { String endpoint = "http://213.167.155.148/WSFinanceDataGetTypes/WSFinanceDataGetTypes_GetTypes_SoapPort.asmx"; String endpoint2 = "http://213.167.155.148/WSFinanceDataGetState2/WSFinanceDataGetState2_GetState_SoapPort.asmx"; String endpoint3 = "http://213.167.155.1... |
this.weight = 1.0 / (double) alphabet.size(); | public UniformDistribution(FiniteAlphabet alphabet) { this.alphabet = alphabet; this.weight = 1.0 / (double) alphabet.size(); this.nullModel = this; } | |
return weight; | return 1.0 / (double) alphabet.size(); | public double getWeight(Symbol s) throws IllegalSymbolException { alphabet.validate(s); if(s instanceof AtomicSymbol) { return weight; } else { return getAmbiguityWeight(s); } } |
feature.getAnnotation().setProperty(anno2Tag, anno2Val); | 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... | |
String query2 = "SELECT name FROM term_synonym WHERE term_id = ?"; | String query2 = "SELECT synonym FROM term_synonym WHERE term_id = ?"; | private void loadTerms(Ontology ont, int id) throws SQLException, OntologyException, ChangeVetoException { Connection conn = source.getConnection(); String query = " SELECT term.term_id, term.name, term.definition, " + " term_relationship.term_relationship_id, " + " te... |
if (sourceTerm != OntoTools.ANY) { | if(source != null) { return source; } else if (sourceTerm != null) { | public String getSource() { if (sourceTerm != OntoTools.ANY) { return sourceTerm.getName(); } else { return source; } } |
return source; | return ""; | public String getSource() { if (sourceTerm != OntoTools.ANY) { return sourceTerm.getName(); } else { return source; } } |
if (typeTerm != OntoTools.ANY) { | if(type != null) { return type; } else if (typeTerm != null) { | public String getType() { if (typeTerm != OntoTools.ANY) { return typeTerm.getName(); } else { return type; } } |
return type; | return ""; | public String getType() { if (typeTerm != OntoTools.ANY) { return typeTerm.getName(); } else { return type; } } |
this.name = name; | public LazyFilteredAnnotationDB(String name, AnnotationDB source, AnnotationType schema) { this.name = name; this.source = source; this.schema = schema; } | |
Distribution nullModel = dist.getNullModel(); | public double getCount(Distribution dist, Symbol sym) throws IllegalSymbolException { DistributionTrainer dt = getTrainer(dist); if(dt == null) { throw new NullPointerException( "No trainer associated with distribution " + dist ); } if (sym instanceof AtomicSymbol) { return dt.getCo... | |
return new IntegerTokenization(); | return new SubIntegerTokenization(this); | public SymbolTokenization getTokenization(String name) { if(name.equals("token") || name.equals("default")){ return new IntegerTokenization(); }else{ throw new NoSuchElementException(name + " parser not supported by IntegerAlphabet yet"); } } |
for (int i = 0; i < syms.length; i++) | int end = start + length - 1; for (int i = start; i <= end; i++) | public void addSymbols(final Alphabet alpha, final Symbol [] syms, final int start, final int length) throws IllegalAlphabetException { int aCount = 0; int cCount = 0; int gCount = 0; int... |
int fullLine = syms.length / 60; int partLine = syms.length % 60; | int fullLine = length / 60; int partLine = length % 60; | public void addSymbols(final Alphabet alpha, final Symbol [] syms, final int start, final int length) throws IllegalAlphabetException { int aCount = 0; int cCount = 0; int gCount = 0; int... |
System.arraycopy(syms, (i * 60), sa, 0, len); | 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 { int aCount = 0; int cCount = 0; int gCount = 0; int... |
ComponentFeatureHandler.this.setFeatureProperty("sequence.id", s); | setFeatureProperty("sequence.id", s); | protected StAXContentHandler getComponentIDHandler() { return new StringElementHandlerBase() { protected void setStringValue(String s) throws SAXException { try { ComponentFeatureHandler.this.setFeatureProperty("sequence.id", s); } catch (Exception ex) { throw new SAXException("Couldn't set pr... |
ComponentFeatureHandler.this.setFeatureProperty("sequence.id", s); | setFeatureProperty("sequence.id", s); | protected void setStringValue(String s) throws SAXException { try { ComponentFeatureHandler.this.setFeatureProperty("sequence.id", s); } catch (Exception ex) { throw new SAXException("Couldn't set property", ex); } } |
if ( modnr > structure.nrModels() ) { | if ( modnr -1 > structure.nrModels() ) { | private void CHAINhandler(Attributes atts){ String model_nr = atts.getValue("model"); if ( model_nr != null ) { int modnr = Integer.parseInt(model_nr); //System.out.println("modnr: " + modnr) ; // if DAS server sets modelnr -> a NMR structure ... structure.setNmr(true); if ( modnr > structure.nr... |
+ "' which indicates alphabet type '" + alphaType | public static FiniteAlphabet fileToAlphabet(int fileType) throws BioException { // Mask the sequence format bytes int alphaType = fileType & (~ 0xffff); switch (alphaType) { case SeqIOConstants.DNA: return DNATools.getDNA(); case SeqIOConstants.RNA: ... | |
return getFastaBuilderFactory(); | case SeqIOConstants.FASTA_RNA: | public static SequenceBuilderFactory fileToFactory(int fileType) throws BioException { switch (fileType) { case SeqIOConstants.FASTA_DNA: return getFastaBuilderFactory(); case SeqIOConstants.FASTA_AA: return getFastaBuilderFactory(); case ... |
return new FastaFormat(); | case SeqIOConstants.FASTA_RNA: | public static SequenceFormat fileToFormat(int fileType) throws BioException { switch(fileType) { case SeqIOConstants.FASTA_DNA: return new FastaFormat(); case SeqIOConstants.FASTA_AA: return new FastaFormat(); case SeqIOConstants.EMBL: ... |
protected static Distribution getNullModel(Distribution source) { | protected static Distribution getNullModel(Distribution first, Distribution second) { | protected static Distribution getNullModel(Distribution source) { synchronized(cache) { SoftReference ref = (SoftReference) cache.get(source); Distribution dist; try { if(ref == null) { dist = new ComplementaryDistribution(source); cache.put(source, new SoftReference(dist));... |
SoftReference ref = (SoftReference) cache.get(source); | first = first.getNullModel(); second = second.getNullModel(); List distL = Arrays.asList(new Object [] { first, second } ); gopher.setList(distL); SoftReference ref = (SoftReference) cache.get(gopher); | protected static Distribution getNullModel(Distribution source) { synchronized(cache) { SoftReference ref = (SoftReference) cache.get(source); Distribution dist; try { if(ref == null) { dist = new ComplementaryDistribution(source); cache.put(source, new SoftReference(dist));... |
try { if(ref == null) { dist = new ComplementaryDistribution(source); cache.put(source, new SoftReference(dist)); } else { dist = (Distribution) ref.get(); if(dist == null) { dist = new ComplementaryDistribution(source); cache.put(source, new SoftReference(dist)); } | if(ref == null) { dist = new PairDistribution(first, second); cache.put(distL, new SoftReference(dist)); } else { dist = (Distribution) ref.get(); if(dist == null) { dist = new PairDistribution(first, second); cache.put(distL, new SoftReference(dist)); | protected static Distribution getNullModel(Distribution source) { synchronized(cache) { SoftReference ref = (SoftReference) cache.get(source); Distribution dist; try { if(ref == null) { dist = new ComplementaryDistribution(source); cache.put(source, new SoftReference(dist));... |
} catch (IllegalAlphabetException iae) { throw new BioError( iae, "The parent's null distribution is not complementable, " + "but the parent is. Something is wrong with the parent" ); | protected static Distribution getNullModel(Distribution source) { synchronized(cache) { SoftReference ref = (SoftReference) cache.get(source); Distribution dist; try { if(ref == null) { dist = new ComplementaryDistribution(source); cache.put(source, new SoftReference(dist));... | |
try { return alpha.getResidue(rList); } catch (IllegalAlphabetException iae) { throw new IllegalResidueException( "Unable to create residue because: " + iae.getMessage() ); } | return alpha.getResidue(rList); | public Residue parseToken(String token) throws IllegalResidueException { if(!token.startsWith("(") || !token.endsWith(")")) { throw new IllegalResidueException( "Can't parse " + token + " as it is not bracketed" ); } token = token.substring(1, token.length()-1).trim(); List rList... |
return Collections.EMPTY_MAP; | return new HashMap(); | public Map getArcsToOperators() { return Collections.EMPTY_MAP; } |
synchronized(this) { if (changeSupport == null) { changeSupport = new ChangeSupport(); | synchronized(this) { if (changeSupport == null) { changeSupport = new ChangeSupport(); } return changeSupport; | protected ChangeSupport getChangeSupport(ChangeType ct) { if(changeSupport != null) { return changeSupport; } synchronized(this) { if (changeSupport == null) { changeSupport = new ChangeSupport(); } return changeSupport; } } |
return changeSupport; } | protected ChangeSupport getChangeSupport(ChangeType ct) { if(changeSupport != null) { return changeSupport; } synchronized(this) { if (changeSupport == null) { changeSupport = new ChangeSupport(); } return changeSupport; } } | |
if (DATACLASS_TERM==null) DATACLASS_TERM = RichObjectFactory.getDefaultOntology().getOrCreateTerm("DATACLASS"); | if (DATACLASS_TERM==null) DATACLASS_TERM = RichObjectFactory.getDefaultOntology().getOrCreateTerm("dataclass"); | public static ComparableTerm getDataClassTerm() { if (DATACLASS_TERM==null) DATACLASS_TERM = RichObjectFactory.getDefaultOntology().getOrCreateTerm("DATACLASS"); return DATACLASS_TERM; } |
if (FTID_TERM==null) FTID_TERM = RichObjectFactory.getDefaultOntology().getOrCreateTerm("FTID"); | if (FTID_TERM==null) FTID_TERM = RichObjectFactory.getDefaultOntology().getOrCreateTerm("FTId"); | public static ComparableTerm getFTIdTerm() { if (FTID_TERM==null) FTID_TERM = RichObjectFactory.getDefaultOntology().getOrCreateTerm("FTID"); return FTID_TERM; } |
if (FEATUREDESC_TERM==null) FEATUREDESC_TERM = RichObjectFactory.getDefaultOntology().getOrCreateTerm("FEATUREDESC"); | if (FEATUREDESC_TERM==null) FEATUREDESC_TERM = RichObjectFactory.getDefaultOntology().getOrCreateTerm("description"); | public static ComparableTerm getFeatureDescTerm() { if (FEATUREDESC_TERM==null) FEATUREDESC_TERM = RichObjectFactory.getDefaultOntology().getOrCreateTerm("FEATUREDESC"); return FEATUREDESC_TERM; } |
if (GENENAME_TERM==null) GENENAME_TERM = RichObjectFactory.getDefaultOntology().getOrCreateTerm("GENENAME"); | if (GENENAME_TERM==null) GENENAME_TERM = RichObjectFactory.getDefaultOntology().getOrCreateTerm("gene"); | public static ComparableTerm getGeneNameTerm() { if (GENENAME_TERM==null) GENENAME_TERM = RichObjectFactory.getDefaultOntology().getOrCreateTerm("GENENAME"); return GENENAME_TERM; } |
if (UNIPROT_TERM==null) UNIPROT_TERM = RichObjectFactory.getDefaultOntology().getOrCreateTerm("UNIPROT"); | if (UNIPROT_TERM==null) UNIPROT_TERM = RichObjectFactory.getDefaultOntology().getOrCreateTerm("UniProt"); | public static ComparableTerm getUniProtTerm() { if (UNIPROT_TERM==null) UNIPROT_TERM = RichObjectFactory.getDefaultOntology().getOrCreateTerm("UNIPROT"); return UNIPROT_TERM; } |
return UniProt_FORMAT; | return UNIPROT_FORMAT; | public String getDefaultFormat() { return UniProt_FORMAT; } |
String regex = "^(\\S+)\\s+(\\S+);\\s+(\\S+);\\s+\\d+\\s+AA\\.$"; | String regex = "^((\\S+)_(\\S+))\\s+(\\S+);\\s+(PRT);\\s+\\d+\\s+AA\\.$"; | public boolean readRichSequence(BufferedReader reader, SymbolTokenization symParser, RichSeqIOListener rlistener, Namespace ns) throws IllegalSymbolException, IOException, ParseException { String line; boolean hasAnotherSequence = true; boolea... |
rlistener.setName(m.group(1)); rlistener.addSequenceProperty(Terms.getDataClassTerm(),m.group(2)); rlistener.addSequenceProperty(Terms.getMolTypeTerm(),m.group(3)); | rlistener.setName(m.group(2)); rlistener.setDivision(m.group(3)); rlistener.addSequenceProperty(Terms.getDataClassTerm(),m.group(4)); rlistener.addSequenceProperty(Terms.getMolTypeTerm(),m.group(5)); | public boolean readRichSequence(BufferedReader reader, SymbolTokenization symParser, RichSeqIOListener rlistener, Namespace ns) throws IllegalSymbolException, IOException, ParseException { String line; boolean hasAnotherSequence = true; boolea... |
String name = null; | String sciname = null; String comname = null; | public boolean readRichSequence(BufferedReader reader, SymbolTokenization symParser, RichSeqIOListener rlistener, Namespace ns) throws IllegalSymbolException, IOException, ParseException { String line; boolean hasAnotherSequence = true; boolea... |
if (tag.equals(SOURCE_TAG)) name = value; else if (tag.equals(TAXON_TAG)) { | if (tag.equals(SOURCE_TAG)) { String[] parts = value.split("\\("); sciname = parts[0].trim(); if (parts.length>1) { comname = parts[1].trim(); comname = comname.substring(0,comname.length()-2); } } else if (tag.equals(TAXON_TAG)) { | public boolean readRichSequence(BufferedReader reader, SymbolTokenization symParser, RichSeqIOListener rlistener, Namespace ns) throws IllegalSymbolException, IOException, ParseException { String line; boolean hasAnotherSequence = true; boolea... |
if (name!=null) tax.addName(NCBITaxon.SCIENTIFIC,name); | if (sciname!=null) tax.addName(NCBITaxon.SCIENTIFIC,sciname); if (comname!=null) tax.addName(NCBITaxon.COMMON,comname); | public boolean readRichSequence(BufferedReader reader, SymbolTokenization symParser, RichSeqIOListener rlistener, Namespace ns) throws IllegalSymbolException, IOException, ParseException { String line; boolean hasAnotherSequence = true; boolea... |
String date = ((String[])section.get(0))[1].trim().substring(0,11); | String value = ((String[])section.get(0))[1]; rlistener.addSequenceProperty(Terms.getDatesTerm(), value); String date = value.substring(0,11); | public boolean readRichSequence(BufferedReader reader, SymbolTokenization symParser, RichSeqIOListener rlistener, Namespace ns) throws IllegalSymbolException, IOException, ParseException { String line; boolean hasAnotherSequence = true; boolea... |
String[] gs = ((String[])section.get(0))[1].split("\\s+and\\s+"); | String[] gs = ((String[])section.get(0))[1].split("(\\s+or\\s+|\\s+and\\s+|;)"); | public boolean readRichSequence(BufferedReader reader, SymbolTokenization symParser, RichSeqIOListener rlistener, Namespace ns) throws IllegalSymbolException, IOException, ParseException { String line; boolean hasAnotherSequence = true; boolea... |
rlistener.addSequenceProperty(Terms.getGeneNameTerm(), gs[i].trim()); | String raw = gs[i].trim(); if (raw.length()==0) continue; String[] parts = raw.split("="); String[] moreparts = parts[1].split(","); for (int j = 0; j < moreparts.length; j++) rlistener.addSequenceProperty(Terms.getGeneNameTerm(), moreparts[j].trim()); | public boolean readRichSequence(BufferedReader reader, SymbolTokenization symParser, RichSeqIOListener rlistener, Namespace ns) throws IllegalSymbolException, IOException, ParseException { String line; boolean hasAnotherSequence = true; boolea... |
if (key.equals(REFERENCE_POSITION_TAG)) remark = val; | if (key.equals(REFERENCE_POSITION_TAG)) { Matcher m = rppat.matcher(val); if (m.matches()) { rstart = Integer.valueOf(m.group(1)); rend = Integer.valueOf(m.group(2)); } } if (key.equals(REMARK_TAG)) remark = val; | public boolean readRichSequence(BufferedReader reader, SymbolTokenization symParser, RichSeqIOListener rlistener, Namespace ns) throws IllegalSymbolException, IOException, ParseException { String line; boolean hasAnotherSequence = true; boolea... |
RankedDocRef rdr = new SimpleRankedDocRef(dr,null,null,ref_rank); | RankedDocRef rdr = new SimpleRankedDocRef(dr,rstart,rend,ref_rank); | public boolean readRichSequence(BufferedReader reader, SymbolTokenization symParser, RichSeqIOListener rlistener, Namespace ns) throws IllegalSymbolException, IOException, ParseException { String line; boolean hasAnotherSequence = true; boolea... |
Pattern p = Pattern.compile("\\s*(\\d+)\\s+(\\d+)(\\s+(\\S.*))?"); | Pattern p = Pattern.compile("\\s*([\\d\\?<]+)\\s+([\\d\\?>]+)(\\s+(\\S.*))?"); | public boolean readRichSequence(BufferedReader reader, SymbolTokenization symParser, RichSeqIOListener rlistener, Namespace ns) throws IllegalSymbolException, IOException, ParseException { String line; boolean hasAnotherSequence = true; boolea... |
templ.location = new SimpleRichLocation( new SimplePosition(false,false,Integer.parseInt(start)), new SimplePosition(false,false,Integer.parseInt(end)), 1); | templ.location = UniProtLocationParser.parseLocation(start, end); | public boolean readRichSequence(BufferedReader reader, SymbolTokenization symParser, RichSeqIOListener rlistener, Namespace ns) throws IllegalSymbolException, IOException, ParseException { String line; boolean hasAnotherSequence = true; boolea... |
if (line.substring(0,8).equals(COMMENT_TAG+" -!-")) currentVal.append(line.substring(9)); else { wasMisc = true; currentVal.append(line.substring(5)); } | if (!line.substring(0,8).equals(COMMENT_TAG+" -!-")) wasMisc = true; currentVal.append(line.substring(5)); | private List readSection(BufferedReader br) throws ParseException { List section = new ArrayList(); String line; String currKey = null; StringBuffer currVal = new StringBuffer(); boolean done = false; int linecount = 0; // while not done try { ... |
return areDisjointOneWay(a, b) || areDisjointOneWay(b, a); } | if(a.equals(b)) { return false; } if (a instanceof FeatureFilter.AcceptAllFilter || b instanceof FeatureFilter.AcceptAllFilter) { return false; } else if (a instanceof FeatureFilter.AcceptNoneFilter || b instanceof FeatureFilter.AcceptNoneFilter) { return true; } if (a instanceof FeatureFilter.And) { FeatureFilter.And... | public static boolean areDisjoint(FeatureFilter a, FeatureFilter b) { return areDisjointOneWay(a, b) || areDisjointOneWay(b, a); } |
if(sub.equals(sup)) { return true; | if(sub.equals(sup)) { return true; } if (sup instanceof FeatureFilter.AcceptAllFilter) { return true; } else if (sub instanceof FeatureFilter.AcceptAllFilter) { return false; } else if (sub instanceof FeatureFilter.AcceptNoneFilter) { return false; } else if (sup instanceof FeatureFilter.AcceptNoneFilter) { return fal... | public static boolean areProperSubset(FeatureFilter sub, FeatureFilter sup) { if(sub.equals(sup)) { return true; } if(sub instanceof OptimizableFilter) { return ((OptimizableFilter) sub).isProperSubset(sup); } return false; } |
if(sub instanceof OptimizableFilter) { return ((OptimizableFilter) sub).isProperSubset(sup); } return false; } | public static boolean areProperSubset(FeatureFilter sub, FeatureFilter sup) { if(sub.equals(sup)) { return true; } if(sub instanceof OptimizableFilter) { return ((OptimizableFilter) sub).isProperSubset(sup); } return false; } | |
public Symbol sampleSymbol() throws BioError { | public Symbol sampleSymbol() { | public Symbol sampleSymbol() throws BioError { double p = Math.random(); try { for(Iterator i = ((FiniteAlphabet) getAlphabet()).iterator(); i.hasNext(); ) { AtomicSymbol s = (AtomicSymbol) i.next(); p -= getWeight(s); if( p <= 0) { return s; } } StringBu... |
if (oldValue instanceof String) { newValue = ((String) oldValue) + " " + newValue.toString(); } else { | protected void addProperty(Annotation ann, Object key, Object value) { if (value == null) return; Object oldValue = null; Object newValue = value; try { oldValue = ann.getProperty(key); } catch (NoSuchElementException ex) {} if (oldValue != null) { if (oldValue instanceof String) { newValue = ((String)... | |
} | protected void addProperty(Annotation ann, Object key, Object value) { if (value == null) return; Object oldValue = null; Object newValue = value; try { oldValue = ann.getProperty(key); } catch (NoSuchElementException ex) {} if (oldValue != null) { if (oldValue instanceof String) { newValue = ((String)... | |
if ("(".equals(token)) | final Stack stack = (Stack) this.matrixStack .get(this.currentMatrixKey); if ("(".equals(token)) { final List newList = new ArrayList(); if (!stack.isEmpty()) ((Collection) stack.peek()).add(newList); else ((CharactersBlockListener) this.getBlockListener()) .appendMatrixData(this.currentMatrixKey, newList); | public void parseToken(String token) throws ParseException { final String trimmed = token.trim(); if (this.expectingMatrixContent && NexusFileFormat.NEW_LINE.equals(token)) { // Special handling for new lines inside matrix data. if (this.currentMatrixBracket != null) { ((CharactersBlockListener) this.getBl... |
.push(new ArrayList()); else if ("{".equals(token)) | .push(newList); } else if ("{".equals(token)) { final Set newSet = new LinkedHashSet(); if (!stack.isEmpty()) ((Collection) stack.peek()).add(newSet); else ((CharactersBlockListener) this.getBlockListener()) .appendMatrixData(this.currentMatrixKey, newSet); | public void parseToken(String token) throws ParseException { final String trimmed = token.trim(); if (this.expectingMatrixContent && NexusFileFormat.NEW_LINE.equals(token)) { // Special handling for new lines inside matrix data. if (this.currentMatrixBracket != null) { ((CharactersBlockListener) this.getBl... |
.push(new LinkedHashSet()); else if ((")".equals(token) || "}".equals(token)) | .push(newSet); } else if ((")".equals(token) || "}".equals(token)) | public void parseToken(String token) throws ParseException { final String trimmed = token.trim(); if (this.expectingMatrixContent && NexusFileFormat.NEW_LINE.equals(token)) { // Special handling for new lines inside matrix data. if (this.currentMatrixBracket != null) { ((CharactersBlockListener) this.getBl... |
((CharactersBlockListener) this.getBlockListener()) .appendMatrixData(this.currentMatrixKey, ((Stack) this.matrixStack .get(this.currentMatrixKey)).pop()); | stack.pop(); | public void parseToken(String token) throws ParseException { final String trimmed = token.trim(); if (this.expectingMatrixContent && NexusFileFormat.NEW_LINE.equals(token)) { // Special handling for new lines inside matrix data. if (this.currentMatrixBracket != null) { ((CharactersBlockListener) this.getBl... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.