C
- java.lang.Iterable<C>
, DatabaseReferenceInterface
, FeaturesKeyWordInterface
, Accessioned
, ProxySequenceReader<C>
, Sequence<C>
, SequenceReader<C>
public class UniprotProxySequenceReader<C extends Compound> extends java.lang.Object implements ProxySequenceReader<C>, FeaturesKeyWordInterface, DatabaseReferenceInterface
Modifier and Type | Field | Description |
---|---|---|
static java.util.regex.Pattern |
UP_AC_PATTERN |
Constructor | Description |
---|---|
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.
|
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.
|
Modifier and Type | Method | 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
- CompoundNotFoundException
java.io.IOException
- if problems while reading the UniProt XMLpublic UniprotProxySequenceReader(org.w3c.dom.Document document, CompoundSet<C> compoundSet) throws CompoundNotFoundException
document
- compoundSet
- CompoundNotFoundException
public static <C extends Compound> UniprotProxySequenceReader<C> parseUniprotXMLString(java.lang.String xml, CompoundSet<C> compoundSet)
xml
- compoundSet
- java.lang.Exception
public 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
- CompoundNotFoundException
public int getLength()
public C getCompoundAt(int position)
Sequence
getCompoundAt
in interface Sequence<C extends Compound>
position
- public int getIndexOf(C compound)
Sequence
getIndexOf
in interface Sequence<C extends Compound>
compound
- public int getLastIndexOf(C compound)
Sequence
getLastIndexOf
in interface Sequence<C extends Compound>
compound
- public java.lang.String toString()
toString
in class java.lang.Object
public java.lang.String getSequenceAsString()
Sequence
getSequenceAsString
in interface Sequence<C extends Compound>
public java.util.List<C> getAsList()
Sequence
public SequenceView<C> getInverse()
Sequence
getInverse
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)
Sequence
getSubSequence
in interface Sequence<C extends Compound>
bioBegin
- bioEnd
- public java.util.Iterator<C> iterator()
public CompoundSet<C> getCompoundSet()
Sequence
getCompoundSet
in interface Sequence<C extends Compound>
public AccessionID getAccession()
Accessioned
getAccession
in interface Accessioned
public java.util.ArrayList<AccessionID> getAccessions() throws javax.xml.xpath.XPathExpressionException
javax.xml.xpath.XPathExpressionException
public java.util.ArrayList<java.lang.String> getAliases() throws javax.xml.xpath.XPathExpressionException
javax.xml.xpath.XPathExpressionException
public int countCompounds(C... compounds)
Sequence
countCompounds
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 FeaturesKeyWordInterface
public java.util.LinkedHashMap<java.lang.String,java.util.ArrayList<DBReferenceInfo>> getDatabaseReferences()
getDatabaseReferences
in interface DatabaseReferenceInterface