C - public class UniprotProxySequenceReader<C extends Compound> extends java.lang.Object implements ProxySequenceReader<C>, FeaturesKeyWordInterface, DatabaseReferenceInterface
| Modifier and Type | Field and Description |
|---|---|
static java.util.regex.Pattern |
UP_AC_PATTERN |
| Constructor and Description |
|---|
UniprotProxySequenceReader(org.w3c.dom.Document document,
CompoundSet<C> compoundSet)
The xml is passed in as a DOM object so we know everything about the protein.
|
UniprotProxySequenceReader(java.lang.String accession,
CompoundSet<C> compoundSet)
The UniProt id is used to retrieve the UniProt XML which is then parsed as a DOM object
so we know everything about the protein.
|
| Modifier and Type | Method and Description |
|---|---|
int |
countCompounds(C... compounds)
Returns the number of times we found a compound in the Sequence
|
AccessionID |
getAccession()
Returns the AccessionID this location is currently bound with
|
java.util.ArrayList<AccessionID> |
getAccessions()
Pull uniprot accessions associated with this sequence
|
java.util.ArrayList<java.lang.String> |
getAliases()
Pull uniprot protein aliases associated with this sequence
|
java.util.List<C> |
getAsList()
Returns the Sequence as a List of compounds
|
C |
getCompoundAt(int position)
Returns the Compound at the given biological index
|
CompoundSet<C> |
getCompoundSet()
Gets the compound set used to back this Sequence
|
java.util.LinkedHashMap<java.lang.String,java.util.ArrayList<DBReferenceInfo>> |
getDatabaseReferences()
The Uniprot mappings to other database identifiers for this sequence
|
java.lang.String |
getGeneName()
Get the gene name associated with this sequence.
|
int |
getIndexOf(C compound)
Scans through the Sequence looking for the first occurrence of the given
compound
|
SequenceView<C> |
getInverse()
Does the right thing to get the inverse of the current
Sequence.
|
java.util.ArrayList<java.lang.String> |
getKeyWords()
Pull UniProt key words which is a mixed bag of words associated with this sequence
|
int |
getLastIndexOf(C compound)
Scans through the Sequence looking for the last occurrence of the given
compound
|
int |
getLength()
The sequence length
|
java.lang.String |
getOrganismName()
Get the organism name assigned to this sequence
|
java.lang.String |
getSequenceAsString()
Returns the String representation of the Sequence
|
java.lang.String |
getSequenceAsString(java.lang.Integer bioBegin,
java.lang.Integer bioEnd,
Strand strand) |
SequenceView<C> |
getSubSequence(java.lang.Integer bioBegin,
java.lang.Integer bioEnd)
Returns a portion of the sequence from the different positions.
|
static java.lang.String |
getUniprotbaseURL()
The current UniProt URL to deal with caching issues.
|
static java.lang.String |
getUniprotDirectoryCache()
Local directory cache of XML that can be downloaded
|
java.util.Iterator<C> |
iterator() |
static void |
main(java.lang.String[] args) |
static <C extends Compound> |
parseUniprotXMLString(java.lang.String xml,
CompoundSet<C> compoundSet)
The passed in xml is parsed as a DOM object so we know everything about the protein.
|
void |
setCompoundSet(CompoundSet<C> compoundSet) |
void |
setContents(java.lang.String sequence)
Once the sequence is retrieved set the contents and make sure everything this is valid
|
static void |
setUniprotbaseURL(java.lang.String aUniprotbaseURL) |
static void |
setUniprotDirectoryCache(java.lang.String aUniprotDirectoryCache) |
java.lang.String |
toString() |
public UniprotProxySequenceReader(java.lang.String accession,
CompoundSet<C> compoundSet)
throws CompoundNotFoundException,
java.io.IOException
accession - compoundSet - CompoundNotFoundExceptionjava.io.IOException - if problems while reading the UniProt XMLpublic UniprotProxySequenceReader(org.w3c.dom.Document document,
CompoundSet<C> compoundSet)
throws CompoundNotFoundException
document - compoundSet - CompoundNotFoundExceptionpublic static <C extends Compound> UniprotProxySequenceReader<C> parseUniprotXMLString(java.lang.String xml, CompoundSet<C> compoundSet)
xml - compoundSet - java.lang.Exceptionpublic void setCompoundSet(CompoundSet<C> compoundSet)
setCompoundSet in interface SequenceReader<C extends Compound>public void setContents(java.lang.String sequence)
throws CompoundNotFoundException
setContents in interface SequenceReader<C extends Compound>sequence - CompoundNotFoundExceptionpublic int getLength()
public C getCompoundAt(int position)
SequencegetCompoundAt in interface Sequence<C extends Compound>position - public int getIndexOf(C compound)
SequencegetIndexOf in interface Sequence<C extends Compound>compound - public int getLastIndexOf(C compound)
SequencegetLastIndexOf in interface Sequence<C extends Compound>compound - public java.lang.String toString()
toString in class java.lang.Objectpublic java.lang.String getSequenceAsString()
SequencegetSequenceAsString in interface Sequence<C extends Compound>public java.util.List<C> getAsList()
Sequencepublic SequenceView<C> getInverse()
SequencegetInverse in interface Sequence<C extends Compound>public java.lang.String getSequenceAsString(java.lang.Integer bioBegin,
java.lang.Integer bioEnd,
Strand strand)
bioBegin - bioEnd - strand - public SequenceView<C> getSubSequence(java.lang.Integer bioBegin, java.lang.Integer bioEnd)
SequencegetSubSequence in interface Sequence<C extends Compound>bioBegin - bioEnd - public java.util.Iterator<C> iterator()
public CompoundSet<C> getCompoundSet()
SequencegetCompoundSet in interface Sequence<C extends Compound>public AccessionID getAccession()
AccessionedgetAccession in interface Accessionedpublic java.util.ArrayList<AccessionID> getAccessions() throws javax.xml.xpath.XPathExpressionException
javax.xml.xpath.XPathExpressionExceptionpublic java.util.ArrayList<java.lang.String> getAliases()
throws javax.xml.xpath.XPathExpressionException
javax.xml.xpath.XPathExpressionExceptionpublic int countCompounds(C... compounds)
SequencecountCompounds in interface Sequence<C extends Compound>compounds - public static java.lang.String getUniprotbaseURL()
public static void setUniprotbaseURL(java.lang.String aUniprotbaseURL)
aUniprotbaseURL - the uniprotbaseURL to setpublic static java.lang.String getUniprotDirectoryCache()
public static void setUniprotDirectoryCache(java.lang.String aUniprotDirectoryCache)
aUniprotDirectoryCache - the uniprotDirectoryCache to setpublic static void main(java.lang.String[] args)
public java.lang.String getGeneName()
public java.lang.String getOrganismName()
public java.util.ArrayList<java.lang.String> getKeyWords()
getKeyWords in interface FeaturesKeyWordInterfacepublic java.util.LinkedHashMap<java.lang.String,java.util.ArrayList<DBReferenceInfo>> getDatabaseReferences()
getDatabaseReferences in interface DatabaseReferenceInterface