C
- public class UniprotProxySequenceReader<C extends Compound> extends Object implements ProxySequenceReader<C>, FeaturesKeyWordInterface, DatabaseReferenceInterface
Modifier and Type | Field and Description |
---|---|
static String |
DEFAULT_UNIPROT_BASE_URL |
static Pattern |
UP_AC_PATTERN |
Constructor and Description |
---|
UniprotProxySequenceReader(Document document,
CompoundSet<C> compoundSet)
The xml is passed in as a DOM object so we know everything about the protein.
|
UniprotProxySequenceReader(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
|
boolean |
equals(Object o) |
AccessionID |
getAccession()
Returns the AccessionID this location is currently bound with
|
ArrayList<AccessionID> |
getAccessions()
Pull uniprot accessions associated with this sequence
|
ArrayList<String> |
getAliases()
Pull uniprot protein aliases associated with this sequence
Provided for backwards compatibility now that we support both
gene and protein aliases via separate methods.
|
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
|
LinkedHashMap<String,ArrayList<DBReferenceInfo>> |
getDatabaseReferences()
The Uniprot mappings to other database identifiers for this sequence
|
ArrayList<String> |
getGeneAliases()
Pull uniprot gene aliases associated with this sequence
|
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.
|
ArrayList<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
|
String |
getOrganismName()
Get the organism name assigned to this sequence
|
ArrayList<String> |
getProteinAliases()
Pull uniprot protein aliases associated with this sequence
|
String |
getSequenceAsString()
Returns the String representation of the Sequence
|
String |
getSequenceAsString(Integer bioBegin,
Integer bioEnd,
Strand strand) |
SequenceView<C> |
getSubSequence(Integer bioBegin,
Integer bioEnd)
Returns a portion of the sequence from the different positions.
|
static String |
getUniprotbaseURL()
The current UniProt URL to deal with caching issues. www.uniprot.org is load balanced
but you can access pir.uniprot.org directly.
|
static String |
getUniprotDirectoryCache()
Local directory cache of XML that can be downloaded
|
int |
hashCode() |
Iterator<C> |
iterator() |
static void |
main(String[] args) |
static <C extends Compound> |
parseUniprotXMLString(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(String sequence)
Once the sequence is retrieved set the contents and make sure everything this is valid
Some uniprot records contain white space in the sequence.
|
static void |
setUniprotbaseURL(String aUniprotbaseURL) |
static void |
setUniprotDirectoryCache(String aUniprotDirectoryCache) |
String |
toString() |
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
forEach, spliterator
public static final Pattern UP_AC_PATTERN
public static final String DEFAULT_UNIPROT_BASE_URL
public UniprotProxySequenceReader(String accession, CompoundSet<C> compoundSet) throws CompoundNotFoundException, IOException
accession
- compoundSet
- CompoundNotFoundException
IOException
- if problems while reading the UniProt XMLpublic UniprotProxySequenceReader(Document document, CompoundSet<C> compoundSet) throws CompoundNotFoundException
document
- compoundSet
- CompoundNotFoundException
public static <C extends Compound> UniprotProxySequenceReader<C> parseUniprotXMLString(String xml, CompoundSet<C> compoundSet)
xml
- compoundSet
- Exception
public void setCompoundSet(CompoundSet<C> compoundSet)
setCompoundSet
in interface SequenceReader<C extends Compound>
public void setContents(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 String getSequenceAsString()
Sequence
getSequenceAsString
in interface Sequence<C extends Compound>
public List<C> getAsList()
Sequence
public SequenceView<C> getInverse()
Sequence
getInverse
in interface Sequence<C extends Compound>
public String getSequenceAsString(Integer bioBegin, Integer bioEnd, Strand strand)
bioBegin
- bioEnd
- strand
- public SequenceView<C> getSubSequence(Integer bioBegin, Integer bioEnd)
Sequence
getSubSequence
in interface Sequence<C extends Compound>
bioBegin
- bioEnd
- public CompoundSet<C> getCompoundSet()
Sequence
getCompoundSet
in interface Sequence<C extends Compound>
public AccessionID getAccession()
Accessioned
getAccession
in interface Accessioned
public ArrayList<AccessionID> getAccessions() throws XPathExpressionException
XPathExpressionException
public ArrayList<String> getAliases() throws XPathExpressionException
XPathExpressionException
public ArrayList<String> getProteinAliases() throws XPathExpressionException
XPathExpressionException
public ArrayList<String> getGeneAliases() throws XPathExpressionException
XPathExpressionException
public int countCompounds(C... compounds)
Sequence
countCompounds
in interface Sequence<C extends Compound>
compounds
- public static String getUniprotbaseURL()
public static void setUniprotbaseURL(String aUniprotbaseURL)
aUniprotbaseURL
- the uniprotbaseURL to setpublic static String getUniprotDirectoryCache()
public static void setUniprotDirectoryCache(String aUniprotDirectoryCache)
aUniprotDirectoryCache
- the uniprotDirectoryCache to setpublic String getGeneName()
public String getOrganismName()
public ArrayList<String> getKeyWords()
getKeyWords
in interface FeaturesKeyWordInterface
public LinkedHashMap<String,ArrayList<DBReferenceInfo>> getDatabaseReferences()
getDatabaseReferences
in interface DatabaseReferenceInterface
Copyright © 2000–2019 BioJava. All rights reserved.