org.blueprint.seqhound
Class SeqHound

java.lang.Object
|
+--org.blueprint.seqhound.SeqHound

public class SeqHound
extends java.lang.Object

This class provides a remote interface to the SeqHound database. It provides a core set of functionality for obtaining bioinformatics data using alphanumeric keys such as the taxonomy id, gene info identifier, accession number, and various other identifiers.


Field Summary
static int REPORT_ASN_TXT
          used by SHoundProteinReportSetDescription to specify the 'format' field.
static int REPORT_XML
          used by SHoundProteinReportSetDescription to specify the 'format' field.
 int SEQHOUND_ABNORMAL
          Possible error codes returned by this API.
 int SEQHOUND_ERROR
          Possible error codes returned by this API.
 int SEQHOUND_NULL
          Possible error codes returned by this API.
 int SEQHOUND_OK
          Possible error codes returned by this API.
 
Constructor Summary
SeqHound()
          Creates a SeqHound object and uses the default configuration file '.shoundremrc' and default log threshold 'INFO'.
SeqHound(java.lang.String config)
          Creates a SeqHound object and using the specified configuration file and the default log threshold 'INFO'.
SeqHound(java.lang.String config, java.lang.String logThreshold)
          Creates a SeqHound object using the specified configuration file and minimum level for logging.
 
Method Summary
protected  int _ParseError(java.lang.String content)
          determines whether seqhound server returned SEQHOUND_OK, SEQHOUND_ERROR, or SEQHOUND_NULL and returns the server response, else returns SEQHOUND_ABNORMAL.
protected  java.lang.String GetFunctionCall(java.lang.String func, java.lang.String args)
          Constructs the http call to seqrem.
protected  int ProcessContents(java.lang.String address, java.lang.StringBuffer result)
          takes a url address: http://server address/path to cgi?
protected  int ProcessContents(java.lang.String address, java.io.Writer out)
          takes a url address: http://server address/path to cgi?
 java.util.Hashtable ProcessRetStr(java.util.Hashtable h, java.lang.String str)
          Process the return string from server to a hashtable
 void setLogThreshold(java.lang.String minium)
          Set the threshold for logging.
 int SHound3DbWhat(int mmdbid)
          Finds out what kind of molecules are contained in a 3-D structure.
 boolean SHound3DExists(int mmdbid)
          Finds out whether a given structural ID (mmdbid) exists in the SeqHound database.
 int SHound3DFromGi(int gi)
          Get the MMDB identifier for a given gi
 int[] SHound3DFromGiList(int[] giList)
          Get an array of MMDB identifiers for a given gi array
 int[] SHound3DNeighboursFromGi(int gi, double eValue)
          Retrieves a list of protein BLAST neighbours possessing 3-D structure.
 int[] SHound3DNeighboursFromTaxID(int taxid, double eValue)
          Retrieves a list of protein BLAST neighbours possessing 3-D structure using a list of proteins belonging to a complete genome as a query.
 java.lang.String SHoundAccFromGi(int gi)
          Gets an accession value given a gi value.
 java.lang.String[] SHoundAccFromGiList(int[] giList)
          Retrieves a list of accession given a list of gi's
 int[] SHoundAllGenomes()
          Get an array of taxonomy identifiers for all complete genomes present in the SeqHound system.
 java.lang.String[] SHoundCDDIDFromGi(int gi)
          retrieves the domains for a specified gi.
 java.lang.String[] SHoundCDDIDFromGiList(int[] giList)
          retrieve the domain identifiers for a specified gi array
 float SHoundCDDScoreFromGi(int gi, java.lang.String cddid)
          Get the score for a Conserved domain database domain
 int[] SHoundChromosomeFromGenome(int taxid, int chromflags)
          Get all the chromosomes for a given taxonomy identifier and the molecule
 int[] SHoundChromosomeFromGenomeList(int[] taxList, int chromflags)
          Gets an array of chromosome identifiers for a given taxonomy list
 int[] SHoundDNAFromChromosome(int chromid)
          Get an array of dna gi's for a given chromosome identifier
 int[] SHoundDNAFromChromosomeList(int[] chromList)
          Get an array of dna gi's for an input of chromosome array
 int[] SHoundDNAFromOrganism(int taxid, int chromflags)
          Get an array of dna gi's for a given organism
 int[] SHoundDNAFromOrganismList(int[] taxList, int chromflags)
          Get an array of dna gi's for a given taxonomy array
 int SHoundDNAFromProtein(int gi)
          Get the dna gi fro a given gi
 int[] SHoundDNAFromProteinList(int[] giList)
          Get an array of dna gi for a given array of gi
 int[] SHoundDNAFromTaxID(int taxid)
          Get the DNA gi's for a given taxonomy id
 int[] SHoundDNAFromTaxIDIII(int taxid)
          Get the dna gi's for a given taxid.
 int[] SHoundDNAFromTaxIDList(int[] taxList)
          get an array of dna gi's for an array of taxonomy identifiers
 boolean SHoundExists(int gi)
          reports whether a given gi exists in the SeqHound database.
 int SHoundFindAcc(java.lang.String acc)
          Retrieves a gi from an accession value.
 int[] SHoundFindAccList(java.lang.String[] accList)
          Retrieves a list of gi's given a list of accession values.
 int SHoundFindName(java.lang.String name)
          Converts PDB, EMBL, Siwss-Prot, PIR sequence identifier into a GI.
 int[] SHoundFindNameList(java.lang.String[] nameList)
          Given a list of ID from PDB, SwissProt, or PIR sequence identifiers, retrieves a list of gi's.
 boolean SHoundFini()
          Clean up SeqHound
 int SHoundFirstOfRedundantGroupFromID(int group)
          Entrez collection of databases contains redundant entries i.e.
 int[] SHoundFirstOfRedundantGroupFromIDList(int[] group)
          Gets the gi of the best annotated sequence given an array of group id.
 java.lang.String SHoundGet3D(int mmdbid)
          Fetches ASN.1 representation of 3-D structure called Biostruc.
 java.lang.String SHoundGet3DfromPdbId(java.lang.String pdbid)
          Fetches ASN.1 representation of 3-D structure called Biostruc.
 java.lang.String SHoundGetAccFromRetiredGi(int gi)
          Returns accession number for the given retired gi.
 int[] SHoundGetAllTaxAncestors(int taxid)
          Retrieves all taxid (the whole subtree) above a given taxid
 int[] SHoundGetAllTaxProgeny(int taxid)
          operates on NCBI's taxonomy tree.
 java.lang.String SHoundGetBioseq(int gi)
          fetches a string formated in ASN representing a sequence information.
 java.lang.String SHoundGetBioseqList(int[] giList)
          Get a list of ASN.1 formatted sequence information and available annotations.
 java.lang.String SHoundGetBioseqSet(int gi)
          retrieves the fetches ASN.1 representation of a sequence called BioseqSet.
 java.lang.String SHoundGetBioseqSetList(int[] giList)
          retrieves a string contain the bioseqset for a list of gi's
 java.lang.String SHoundGetDefline(int gi)
          Defline contains the gi, accession number and other valuable information together with a short description of the sequence
 java.lang.String[] SHoundGetDeflineList(int[] giList)
          retrieves a list of defline lines
 java.lang.String[] SHoundGetDomainIdFromLabel(java.lang.String label)
          retrieves the domain id given a label
 java.lang.String[] SHoundGetDomainLabelFromDomainId(java.lang.String accession)
          Returns a short non-unique label given a domain for a Conserved Domain Database (CDD).
 java.lang.String SHoundGetDomainsFromGi(int gi)
          Fetches information about domains from the Conserved Domain Database (CDD) as assigned by Reverse Position Specific BLAST to a given protein sequence.
 java.lang.String SHoundGetDomainsFromGiWithEvalue(int gi, double eValue)
          Fetches information about domains from the Conserved Domain Database (CDD) as assigned by Reverse Position Specific BLAST to a given protein sequence.
 java.lang.String SHoundGetFasta(int gi)
          The FASTA format is widely used in bioinformatics community; it consists of a definition line, new line followed by a sequence terminated by a second new line.
 java.lang.String SHoundGetFastaFromRedundantGroupID(int gid)
          The FASTA format is widely used in bioinformatics community; it consists of a definition line, new line followed by a sequence terminated by a second new line.
 java.util.Hashtable SHoundGetFastaFromRedundantGroupIDKeyedList(int[] gidList)
          retrieves fasta list for the given redundant group id list
 java.util.Hashtable SHoundGetFastaKeyedList(int[] giList)
          retrieves fasta list for the given gilist
 java.lang.String[] SHoundGetFastaList(int[] giList)
          retrieves a list of fasta
 boolean SHoundGetFastaList(int[] giList, java.io.Writer out)
          writes a series of fasta data into a writer object pointed to by out.
 java.lang.String SHoundGetGenBankff(int gi)
          GenBank flat file contains comprehensive full annotation of a sequence.
 java.lang.String[] SHoundGetGenBankffList(int[] giList)
          retrieves an array of strings formated in genbank ff.
 int[] SHoundGetGisByDomainId(java.lang.String domain)
          retrieve the gi's having a domain id
 int[] SHoundGetGisByDomainIdAndEvalue(java.lang.String domain, double evalue)
          Fetches protein sequences on which a domain from the Conserved Domain Database (CDD) was identified by Reverse Position Specific BLAST.
 int[] SHoundGetGisByNumberOfDomains(int numdoms)
          retrieves all the gi's with the specified number of domains
 int SHoundGetLargestMMDBID()
          return the largest mmdbid
 java.lang.String SHoundGetPDB3D(int mmdbid)
          Retrieves an PDB representation of a 3-D structure
 int[] SHoundGetReferenceIDFromGi(int gi, int reftype)
          Retrieves the MUID or PMID for a given gi.
 int[] SHoundGetReferenceIDFromGiList(int[] giList, int reftype)
          Retrieves the MUID or PMID for a given gi.
 java.lang.String SHoundGetSeqEntry(int gi)
          Fetches ASN.1 representation of a sequence called SeqEntry.
 java.lang.String SHoundGetSeqEntryList(int[] giList)
          Retrieves a list of seqentry from a list of gi
 int[] SHoundGetTaxChildNodes(int taxid)
          operates on NCBI's taxonomy tree.
 int[] SHoundGetTaxChildNodesList(int[] taxList)
          Get the children taxonomy id of an array of taxid inputs
 java.lang.String SHoundGetTaxLineageFromTaxID(int taxid, java.lang.String type)
          fetches a taxonomy lineage in a specified form.
 java.lang.String SHoundGetTaxNameFromTaxID(int taxid)
          fetches a taxonomy name in scientific form
 java.lang.String SHoundGetTaxNameFromTaxIDByClass(int taxid, java.lang.String nameClass)
          gets a taxon name in a specified style
 int SHoundGetTaxParent(int taxid)
          Retrieve the tax id situated directly above a given tax id
 java.lang.String SHoundGetXML3D(int mmdbid)
          Retrieves an XML representation of a 3-D structure
 java.lang.String SHoundGetXMLBioseq(int gi)
          Get an XML Formated Bioseq structure which contains sequence information and all available annotations.
 java.lang.String SHoundGetXMLSeqEntry(int gi)
          retrieves the a XML formated string of a seqentry
 int[] SHoundGiFrom3D(int mmdbid, boolean ProteinOnly)
          retrieves the gi given a mmdbid
 int[] SHoundGiFrom3DList(int[] mmdbidList, boolean ProteinOnly)
          retrieve an array of gi's from the MMDB identifiers
 int[] SHoundGiFromCDDID(java.lang.String cddid)
          retrieves an array of gi with the domain specified by input
 int[] SHoundGiFromCDDIDList(java.lang.String[] cddidList)
          get the gi's with the specified domains
 int[] SHoundGiFromGOID(int go)
          retrieves an array of gi with specified the specified gene ontology identifier
 int[] SHoundGiFromGOIDAndECode(int goid, java.lang.String ecode)
          Return all the gi's with the given goid and evidence code.
 int[] SHoundGiFromGOIDList(int[] goList)
          retrieves an array of gis that have been annotated with the specified goid
 int[] SHoundGiFromGOIDListAndECode(int[] goList, java.lang.String ecode)
          retrieves an array of gis that have been annotated with the specified goid list and the evidence code
 int[] SHoundGiFromLLID(int llid)
          Get gi associated with a locuslink identifier
 int[] SHoundGiFromLLIDList(int[] llidList)
          get the gi's associated with the locuslink id
 int[] SHoundGiFromOMIM(int omimid)
          retrieves gi's from an omim
 int[] SHoundGiFromOMIMList(int[] omimList)
          retrieves gi's associated with a omim
 int SHoundGiFromPDBchain(java.lang.String pdbcode, java.lang.String chain)
          retrieve an array of gi's from the PDB identifiers
 int[] SHoundGiFromReferenceID(int refid, int reftype)
          Retrieves the gi's associated with a publication.
 int[] SHoundGiFromReferenceList(int[] refList, int reftype)
          Retrieves the gi's associated with a publication list.
 int[] SHoundGODBGetAllAncestors(int goid)
          retrieves all the ancestors (parents, grandparents ...) of a given gene ontology id.
 int[] SHoundGODBGetAllChildren(int goid)
          retrieve all children of a given gene ontology id
 int[] SHoundGODBGetChildrenOf(int goid)
          retrieves all the children of a given gene ontology id
 java.lang.String SHoundGODBGetClassification(int goid)
          retrieve the ontology classification for a given goid
 java.lang.String SHoundGODBGetNameByID(int goid)
          retrieves the name of a given goid
 int[] SHoundGODBGetParentOf(int goid)
          retrieves an array of the parents of a given goid
 int[] SHoundGODBGetRecordByReference(java.lang.String refType)
          retrieve the gene ontology id by geneontology reference type
 java.lang.String[] SHoundGOECodeFromGiAndGOID(int gi, int goid)
          Retrieves all the evidence code from locuslink for a given gi and gene ontology id.
 int[] SHoundGOIDFromGi(int gi)
          retrieves an array of goid for a specified gi
 int[] SHoundGOIDFromGiList(int[] giList)
          retrieves an array of goid for a specified array of gi's
 int[] SHoundGOIDFromRedundantGi(int gi)
          retrieve an array of goid from a redundant gi
 int[] SHoundGOIDFromRedundantGiList(int[] giList)
          retrieve an array of goid for a given array of gi's
 int[] SHoundGOPMIDFromGiAndGOID(int gi, int goid)
          Retrieves the PMID's in the LocusLink database for a given gi and gene ontology id.
 boolean SHoundInit(boolean NetEntrezOnToo, java.lang.String appname)
          Initializes the SeqHound object.
 boolean SHoundIsInited()
          Check if SeqHound has been initialized.
 boolean SHoundIsNetEntrezOn()
          Checks if net entrez is enabled.
 boolean SHoundIsNRFirst(int gi)
          Reports if a given GI identifier represents the best annotated version from a group of database entries referring to the same protein sequence (so called redundant proteins).
 boolean SHoundIsProtein(int gi)
          Deprecated. replaced by SHoundMoleculeType(int)
protected  boolean SHoundIsServerAlive(java.lang.String configServerKey, java.lang.String path, java.lang.String args)
          Sends an http call to the servers to determine if they are up.
 boolean SHoundIsTaxDeleted(int taxid)
          reports whether a taxid has been deleted from the tree
 boolean SHoundIsTaxMerged(int taxid)
          reports if a given taxonomy identifier has been renamed
 int[] SHoundLLIDFromGi(int gi)
          retrieves locuslink id for a given gi
 int[] SHoundLLIDFromGiList(int[] giList)
          retrievs locuslink id for a given gi array
 java.lang.String SHoundLocusFromGi(int gi)
          retrieves the locus for a given gi
protected  void SHoundLogError(java.util.logging.Level level, java.lang.String msg)
          Logs information/error into the log file.
 java.lang.String SHoundMoleculeType(int gi)
          determines the molecular type given a gi
 int[] SHoundMuidFrom3D(int mmdbid)
          Get the MUID for a given MMDB identifier
 int[] SHoundMuidFrom3DList(int[] giList)
          Get the MUID list for a given gi array
 int[] SHoundMuidFromGi(int gi)
          Deprecated. replaced by SHoundGetReferenceIDFromGi(int, int)
 int[] SHoundMuidFromGiList(int[] giList)
          Deprecated. replaced by SHoundGetReferenceIDFromGiList(int[], int)
 int[] SHoundNeighboursFromGi(int gi, double eValue, boolean bLimit)
          Retrieves a list of protein BLAST neighbours.
 int[] SHoundNeighboursFromGiList(int[] giList, double eValue, boolean bLimit)
          Retrieves a list of protein BLAST neighbours.
 int[] SHoundNeighboursFromTaxID(int taxid, double eValue)
          Retrieves a list of protein BLAST neighbours using a list of proteins belonging to a complete genome as a query.
 boolean SHoundNetEntrezInit(java.lang.String appname)
          Initializes net entrez.
 int[] SHoundOMIMFromGi(int gi)
          retrieves omim associated with a gi
 int[] SHoundOMIMFromGiList(int[] giList)
          get the associated omim for an array of gi's
 int[] SHoundProteinFromDNA(int gi)
          Get the protein gi for a given gi
 int[] SHoundProteinFromDNAList(int[] giList)
          Get an array of protein gi's given an array of gi's
 java.lang.String SHoundProteinReportSetDescription(int gi, int format)
          Get a protein report set description for a given gi.
 int[] SHoundProteinsFromChromosome(int chromid)
          Get the protein gi's for a given chromosome identifier
 int[] SHoundProteinsFromChromosomeList(int[] chromList)
          Get the protein gi's for an array of chromosome identifiers
 int[] SHoundProteinsFromOrganism(int taxid, int chromflags)
          Get the proteins for a given taxonomy.
 int[] SHoundProteinsFromOrganismList(int[] taxList, int chromflags)
          Get the protein gi's for a given taxonomy array, use bit notation for chromflags
 int[] SHoundProteinsFromTaxID(int taxid)
          Get the protein gi's for a given taxonomy
 int[] SHoundProteinsFromTaxIDIII(int taxid)
          Get an array of protein gi's for a given taxonomy identifier.
 int[] SHoundProteinsFromTaxIDList(int[] taxList)
          get an array of proteins from an array of taxonomy identifier
 int[] SHoundRedundantGroup(int gi)
          Gets all protein entries with the same sequence from the system
 int[] SHoundRedundantGroupFromID(int group)
          returns an array of gi's in the same group.
 int[] SHoundRedundantGroupFromIDList(int[] groupList)
          returns an array of redundant protein gi's for an array of redundant group id's.
 int SHoundRedundantGroupIDFromGi(int gi)
          Entrez collection of databases contains redundant entries i.e.
 int[] SHoundRedundantGroupIDFromGiList(int[] giList)
          Entrez collection of databases contains redundant entries i.e.
 java.util.Hashtable SHoundRedundantGroupKeyedList(int[] giList)
          Gets all protein entries with the same sequence from the system
 int[] SHoundRedundantGroupList(int[] giList)
          Gets all protein entries with the same sequence from the system
 java.lang.String SHoundSeqIdFromGi(int gi)
          Gets a SeqId object given a gi.
 java.lang.String SHoundSeqIdFromGiList(int[] giList)
          Get the SeqId's given a gi list.
 int SHoundSequenceLength(int gi)
          retrieves the length of a sequence.
 int SHoundTaxIDFrom3D(int mmdbid)
          Get a taxid for a given gi
 int[] SHoundTaxIDFrom3DList(int[] mmdbidList)
          Get an array of taxid from an array of MMDB identifier
 int SHoundTaxIDFromGi(int gi)
          Get the taxid for a given gi
 int[] SHoundTaxIDFromGiList(int[] giList)
          Get an array of taxonomy identifiers from an array of gi
 java.lang.String SHoundXMLBioseq(int gi)
          A wrap function to get an XML Formated Bioseq structure which contains sequence information and all available annotations.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

REPORT_XML

public static final int REPORT_XML
used by SHoundProteinReportSetDescription to specify the 'format' field. Results in a XML string.

See Also:
SHoundProteinReportSetDescription(int, int), Constant Field Values

REPORT_ASN_TXT

public static final int REPORT_ASN_TXT
used by SHoundProteinReportSetDescription to specify the 'format' field. Results in a protein report string.

See Also:
SHoundProteinReportSetDescription(int, int), Constant Field Values

SEQHOUND_ERROR

public final int SEQHOUND_ERROR
Possible error codes returned by this API. A server error occurred.

See Also:
Constant Field Values

SEQHOUND_NULL

public final int SEQHOUND_NULL
Possible error codes returned by this API. A null value was returned.

See Also:
Constant Field Values

SEQHOUND_OK

public final int SEQHOUND_OK
Possible error codes returned by this API. Everything was okay.

See Also:
Constant Field Values

SEQHOUND_ABNORMAL

public final int SEQHOUND_ABNORMAL
Possible error codes returned by this API. An unknown error.

See Also:
Constant Field Values
Constructor Detail

SeqHound

public SeqHound()
throws java.io.FileNotFoundException,
java.io.IOException
Creates a SeqHound object and uses the default configuration file '.shoundremrc' and default log threshold 'INFO'.
To specify your own configuration file, use corresponding constructor.

Throws:
java.io.FileNotFoundException - if the default configuration file is not found
java.io.IOException - if there is an I/O exception
See Also:
SeqHound(String),SeqHound(String, String)

SeqHound

public SeqHound(java.lang.String config)
throws java.io.FileNotFoundException,
java.io.IOException
Creates a SeqHound object and using the specified configuration file and the default log threshold 'INFO'.
To use the default configuration file, use the corresponding constructor.

Throws:
java.io.FileNotFoundException - if the default configuration file is not found
java.io.IOException - if there is an I/O exception
See Also:
SeqHound(),SeqHound(String, String)

SeqHound

public SeqHound(java.lang.String config,
java.lang.String logThreshold)
throws java.io.FileNotFoundException,
java.io.IOException
Creates a SeqHound object using the specified configuration file and minimum level for logging. Logging levels are as specified in java.util.logging.Level : SEVERE, WARNING, INFO, CONFIG, FINE, FINER, FINEST
To use the default configuration file, use the corresponding constructor.

Throws:
java.io.FileNotFoundException - if the default configuration file is not found
java.io.IOException - if there is an I/O exception
See Also:
SeqHound(),SeqHound(String)
Method Detail

SHoundLogError

protected void SHoundLogError(java.util.logging.Level level,
java.lang.String msg)
Logs information/error into the log file.


Parameters:
level - the level of the information or exception. There are 3 levels, SH_info, SH_warn, SH_severe
msg - the message to be logged

setLogThreshold

public void setLogThreshold(java.lang.String minium)
Set the threshold for logging. Messages at and above 'minimum' will get logged, below it, is not logged. 'minium' must be defined in java.util.logging.Level class: SEVERE, WARNING, INFO, CONFIG, FINE, FINER, FINEST, otherwise defaults to "INFO".


GetFunctionCall

protected java.lang.String GetFunctionCall(java.lang.String func,
java.lang.String args)
Constructs the http call to seqrem. Ex:
http://seqhound.mshri.on.ca?fnct=SeqHoundInit&IsNetEntrezOnToo=TRUE&appname=value


Parameters:
func - the function being called on the cgi server
args - the querystring arguments to send to the server
Returns:
the http call

_ParseError

protected int _ParseError(java.lang.String content)
determines whether seqhound server returned SEQHOUND_OK, SEQHOUND_ERROR, or SEQHOUND_NULL and returns the server response, else returns SEQHOUND_ABNORMAL.


Parameters:
content - the string to parse the return value from
See Also:
SEQHOUND_ERROR,SEQHOUND_NULL,SEQHOUND_ABNORMAL,SEQHOUND_OK

ProcessContents

protected int ProcessContents(java.lang.String address,
java.lang.StringBuffer result)
throws java.io.IOException,
java.net.MalformedURLException
takes a url address: http://server address/path to cgi?querystring and sends the call to the remote server. Then it gets the response from the server and determines the return value of the url. and return SEQHOUND_OK, SEQHOUND_NULL, SEQHOUND_ERROR based on the server response.


Parameters:
address - the http address
result - a buffer in which to save the return value from the server
Returns:
SEQHOUND_OK, SEQHOUND_ERROR, SEQHOUND_NULL
Throws:
java.io.IOException - if there is an I/O exception
java.net.MalformedURLException - if the address is not valid
See Also:
SEQHOUND_OK,SEQHOUND_NULL,SEQHOUND_ERROR

ProcessContents

protected int ProcessContents(java.lang.String address,
java.io.Writer out)
throws java.io.IOException,
java.net.MalformedURLException
takes a url address: http://server address/path to cgi?querystring and sends the call to the remote server. Then it gets the response from the server and determines the return value of the url. and return SEQHOUND_OK, SEQHOUND_NULL, SEQHOUND_ERROR based on the server response.


Parameters:
address - the http address
out - an output where the server response should be directed
Returns:
SEQHOUND_OK, SEQHOUND_ERROR, SEQHOUND_NULL
Throws:
java.io.IOException - if there is an I/O exception
java.net.MalformedURLException - if the address is not valid
See Also:
SEQHOUND_OK,SEQHOUND_NULL,SEQHOUND_ERROR

SHoundIsServerAlive

protected boolean SHoundIsServerAlive(java.lang.String configServerKey,
java.lang.String path,
java.lang.String args)
throws java.io.IOException
Sends an http call to the servers to determine if they are up.


Parameters:
configServerKey - the key that specifies which server to use
path - the path to the cgi-bin
args - the http querystring
Returns:
true/false, is the specified server up
Throws:
java.io.IOException - if there is an I/O Exception

SHoundInit

public boolean SHoundInit(boolean NetEntrezOnToo,
java.lang.String appname)
throws java.io.IOException
Initializes the SeqHound object. this function must be called before any other seqhound functions can be used. It tests for an active seqhound server and sets this object to use that server.


Parameters:
NetEntrezOnToo - turn on net entrez on
appname - the applicaton name
Returns:
true if SeqHound initialized properly, else false
Throws:
java.io.IOException - if an I/O Exception occurred

SHoundFini

public boolean SHoundFini()
throws java.io.IOException
Clean up SeqHound


Returns:
true
Throws:
java.io.IOException

SHoundIsNetEntrezOn

public boolean SHoundIsNetEntrezOn()
throws java.io.IOException
Checks if net entrez is enabled. Returns true if enabled, else returns false;


Returns:
true if net entrez enabled, else false
Throws:
java.io.IOException

SHoundIsInited

public boolean SHoundIsInited()
Check if SeqHound has been initialized.


Returns:
true if initialized, else false

SHoundNetEntrezInit

public boolean SHoundNetEntrezInit(java.lang.String appname)
throws java.io.IOException
Initializes net entrez.


Parameters:
appname - the application name
Returns:
true if net entrez initialized else, false
Throws:
java.io.IOException

SHoundFindAcc

public int SHoundFindAcc(java.lang.String acc)
throws java.io.IOException
Retrieves a gi from an accession value.


Parameters:
acc - the accession value
Returns:
the gi or a SEQHOUND_ERROR, SEQHOUND_NULL, SEQHOUND_ABNORMAL if not found
Throws:
java.io.IOException

SHoundFindAccList

public int[] SHoundFindAccList(java.lang.String[] accList)
throws java.io.IOException
Retrieves a list of gi's given a list of accession values.


Parameters:
accList - the list of accession values
Returns:
a list of gi's, or null
Throws:
java.io.IOException
See Also:
SHoundFindAcc(String)

SHoundFindName

public int SHoundFindName(java.lang.String name)
throws java.io.IOException
Converts PDB, EMBL, Siwss-Prot, PIR sequence identifier into a GI. Note thatEMBL shares accession numbers with GenBank. EMBL GenInfo identifiers may be returned using these accessions; for example SHoundFindAcc(X13776) will return GI 45269. EMBL also has its own identifiers (which the NCBI and SeqHound refer to as 'name'). So the same GI may be returned by SHoundFindName(PAAMIR).


Parameters:
name - the name
Returns:
gi or a negative value
Throws:
java.io.IOException

SHoundFindNameList

public int[] SHoundFindNameList(java.lang.String[] nameList)
throws java.io.IOException
Given a list of ID from PDB, SwissProt, or PIR sequence identifiers, retrieves a list of gi's. Note that EMBL shares accession numbers with GenBank. EMBL GenInfo identifiers may be returned using these accessions; for example SHoundFindAcc(X13776) will return GI 45269. EMBL also has its own identifiers (which the NCBI and SeqHound refer to as 'name'). So the same GI may be returned by SHoundFindName("PAAMIR").


Parameters:
nameList - the list of names
Returns:
list of gi's or null
Throws:
java.io.IOException
See Also:
SHoundFindName(String)

SHoundAccFromGi

public java.lang.String SHoundAccFromGi(int gi)
throws java.io.IOException
Gets an accession value given a gi value.


Parameters:
gi - the gi to look up
Returns:
the accession value
Throws:
java.io.IOException

SHoundAccFromGiList

public java.lang.String[] SHoundAccFromGiList(int[] giList)
throws java.io.IOException
Retrieves a list of accession given a list of gi's


Parameters:
giList - the list of gi's
Returns:
the list of accessions or null
Throws:
java.io.IOException
See Also:
SHoundAccFromGi(int)

SHoundSeqIdFromGi

public java.lang.String SHoundSeqIdFromGi(int gi)
throws java.io.IOException
Gets a SeqId object given a gi. SeqId object is an ASN formatted string with relevant gi information.


Parameters:
gi - the gi to retrieve the SeqId for
Returns:
the SeqId
Throws:
java.io.IOException

SHoundSeqIdFromGiList

public java.lang.String SHoundSeqIdFromGiList(int[] giList)
throws java.io.IOException
Get the SeqId's given a gi list. The SeqId's will be one big string formatted in ASN.


Parameters:
giList - the list of gi
Returns:
the ASN formatted string or null
Throws:
java.io.IOException
See Also:
SHoundSeqIdFromGi(int)

SHoundMoleculeType

public java.lang.String SHoundMoleculeType(int gi)
throws java.io.IOException
determines the molecular type given a gi


Parameters:
gi - the gi to be determined
Returns:
a string description of the molecule type. Possible values include: protein, DNA, RNA or a null
Throws:
java.io.IOException

SHoundSequenceLength

public int SHoundSequenceLength(int gi)
throws java.io.IOException
retrieves the length of a sequence.


Parameters:
gi - the sequence to get the length of
Returns:
the length of the sequence
Throws:
java.io.IOException

SHoundIsProtein

public boolean SHoundIsProtein(int gi)
throws java.io.IOException
Deprecated. replaced by SHoundMoleculeType(int)

Returns where a given gi is a protein or not.


Parameters:
gi - the gi to determine
Returns:
true if gi is protein, else false
Throws:
java.io.IOException

SHoundIsNRFirst

public boolean SHoundIsNRFirst(int gi)
throws java.io.IOException
Reports if a given GI identifier represents the best annotated version from a group of database entries referring to the same protein sequence (so called redundant proteins).


Parameters:
gi - the gi
Returns:
true if best annotated else false
Throws:
java.io.IOException

SHoundExists

public boolean SHoundExists(int gi)
throws java.io.IOException
reports whether a given gi exists in the SeqHound database.


Parameters:
gi - the gi to request
Returns:
true if the gi is present in SeqHound, else false
Throws:
java.io.IOException

SHound3DbWhat

public int SHound3DbWhat(int mmdbid)
throws java.io.IOException
Finds out what kind of molecules are contained in a 3-D structure.


Parameters:
mmdbid - the 3D structure ID
Returns:
1 is a polymer, 2 is a protein, 4 is a DNA, 8 is a heteroatom 16 is solvent, 32 is water, 64 is RNA, 138 is ion
Throws:
java.io.IOException

SHoundGetLargestMMDBID

public int SHoundGetLargestMMDBID()
throws java.io.IOException
return the largest mmdbid


Returns:
mmdbid the 3D structure ID
Throws:
java.io.IOException

SHound3DExists

public boolean SHound3DExists(int mmdbid)
throws java.io.IOException
Finds out whether a given structural ID (mmdbid) exists in the SeqHound database.


Parameters:
mmdbid - the structural ID
Returns:
true if in SeqHound, else false
Throws:
java.io.IOException

SHoundGOPMIDFromGiAndGOID

public int[] SHoundGOPMIDFromGiAndGOID(int gi,
int goid)
throws java.io.IOException
Retrieves the PMID's in the LocusLink database for a given gi and gene ontology id.


Parameters:
gi - the gene info id
goid - a geneontology id
Returns:
an array of PMID associated with the inputs
Throws:
java.io.IOException

SHoundGOECodeFromGiAndGOID

public java.lang.String[] SHoundGOECodeFromGiAndGOID(int gi,
int goid)
throws java.io.IOException
Retrieves all the evidence code from locuslink for a given gi and gene ontology id.


Parameters:
gi - the gi
goid - the gene ontology id
Returns:
an array of evidence code from the locuslink database.
Throws:
java.io.IOException

SHoundGetReferenceIDFromGi

public int[] SHoundGetReferenceIDFromGi(int gi,
int reftype)
throws java.io.IOException
Retrieves the MUID or PMID for a given gi.


Parameters:
gi - the gi
reftype - specifies whether to return PMID or MUID. Set reftype to 1 for MUID, 2 for PMID.
Returns:
an array of reference ids.
java.io.IOException

SHoundGetReferenceIDFromGiList

public int[] SHoundGetReferenceIDFromGiList(int[] giList,
int reftype)
throws java.io.IOException
Retrieves the MUID or PMID for a given gi.


Parameters:
giList - the gilist
reftype - specifies whether to return PMID or MUID. Set reftype to 1 for MUID, 2 for PMID.
Returns:
an array of reference ids.
java.io.IOException

SHoundGiFromReferenceID

public int[] SHoundGiFromReferenceID(int refid,
int reftype)
throws java.io.IOException
Retrieves the gi's associated with a publication.


Parameters:
refid - the publication id
reftype - the publication type. Set reftype to 1 if refid is a PMID Set reftype to 2 if refid is a MUID.
Returns:
an array of integers that are gis, or null
Throws:
java.io.IOException

SHoundGiFromReferenceList

public int[] SHoundGiFromReferenceList(int[] refList,
int reftype)
throws java.io.IOException
Retrieves the gi's associated with a publication list.


Parameters:
refList - the publication list
reftype - the publication type. Set reftype to 1 if refid is a PMID Set reftype to 2 if refid is a MUID.
Returns:
an array of integers that are gis, or null
Throws:
java.io.IOException

SHoundGetBioseq

public java.lang.String SHoundGetBioseq(int gi)
throws java.io.IOException
fetches a string formated in ASN representing a sequence information. The seqence information is called a Bioseq and it contains all the available annotation.


Parameters:
gi - the gi
Returns:
the string ASN Bioseq
Throws:
java.io.IOException

SHoundGetBioseqList

public java.lang.String SHoundGetBioseqList(int[] giList)
throws java.io.IOException
Get a list of ASN.1 formatted sequence information and available annotations.


Parameters:
giList - the list of gi
Returns:
a string ASN
Throws:
java.io.IOException
See Also:
SHoundGetBioseq(int)

SHoundGetXMLBioseq

public java.lang.String SHoundGetXMLBioseq(int gi)
throws java.io.IOException
Get an XML Formated Bioseq structure which contains sequence information and all available annotations.


Parameters:
gi - the gi
Returns:
the XML string
Throws:
java.io.IOException
See Also:
SHoundGetBioseq(int)

SHoundXMLBioseq

public java.lang.String SHoundXMLBioseq(int gi)
throws java.io.IOException
A wrap function to get an XML Formated Bioseq structure which contains sequence information and all available annotations. To consist with other remote APIs


Parameters:
gi - the gi
Returns:
the XML string
Throws:
java.io.IOException

SHoundGetSeqEntry

public java.lang.String SHoundGetSeqEntry(int gi)
throws java.io.IOException
Fetches ASN.1 representation of a sequence called SeqEntry. SeqEntry contains a single sequence or a group of sequences if they are logically related (e.g. gene and its protein product).


Parameters:
gi - the gi
Returns:
an XML formatted string represented the SeqEntry or null
Throws:
java.io.IOException

SHoundGetSeqEntryList

public java.lang.String SHoundGetSeqEntryList(int[] giList)
throws java.io.IOException
Retrieves a list of seqentry from a list of gi


Parameters:
giList - the gi list
Returns:
an ASN formated string containing the seqentry
Throws:
java.io.IOException
See Also:
SHoundGetSeqEntry(int)

SHoundGetXMLSeqEntry

public java.lang.String SHoundGetXMLSeqEntry(int gi)
throws java.io.IOException
retrieves the a XML formated string of a seqentry


Parameters:
gi - the gi
Returns:
the string in xml format
Throws:
java.io.IOException
See Also:
SHoundGetSeqEntry(int)

SHoundGetBioseqSet

public java.lang.String SHoundGetBioseqSet(int gi)
throws java.io.IOException
retrieves the fetches ASN.1 representation of a sequence called BioseqSet. BioseqSet exists only if there is more than one sequence in logical group of sequences (e.g. gene and its protein product).


Parameters:
gi - the gi
Returns:
an ASN formatted string containing the bioseqset
Throws:
java.io.IOException

SHoundGetBioseqSetList

public java.lang.String SHoundGetBioseqSetList(int[] giList)
throws java.io.IOException
retrieves a string contain the bioseqset for a list of gi's


Parameters:
giList - an array of gi's
Returns:
an ASN formated string
Throws:
java.io.IOException
See Also:
SHoundGetBioseqSet(int)

SHoundGetDefline

public java.lang.String SHoundGetDefline(int gi)
throws java.io.IOException
Defline contains the gi, accession number and other valuable information together with a short description of the sequence


Parameters:
gi - the gi
Returns:
the definition line
Throws:
java.io.IOException

SHoundGetDeflineList

public java.lang.String[] SHoundGetDeflineList(int[] giList)
throws java.io.IOException
retrieves a list of defline lines


Parameters:
giList - the array of gi's
Returns:
an array of deflines
Throws:
java.io.IOException
See Also:
SHoundGetDefline(int)

SHoundGetFasta

public java.lang.String SHoundGetFasta(int gi)
throws java.io.IOException
The FASTA format is widely used in bioinformatics community; it consists of a definition line, new line followed by a sequence terminated by a second new line.


Parameters:
gi - the gi
Returns:
a string fasta
Throws:
java.io.IOException

SHoundGetFastaList

public java.lang.String[] SHoundGetFastaList(int[] giList)
throws java.io.IOException
retrieves a list of fasta


Parameters:
giList - an array of gi's
Returns:
an array of fasta strings
Throws:
java.io.IOException
See Also:
SHoundGetFasta(int)

SHoundGetFastaList

public boolean SHoundGetFastaList(int[] giList,
java.io.Writer out)
throws java.io.IOException
writes a series of fasta data into a writer object pointed to by out. Use this function to print a list of fasta data to a file.


Parameters:
giList - array of gi's
out - the writer object
Returns:
true if successfully wrote to out, else false
Throws:
java.io.IOException
See Also:
SHoundGetFastaList(int[])

SHoundGetGenBankff

public java.lang.String SHoundGetGenBankff(int gi)
throws java.io.IOException
GenBank flat file contains comprehensive full annotation of a sequence.


Parameters:
gi - the gi to retrieve
Returns:
a string of the genbank format
Throws:
java.io.IOException

SHoundGetGenBankffList

public java.lang.String[] SHoundGetGenBankffList(int[] giList)
throws java.io.IOException
retrieves an array of strings formated in genbank ff.


Parameters:
giList - an array of gi's
Returns:
an array of genbank ff
Throws:
java.io.IOException
See Also:
SHoundGetGenBankff(int)

SHoundGet3D

public java.lang.String SHoundGet3D(int mmdbid)
throws java.io.IOException
Fetches ASN.1 representation of 3-D structure called Biostruc. Biostrucs represent data model in Molecular Modeling database.


Parameters:
mmdbid - the mmdb id
Returns:
a string ASN.1 formated 3-D biostruc
Throws:
java.io.IOException

SHoundGet3DfromPdbId

public java.lang.String SHoundGet3DfromPdbId(java.lang.String pdbid)
throws java.io.IOException
Fetches ASN.1 representation of 3-D structure called Biostruc. Biostrucs represent data model in Molecular Modeling database.


Parameters:
pdbid - the PDB identifier
Returns:
a string ASN.1 representation
Throws:
java.io.IOException

SHoundGetXML3D

public java.lang.String SHoundGetXML3D(int mmdbid)
throws java.io.IOException
Retrieves an XML representation of a 3-D structure


Parameters:
mmdbid - the MMDB identifier
Returns:
a string XML formated biostruc
Throws:
java.io.IOException

SHoundGetPDB3D

public java.lang.String SHoundGetPDB3D(int mmdbid)
throws java.io.IOException
Retrieves an PDB representation of a 3-D structure


Parameters:
mmdbid - the MMDB identifier
Returns:
a string PDB formated biostruc
Throws:
java.io.IOException

SHoundGiFrom3D

public int[] SHoundGiFrom3D(int mmdbid,
boolean ProteinOnly)
throws java.io.IOException
retrieves the gi given a mmdbid


Parameters:
mmdbid - the MMDB identifier
ProteinOnly - get the protein gi
Returns:
an array of the gi's in the 3 D structure
Throws:
java.io.IOException

SHoundGiFrom3DList

public int[] SHoundGiFrom3DList(int[] mmdbidList,
boolean ProteinOnly)
throws java.io.IOException
retrieve an array of gi's from the MMDB identifiers


Parameters:
mmdbidList - the list of MMDB identifiers
ProteinOnly - protein or non-protein gi's to retrieve
Returns:
array of gi's
Throws:
java.io.IOException
See Also:
SHoundGiFrom3D(int, boolean)

SHoundGiFromPDBchain

public int SHoundGiFromPDBchain(java.lang.String pdbcode,
java.lang.String chain)
throws java.io.IOException
retrieve an array of gi's from the PDB identifiers


Parameters:
pdbcode - the PDB identifier
chain - the chain on the PDB structure
Returns:
gi in the chain, -1 if not found or zero
Throws:
java.io.IOException
See Also:
SHoundGiFromPDBchain(String, String)

SHound3DFromGi

public int SHound3DFromGi(int gi)
throws java.io.IOException
Get the MMDB identifier for a given gi


Parameters:
gi - the gi
Returns:
an MMDB identifier or -1 or zero
Throws:
java.io.IOException

SHound3DFromGiList

public int[] SHound3DFromGiList(int[] giList)
throws java.io.IOException
Get an array of MMDB identifiers for a given gi array


Parameters:
giList - the array of gi's
Returns:
an array of MMDB identifier or null
Throws:
java.io.IOException

SHoundDNAFromProtein

public int SHoundDNAFromProtein(int gi)
throws java.io.IOException
Get the dna gi fro a given gi


Parameters:
gi - the gi
Returns:
the corresponding dna gi
Throws:
java.io.IOException

SHoundDNAFromProteinList

public int[] SHoundDNAFromProteinList(int[] giList)
throws java.io.IOException
Get an array of dna gi for a given array of gi


Parameters:
giList - the array of gi
Returns:
an array of dna gi or null
Throws:
java.io.IOException
See Also:
SHoundDNAFromProtein(int)

SHoundProteinFromDNA

public int[] SHoundProteinFromDNA(int gi)
throws java.io.IOException
Get the protein gi for a given gi


Parameters:
gi - the gi
Returns:
a protein gi
Throws:
java.io.IOException

SHoundProteinFromDNAList

public int[] SHoundProteinFromDNAList(int[] giList)
throws java.io.IOException
Get an array of protein gi's given an array of gi's


Parameters:
giList - the array of gi
Returns:
an array of gi's
Throws:
java.io.IOException
See Also:
SHoundProteinFromDNA(int)

SHoundMuidFromGi

public int[] SHoundMuidFromGi(int gi)
throws java.io.IOException
Deprecated. replaced by SHoundGetReferenceIDFromGi(int, int)

Get the MUID for a given gi


Parameters:
gi - the gi
Returns:
an array of MUID or -1 or zero
Throws:
java.io.IOException

SHoundMuidFromGiList

public int[] SHoundMuidFromGiList(int[] giList)
throws java.io.IOException
Deprecated. replaced by SHoundGetReferenceIDFromGiList(int[], int)

Get the MUIDs for a given array of gi's


Parameters:
giList - the gi array
Returns:
an array of MUID or null
Throws:
java.io.IOException

SHoundMuidFrom3D

public int[] SHoundMuidFrom3D(int mmdbid)
throws java.io.IOException
Get the MUID for a given MMDB identifier


Parameters:
mmdbid - MMDB identifier
Returns:
an MUID or -1 or zero
Throws:
java.io.IOException

SHoundMuidFrom3DList

public int[] SHoundMuidFrom3DList(int[] giList)
throws java.io.IOException
Get the MUID list for a given gi array


Parameters:
giList - the gi array
Returns:
an MUID array or null
Throws:
java.io.IOException

SHoundTaxIDFromGi

public int SHoundTaxIDFromGi(int gi)
throws java.io.IOException
Get the taxid for a given gi


Parameters:
gi - the gi
Returns:
an taxonomy identifier or -1 or zero
Throws:
java.io.IOException

SHoundTaxIDFromGiList

public int[] SHoundTaxIDFromGiList(int[] giList)
throws java.io.IOException
Get an array of taxonomy identifiers from an array of gi


Parameters:
giList - an array of gi's
Returns:
an array of taxonomy id's or null
Throws:
java.io.IOException
See Also:
SHoundTaxIDFromGi(int)

SHoundTaxIDFrom3D

public int SHoundTaxIDFrom3D(int mmdbid)
throws java.io.IOException
Get a taxid for a given gi


Parameters:
mmdbid - the gi
Returns:
an taxid
Throws:
java.io.IOException

SHoundTaxIDFrom3DList

public int[] SHoundTaxIDFrom3DList(int[] mmdbidList)
throws java.io.IOException
Get an array of taxid from an array of MMDB identifier


Parameters:
mmdbidList - an array of MMDB identifier
Returns:
an array of taxonomy identifier
Throws:
java.io.IOException
See Also:
SHoundTaxIDFrom3D(int)

SHoundProteinsFromTaxID

public int[] SHoundProteinsFromTaxID(int taxid)
throws java.io.IOException
Get the protein gi's for a given taxonomy


Parameters:
taxid - the taxonomy identifier
Returns:
an array of protein gi's
Throws:
java.io.IOException

SHoundProteinsFromTaxIDList

public int[] SHoundProteinsFromTaxIDList(int[] taxList)
throws java.io.IOException
get an array of proteins from an array of taxonomy identifier


Parameters:
taxList - the array of taxonomy
Returns:
an array of protein gi's
Throws:
java.io.IOException

SHoundProteinsFromTaxIDIII

public int[] SHoundProteinsFromTaxIDIII(int taxid)
throws java.io.IOException
Get an array of protein gi's for a given taxonomy identifier. Uses precomputed searches if appropriate, to speed up the search.


Parameters:
taxid - the given taxonomy identifier
Returns:
an array of taxonomy identifier
Throws:
java.io.IOException

SHoundDNAFromTaxID

public int[] SHoundDNAFromTaxID(int taxid)
throws java.io.IOException
Get the DNA gi's for a given taxonomy id


Parameters:
taxid - the taxonomy identifier
Returns:
an array of dna gi's
Throws:
java.io.IOException

SHoundDNAFromTaxIDList

public int[] SHoundDNAFromTaxIDList(int[] taxList)
throws java.io.IOException
get an array of dna gi's for an array of taxonomy identifiers


Parameters:
taxList - an array of taxid
Returns:
an array of dna gi's
Throws:
java.io.IOException

SHoundDNAFromTaxIDIII

public int[] SHoundDNAFromTaxIDIII(int taxid)
throws java.io.IOException
Get the dna gi's for a given taxid. Uses precomputed searches to speed up search where appropriate.


Parameters:
taxid -
Returns:
an array of DNA gi's
Throws:
java.io.IOException

SHoundProteinsFromOrganism

public int[] SHoundProteinsFromOrganism(int taxid,
int chromflags)
throws java.io.IOException
Get the proteins for a given taxonomy. Chromflags is the DNA molecule type, where each bit is reserved for one kind of DNA molecule.


Parameters:
taxid - the taxonomy identifier
chromflags - use hex notations: 0x40 for phage, 0x10 extra-chromosomal, 0x08 plasmid, 0x04 chloroplast, 0x02 mitochondrion, 0x01 chromosome, 0xFF all
Returns:
an array of protein gi's
Throws:
java.io.IOException

SHoundProteinsFromOrganismList

public int[] SHoundProteinsFromOrganismList(int[] taxList,
int chromflags)
throws java.io.IOException
Get the protein gi's for a given taxonomy array, use bit notation for chromflags


Parameters:
taxList - the array of taxonomy identifier
chromflags - see SHoundProteinsFromOrganism(int, int)
Returns:
an array of protein identifiers
Throws:
java.io.IOException

SHoundProteinsFromChromosome

public int[] SHoundProteinsFromChromosome(int chromid)
throws java.io.IOException
Get the protein gi's for a given chromosome identifier


Parameters:
chromid - the chromosome identifier
Returns:
an array of protein gi's
Throws:
java.io.IOException

SHoundProteinsFromChromosomeList

public int[] SHoundProteinsFromChromosomeList(int[] chromList)
throws java.io.IOException
Get the protein gi's for an array of chromosome identifiers


Parameters:
chromList - an array of chromosomes
Returns:
an array of protein gi's
Throws:
java.io.IOException

SHoundAllGenomes

public int[] SHoundAllGenomes()
throws java.io.IOException
Get an array of taxonomy identifiers for all complete genomes present in the SeqHound system.


Returns:
an array of taxonomy identifiers
Throws:
java.io.IOException

SHoundChromosomeFromGenome

public int[] SHoundChromosomeFromGenome(int taxid,
int chromflags)
throws java.io.IOException
Get all the chromosomes for a given taxonomy identifier and the molecule


Parameters:
taxid - the taxonomy identifier
chromflags - see SHoundProteinsFromOrganism(int, int)
Returns:
an array of chromsome identifier or null
Throws:
java.io.IOException

SHoundChromosomeFromGenomeList

public int[] SHoundChromosomeFromGenomeList(int[] taxList,
int chromflags)
throws java.io.IOException
Gets an array of chromosome identifiers for a given taxonomy list


Parameters:
taxList - the taxonomy list
chromflags - see SHoundProteinsFromOrganism(int, int)
Returns:
an array of chromosome identifiers
Throws:
java.io.IOException

SHoundDNAFromOrganism

public int[] SHoundDNAFromOrganism(int taxid,
int chromflags)
throws java.io.IOException
Get an array of dna gi's for a given organism


Parameters:
taxid - the taxonomy identifier
chromflags - see SHoundProteinsFromOrganism(int, int)
Returns:
array of dna identifier
Throws:
java.io.IOException

SHoundDNAFromOrganismList

public int[] SHoundDNAFromOrganismList(int[] taxList,
int chromflags)
throws java.io.IOException
Get an array of dna gi's for a given taxonomy array


Parameters:
taxList - the taxonomy array
chromflags - see SHoundProteinsFromOrganism(int, int)
Returns:
an array of DNA gi's
Throws:
java.io.IOException

SHoundDNAFromChromosome

public int[] SHoundDNAFromChromosome(int chromid)
throws java.io.IOException
Get an array of dna gi's for a given chromosome identifier


Parameters:
chromid - the chromosome identifier
Returns:
an array fo dna gi's
Throws:
java.io.IOException

SHoundDNAFromChromosomeList

public int[] SHoundDNAFromChromosomeList(int[] chromList)
throws java.io.IOException
Get an array of dna gi's for an input of chromosome array


Parameters:
chromList - an array of chromsome identifiers
Returns:
an array of dna gi's
Throws:
java.io.IOException

SHoundRedundantGroup

public int[] SHoundRedundantGroup(int gi)
throws java.io.IOException
Gets all protein entries with the same sequence from the system


Parameters:
gi - the gi
Returns:
an array of protein gi's
Throws:
java.io.IOException

SHoundRedundantGroupList

public int[] SHoundRedundantGroupList(int[] giList)
throws java.io.IOException
Gets all protein entries with the same sequence from the system


Parameters:
giList -
Returns:
an array of protein gi's
Throws:
java.io.IOException

SHoundRedundantGroupIDFromGi

public int SHoundRedundantGroupIDFromGi(int gi)
throws java.io.IOException
Entrez collection of databases contains redundant entries i.e. proteins with the same sequence but different annotations. The function gets an arbitrary redundant group identifier for a protein sequence. The redundant group identifiers can only be used temporarily, they change every day.


Parameters:
gi - the gi
Returns:
a temporary group id
Throws:
java.io.IOException

SHoundRedundantGroupIDFromGiList

public int[] SHoundRedundantGroupIDFromGiList(int[] giList)
throws java.io.IOException
Entrez collection of databases contains redundant entries i.e. proteins with the same sequence but different annotations. The function gets an arbitrary redundant group identifier for a list of protein sequences. The redundant group identifiers can only be used temporarily, they change every day.


Parameters:
giList - an arrary of gi
Returns:
an array of group id
Throws:
java.io.IOException

SHoundRedundantGroupFromID

public int[] SHoundRedundantGroupFromID(int group)
throws java.io.IOException
returns an array of gi's in the same group. The group id changes everyday


Parameters:
group - id the group identifier
Returns:
array of gi in the same group
Throws:
java.io.IOException

SHoundRedundantGroupFromIDList

public int[] SHoundRedundantGroupFromIDList(int[] groupList)
throws java.io.IOException
returns an array of redundant protein gi's for an array of redundant group id's. The group id's change daily.


Parameters:
groupList - an array of group id
Returns:
an array of redundant protein gi's
Throws:
java.io.IOException

SHoundFirstOfRedundantGroupFromID

public int SHoundFirstOfRedundantGroupFromID(int group)
throws java.io.IOException
Entrez collection of databases contains redundant entries i.e. proteins with the same sequence but different annotations. The function gets a representative entry (generally the one with best annotation such as PDB, RefSeq or SwissProt entry) given a redundant group identifier. The redundant group identifiers can only be used temporarily, they change every day.


Parameters:
group - the group id
Returns:
the best annotation gi for a given group
Throws:
java.io.IOException

SHoundFirstOfRedundantGroupFromIDList

public int[] SHoundFirstOfRedundantGroupFromIDList(int[] group)
throws java.io.IOException
Gets the gi of the best annotated sequence given an array of group id.


Parameters:
group - array of group identifier
Returns:
an array of the best annotated gi
Throws:
java.io.IOException

SHoundGetTaxChildNodes

public int[] SHoundGetTaxChildNodes(int taxid)
throws java.io.IOException
operates on NCBI's taxonomy tree. It retrieves all taxons situated directly below a given taxon in the taxonomy tree.


Parameters:
taxid - the taxonomy
Returns:
an array of taxonomy id that are children of taxid
Throws:
java.io.IOException

SHoundGetTaxChildNodesList

public int[] SHoundGetTaxChildNodesList(int[] taxList)
throws java.io.IOException
Get the children taxonomy id of an array of taxid inputs


Parameters:
taxList - an array of taxonomy
Returns:
an array of taxonomy id
Throws:
java.io.IOException

SHoundGetAllTaxProgeny

public int[] SHoundGetAllTaxProgeny(int taxid)
throws java.io.IOException
operates on NCBI's taxonomy tree. It retrieves all taxons (the whole subtree) situated below a given taxon in the taxonomy tree.


Parameters:
taxid - the taxonomy id
Returns:
an array of taxid
Throws:
java.io.IOException

SHoundGetTaxParent

public int SHoundGetTaxParent(int taxid)
throws java.io.IOException
Retrieve the tax id situated directly above a given tax id


Parameters:
taxid - a taxonomy identifier
Returns:
a taxid
Throws:
java.io.IOException

SHoundGetAllTaxAncestors

public int[] SHoundGetAllTaxAncestors(int taxid)
throws java.io.IOException
Retrieves all taxid (the whole subtree) above a given taxid


Parameters:
taxid - a taxonomy identifier
Returns:
a taxonomy identifier
Throws:
java.io.IOException

SHoundIsTaxMerged

public boolean SHoundIsTaxMerged(int taxid)
throws java.io.IOException
reports if a given taxonomy identifier has been renamed


Parameters:
taxid - a taxonomy identifier
Returns:
true if taxid has been renamed, else false
Throws:
java.io.IOException

SHoundIsTaxDeleted

public boolean SHoundIsTaxDeleted(int taxid)
throws java.io.IOException
reports whether a taxid has been deleted from the tree


Parameters:
taxid - an taxon id
Returns:
true if taxid deleted, else false
Throws:
java.io.IOException

SHoundGetTaxNameFromTaxIDByClass

public java.lang.String SHoundGetTaxNameFromTaxIDByClass(int taxid,
java.lang.String nameClass)
throws java.io.IOException
gets a taxon name in a specified style


Parameters:
taxid - a taxonomy identifier
nameClass - one of:
SLRI_taxon_name_name_class_none
SLRI_taxon_name_name_class_acronym
SLRI_taxon_name_name_class_anamorph
SLRI_taxon_name_name_class_blast_name
SLRI_taxon_name_name_class_common_name
SLRI_taxon_name_name_class_equivalent_name
SLRI_taxon_name_name_class_includes
SLRI_taxon_name_name_class_in_part
SLRI_taxon_name_name_class_misnomer
SLRI_taxon_name_name_class_misspelling
SLRI_taxon_name_name_class_preferred_acronym
SLRI_taxon_name_name_class_preferred_common_name
SLRI_taxon_name_name_class_scientific_name
SLRI_taxon_name_name_class_synonym
SLRI_taxon_name_name_class_teleomorph
SLRI_taxon_name_name_class_other
Returns:
a taxon name
Throws:
java.io.IOException

SHoundGetTaxNameFromTaxID

public java.lang.String SHoundGetTaxNameFromTaxID(int taxid)
throws java.io.IOException
fetches a taxonomy name in scientific form


Parameters:
taxid -
Returns:
a taxonomy name
Throws:
java.io.IOException

SHoundGetTaxLineageFromTaxID

public java.lang.String SHoundGetTaxLineageFromTaxID(int taxid,
java.lang.String type)
throws java.io.IOException
fetches a taxonomy lineage in a specified form.


Parameters:
taxid - a taxonomy id
type - a string specifying the form. One of:
SHoundGetTaxLineage_FULL
SHoundGetTaxLineage_GENBANK
SHoundGetTaxLineage_TAXDBSHORT
Returns:
a taxonomy lineage
Throws:
java.io.IOException

SHoundGiFromGOID

public int[] SHoundGiFromGOID(int go)
throws java.io.IOException
retrieves an array of gi with specified the specified gene ontology identifier


Parameters:
go - the gene ontology identifier
Returns:
an array of gi's
Throws:
java.io.IOException

SHoundGiFromGOIDList

public int[] SHoundGiFromGOIDList(int[] goList)
throws java.io.IOException
retrieves an array of gis that have been annotated with the specified goid


Parameters:
goList - the array of goid
Returns:
an array of gi's
Throws:
java.io.IOException

SHoundGiFromGOIDListAndECode

public int[] SHoundGiFromGOIDListAndECode(int[] goList,
java.lang.String ecode)
throws java.io.IOException
retrieves an array of gis that have been annotated with the specified goid list and the evidence code


Parameters:
goList - the array of goid
ecode - the go evidence code
Returns:
an array of gi's
Throws:
java.io.IOException

SHoundGOIDFromGi

public int[] SHoundGOIDFromGi(int gi)
throws java.io.IOException
retrieves an array of goid for a specified gi


Parameters:
gi - the gi
Returns:
an array of goid's
Throws:
java.io.IOException

SHoundGOIDFromGiList

public int[] SHoundGOIDFromGiList(int[] giList)
throws java.io.IOException
retrieves an array of goid for a specified array of gi's


Parameters:
giList - the array of gi's
Returns:
an array of goid's
Throws:
java.io.IOException

SHoundGiFromGOIDAndECode

public int[] SHoundGiFromGOIDAndECode(int goid,
java.lang.String ecode)
throws java.io.IOException
Return all the gi's with the given goid and evidence code.


Parameters:
goid - a gene ontology identifier
ecode - an evidence code
Returns:
an array of gi's
Throws:
java.io.IOException

SHoundGOIDFromRedundantGi

public int[] SHoundGOIDFromRedundantGi(int gi)
throws java.io.IOException
retrieve an array of goid from a redundant gi


Parameters:
gi - the gi
Returns:
an array of goid
Throws:
java.io.IOException

SHoundGOIDFromRedundantGiList

public int[] SHoundGOIDFromRedundantGiList(int[] giList)
throws java.io.IOException
retrieve an array of goid for a given array of gi's


Parameters:
giList - the gi array
Returns:
an array of goid
Throws:
java.io.IOException

SHoundGiFromCDDID

public int[] SHoundGiFromCDDID(java.lang.String cddid)
throws java.io.IOException
retrieves an array of gi with the domain specified by input


Parameters:
cddid - the domain identifier
Returns:
an array of gi's
Throws:
java.io.IOException

SHoundGiFromCDDIDList

public int[] SHoundGiFromCDDIDList(java.lang.String[] cddidList)
throws java.io.IOException
get the gi's with the specified domains


Parameters:
cddidList - an array of domain identifiers
Returns:
an array of gi's
Throws:
java.io.IOException

SHoundCDDIDFromGi

public java.lang.String[] SHoundCDDIDFromGi(int gi)
throws java.io.IOException
retrieves the domains for a specified gi.


Parameters:
gi - the gi
Returns:
an array og domain identifiers
Throws:
java.io.IOException

SHoundCDDIDFromGiList

public java.lang.String[] SHoundCDDIDFromGiList(int[] giList)
throws java.io.IOException
retrieve the domain identifiers for a specified gi array


Parameters:
giList - an array of gi's
Returns:
an array of domain names
Throws:
java.io.IOException

SHoundGiFromOMIM

public int[] SHoundGiFromOMIM(int omimid)
throws java.io.IOException
retrieves gi's from an omim


Parameters:
omimid - the omid identifier
Returns:
an array of gi's
Throws:
java.io.IOException

SHoundGiFromOMIMList

public int[] SHoundGiFromOMIMList(int[] omimList)
throws java.io.IOException
retrieves gi's associated with a omim


Parameters:
omimList - an array of omim
Returns:
an array of gi's
Throws:
java.io.IOException

SHoundOMIMFromGi

public int[] SHoundOMIMFromGi(int gi)
throws java.io.IOException
retrieves omim associated with a gi


Parameters:
gi - the gi
Returns:
an array of omim
Throws:
java.io.IOException

SHoundOMIMFromGiList

public int[] SHoundOMIMFromGiList(int[] giList)
throws java.io.IOException
get the associated omim for an array of gi's


Parameters:
giList - the gi array
Returns:
an array of omim's
Throws:
java.io.IOException

SHoundCDDScoreFromGi

public float SHoundCDDScoreFromGi(int gi,
java.lang.String cddid)
throws java.io.IOException
Get the score for a Conserved domain database domain


Parameters:
gi - the gi
cddid - the CDD identifier
Returns:
an CDD score
Throws:
java.io.IOException

SHoundGiFromLLID

public int[] SHoundGiFromLLID(int llid)
throws java.io.IOException
Get gi associated with a locuslink identifier


Parameters:
llid - a locuslink id
Returns:
an array of gi's
Throws:
java.io.IOException

SHoundGiFromLLIDList

public int[] SHoundGiFromLLIDList(int[] llidList)
throws java.io.IOException
get the gi's associated with the locuslink id


Parameters:
llidList - an array of locuslink id
Returns:
an array of gi's
Throws:
java.io.IOException

SHoundLLIDFromGi

public int[] SHoundLLIDFromGi(int gi)
throws java.io.IOException
retrieves locuslink id for a given gi


Parameters:
gi - the gi
Returns:
an array of locuslink id
Throws:
java.io.IOException

SHoundLLIDFromGiList

public int[] SHoundLLIDFromGiList(int[] giList)
throws java.io.IOException
retrievs locuslink id for a given gi array


Parameters:
giList - the array of gi's
Returns:
an array of locuslink id
Throws:
java.io.IOException

SHoundLocusFromGi

public java.lang.String SHoundLocusFromGi(int gi)
throws java.io.IOException
retrieves the locus for a given gi


Parameters:
gi - the gi
Returns:
a locuslink locus
Throws:
java.io.IOException

SHoundGODBGetRecordByReference

public int[] SHoundGODBGetRecordByReference(java.lang.String refType)
throws java.io.IOException
retrieve the gene ontology id by geneontology reference type


Parameters:
refType - the reference type, eg "EC",
Returns:
an array of goid
Throws:
java.io.IOException

SHoundGODBGetChildrenOf

public int[] SHoundGODBGetChildrenOf(int goid)
throws java.io.IOException
retrieves all the children of a given gene ontology id


Parameters:
goid - the gene ontology id
Returns:
an array of the goid
Throws:
java.io.IOException

SHoundGODBGetParentOf

public int[] SHoundGODBGetParentOf(int goid)
throws java.io.IOException
retrieves an array of the parents of a given goid


Parameters:
goid - the input gene ontology id
Returns:
an array of goid that are the parent of the input
Throws:
java.io.IOException

SHoundGODBGetAllAncestors

public int[] SHoundGODBGetAllAncestors(int goid)
throws java.io.IOException
retrieves all the ancestors (parents, grandparents ...) of a given gene ontology id.


Parameters:
goid - the goid
Returns:
an array of goid
Throws:
java.io.IOException

SHoundGODBGetAllChildren

public int[] SHoundGODBGetAllChildren(int goid)
throws java.io.IOException
retrieve all children of a given gene ontology id


Parameters:
goid - a given goid
Returns:
an array of the children of the input
Throws:
java.io.IOException

SHoundGODBGetNameByID

public java.lang.String SHoundGODBGetNameByID(int goid)
throws java.io.IOException
retrieves the name of a given goid


Parameters:
goid - the goid
Returns:
the name
Throws:
java.io.IOException

SHoundGODBGetClassification

public java.lang.String SHoundGODBGetClassification(int goid)
throws java.io.IOException
retrieve the ontology classification for a given goid


Parameters:
goid - the given goid
Returns:
the classification goid falls into
Throws:
java.io.IOException

SHoundNeighboursFromGi

public int[] SHoundNeighboursFromGi(int gi,
double eValue,
boolean bLimit)
throws java.io.IOException
Retrieves a list of protein BLAST neighbours. The BLAST protein neighbours were calculated using 0.01 maximum E-value cutoff.


Parameters:
gi - the gi
eValue - the e-value cutoff
bLimit - limit the return list to 100 gi's
Returns:
an array of gi's
Throws:
java.io.IOException

SHoundNeighboursFromGiList

public int[] SHoundNeighboursFromGiList(int[] giList,
double eValue,
boolean bLimit)
throws java.io.IOException
Retrieves a list of protein BLAST neighbours. The BLAST protein neighbours were calculated using 0.01 maximum E-value cutoff.


Parameters:
giList - the list of gi
eValue - the e value cutoff
bLimit - limit the return to 100 gi's
Returns:
an array of gi's
Throws:
java.io.IOException

SHoundNeighboursFromTaxID

public int[] SHoundNeighboursFromTaxID(int taxid,
double eValue)
throws java.io.IOException
Retrieves a list of protein BLAST neighbours using a list of proteins belonging to a complete genome as a query. Uses redundancy information for the query proteins. The BLAST protein neighbours were calculated using 0.01 maximum E-value cutoff.


Parameters:
taxid - the taxonomy identifier
eValue - the evalue cutoff
Returns:
an array of gi's
Throws:
java.io.IOException

SHound3DNeighboursFromGi

public int[] SHound3DNeighboursFromGi(int gi,
double eValue)
throws java.io.IOException
Retrieves a list of protein BLAST neighbours possessing 3-D structure. Uses redundancy information for the query protein. The BLAST protein neighbours were calculated using 0.01 maximum E-value cutoff.


Parameters:
gi - the gi
eValue - the evalue cutoff
Returns:
an array of gi's
Throws:
java.io.IOException

SHound3DNeighboursFromTaxID

public int[] SHound3DNeighboursFromTaxID(int taxid,
double eValue)
throws java.io.IOException
Retrieves a list of protein BLAST neighbours possessing 3-D structure using a list of proteins belonging to a complete genome as a query. Uses redundancy information for the query protein. The BLAST protein neighbours were calculated using 0.01 maximum E-value cutoff.


Parameters:
taxid - the taxonomy id
eValue - the evalue cutoff
Returns:
an array of gi's
Throws:
java.io.IOException

SHoundGetGisByNumberOfDomains

public int[] SHoundGetGisByNumberOfDomains(int numdoms)
throws java.io.IOException
retrieves all the gi's with the specified number of domains


Parameters:
numdoms - the number of domains
Returns:
an array of gi's
Throws:
java.io.IOException

SHoundGetDomainIdFromLabel

public java.lang.String[] SHoundGetDomainIdFromLabel(java.lang.String label)
throws java.io.IOException
retrieves the domain id given a label


Parameters:
label - the domain label
Returns:
an array of domain id
Throws:
java.io.IOException

SHoundGetGisByDomainId

public int[] SHoundGetGisByDomainId(java.lang.String domain)
throws java.io.IOException
retrieve the gi's having a domain id


Parameters:
domain - the domain id
Returns:
an array of gi's
Throws:
java.io.IOException

SHoundGetDomainLabelFromDomainId

public java.lang.String[] SHoundGetDomainLabelFromDomainId(java.lang.String accession)
throws java.io.IOException
Returns a short non-unique label given a domain for a Conserved Domain Database (CDD). The above labels are preferred amongst scientific community.


Parameters:
accession - the accession number
Returns:
an array of domain labels
Throws:
java.io.IOException

SHoundGetGisByDomainIdAndEvalue

public int[] SHoundGetGisByDomainIdAndEvalue(java.lang.String domain,
double evalue)
throws java.io.IOException
Fetches protein sequences on which a domain from the Conserved Domain Database (CDD) was identified by Reverse Position Specific BLAST. The function uses an E-value cutoff for reporting results.


Parameters:
domain - the domain id
evalue - the evalue cutoff
Returns:
an array of gi's
Throws:
java.io.IOException

SHoundGetDomainsFromGi

public java.lang.String SHoundGetDomainsFromGi(int gi)
throws java.io.IOException
Fetches information about domains from the Conserved Domain Database (CDD) as assigned by Reverse Position Specific BLAST to a given protein sequence.


Parameters:
gi - the gi
Returns:
domain identifier
Throws:
java.io.IOException

SHoundGetDomainsFromGiWithEvalue

public java.lang.String SHoundGetDomainsFromGiWithEvalue(int gi,
double eValue)
throws java.io.IOException
Fetches information about domains from the Conserved Domain Database (CDD) as assigned by Reverse Position Specific BLAST to a given protein sequence. The function uses an E-value cutoff for reporting results.


Parameters:
gi - the gi
eValue - the evalue cutoff
Returns:
an MMDB identifier or -1 or zero
Throws:
java.io.IOException

SHoundGetAccFromRetiredGi

public java.lang.String SHoundGetAccFromRetiredGi(int gi)
throws java.io.IOException
Returns accession number for the given retired gi.


Parameters:
gi - a retired gi
Returns:
an accession string or null.
Throws:
java.io.IOException

SHoundProteinReportSetDescription

public java.lang.String SHoundProteinReportSetDescription(int gi,
int format)
throws java.io.IOException
Get a protein report set description for a given gi. The set description is a comprehensive description for a gi.


Parameters:
gi - the gi
format - the format of the description. Either REPORT_XML or REPORT_ASN_TXT
Returns:
the protein report string
Throws:
java.io.IOException

SHoundGetFastaKeyedList

public java.util.Hashtable SHoundGetFastaKeyedList(int[] giList)
throws java.io.IOException
retrieves fasta list for the given gilist


Parameters:
giList - an array of gi's
Returns:
a hashtable with gi-fasta pair
Throws:
java.io.IOException

SHoundRedundantGroupKeyedList

public java.util.Hashtable SHoundRedundantGroupKeyedList(int[] giList)
throws java.io.IOException
Gets all protein entries with the same sequence from the system


Returns:
a hashtable of query gi and associated return protein gi's
Throws:
java.io.IOException

SHoundGetFastaFromRedundantGroupID

public java.lang.String SHoundGetFastaFromRedundantGroupID(int gid)
throws java.io.IOException
The FASTA format is widely used in bioinformatics community; it consists of a definition line, new line followed by a sequence terminated by a second new line.


Parameters:
gid - the redundant group id
Returns:
a string fasta
Throws:
java.io.IOException

SHoundGetFastaFromRedundantGroupIDKeyedList

public java.util.Hashtable SHoundGetFastaFromRedundantGroupIDKeyedList(int[] gidList)
throws java.io.IOException
retrieves fasta list for the given redundant group id list


Parameters:
gidList - an array of redundant group ids
Returns:
a hashtable with groupid-fasta pair
Throws:
java.io.IOException

ProcessRetStr

public java.util.Hashtable ProcessRetStr(java.util.Hashtable h,
java.lang.String str)
throws java.io.IOException
Process the return string from server to a hashtable


Parameters:
str - is the return string from server
Returns:
a hashtable with query-return pair
Throws:
java.io.IOException