|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.biojava3.core.sequence.loader.UniprotProxySequenceReader<C>
C
- public class UniprotProxySequenceReader<C extends Compound>
Pass in a Uniprot ID and this ProxySequenceReader when passed to a ProteinSequence will get the sequence data and other data elements associated with the ProteinSequence by Uniprot. This is an example of how to map external databases of proteins and features to the BioJava3 ProteinSequence. Important to call @see setUniprotDirectoryCache to allow caching of XML files so they don't need to be reloaded each time. Does not manage cache.
Constructor Summary | |
---|---|
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. |
Method Summary | |
---|---|
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 |
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 |
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 |
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 unirpot URL to deal with caching issues. |
static String |
getUniprotDirectoryCache()
Local directory cache of XML that can be downloaded |
Iterator<C> |
iterator()
|
static void |
main(String[] args)
|
void |
setCompoundSet(CompoundSet<C> compoundSet)
|
void |
setContents(String sequence)
Once the sequence is retrieved set the contents and make sure everything this is valid |
static void |
setUniprotbaseURL(String aUniprotbaseURL)
|
static void |
setUniprotDirectoryCache(String aUniprotDirectoryCache)
|
String |
toString()
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public UniprotProxySequenceReader(String accession, CompoundSet<C> compoundSet) throws Exception
accession
- compoundSet
-
Exception
Method Detail |
---|
public void setCompoundSet(CompoundSet<C> compoundSet)
setCompoundSet
in interface SequenceReader<C extends Compound>
public void setContents(String sequence)
setContents
in interface SequenceReader<C extends Compound>
sequence
- public int getLength()
getLength
in interface Sequence<C extends Compound>
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 toString()
toString
in class Object
public String getSequenceAsString()
Sequence
getSequenceAsString
in interface Sequence<C extends Compound>
public List<C> getAsList()
Sequence
getAsList
in interface Sequence<C extends Compound>
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 Iterator<C> iterator()
iterator
in interface Iterable<C extends Compound>
public CompoundSet<C> getCompoundSet()
Sequence
getCompoundSet
in interface Sequence<C extends Compound>
public AccessionID getAccession()
Accessioned
getAccession
in interface Accessioned
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 static void main(String[] args)
public String getGeneName() throws Exception
Exception
public String getOrganismName() throws Exception
Exception
public ArrayList<String> getKeyWords() throws Exception
getKeyWords
in interface FeaturesKeyWordInterface
Exception
public LinkedHashMap<String,ArrayList<DBReferenceInfo>> getDatabaseReferences() throws Exception
getDatabaseReferences
in interface DatabaseReferenceInterface
Exception
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |