Learn R Programming

seqinr (version 3.1-2)

query: To get a list of sequence names from an ACNUC data base located on the web

Description

This is a major command of the package. It executes all sequence retrievals using any selection criteria the data base allows. The sequences are coming from ACNUC data base located on the web and they are transfered by socket. The command produces the list of all sequence names that fit the required criteria. The sequence names belong to the class of sequence SeqAcnucWeb.

Usage

query(listname, query, socket = autosocket(), 
invisible = TRUE, verbose = FALSE, virtual = FALSE)

Arguments

listname
The name of the list as a quoted string of chars
query
A quoted string of chars containing the request with the syntax given in the details section
socket
an object of class sockconn connecting to a remote ACNUC database (default is a socket to the last opened database).
invisible
if FALSE, the result is returned visibly.
verbose
if TRUE, verbose mode is on
virtual
if TRUE, no attempt is made to retrieve the information about all the elements of the list. In this case, the req component of the list is set to NA.

Value

  • The result is directly assigned to the object listname in the user workspace. This is an objet of class qaw, a list with the following 6 components:
  • callthe original call
  • namethe ACNUC list name
  • nelemthe number of elements (for instance sequences) in the ACNUC list
  • typelistthe type of the elements of the list. Could be SQ for a list of sequence names, KW for a list of keywords, SP for a list of species names.
  • reqa list of sequence names that fit the required criteria or NA when called with parameter virtual is TRUE
  • socketthe socket connection that was used

Details

The query language defines several selection criteria and operations between lists of elements matching criteria. It creates mainly lists of sequences, but also lists of species (or, more generally, taxa) and of keywords. See http://pbil.univ-lyon1.fr/databases/acnuc/cfonctions.html#QUERYLANGUAGE for the last update of the description of the query language. Selection criteria (no space before the = sign) are: [object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object] Operators (always followed and preceded by blanks or parentheses) are: [object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object] The query language is case insensitive.Three operators (AND, OR, NOT) can be ambiguous because they can also occur within valid criterion values. Such ambiguities can be solved by encapsulating elementary selection criteria between escaped double quotes.

References

To get the release date and content of all the databases located at the pbil, please look at the following url: http://pbil.univ-lyon1.fr/search/releases.php Gouy, M., Milleret, F., Mugnier, C., Jacobzone, M., Gautier,C. (1984) ACNUC: a nucleic acid sequence data base and analysis system. Nucl. Acids Res., 12:121-127. Gouy, M., Gautier, C., Attimonelli, M., Lanave, C., Di Paola, G. (1985) ACNUC - a portable retrieval system for nucleic acid sequence databases: logical and physical designs and usage. Comput. Appl. Biosci., 3:167-172. Gouy, M., Gautier, C., Milleret, F. (1985) System analysis and nucleic acid sequence banks. Biochimie, 67:433-436. citation("seqinr")

See Also

choosebank, getSequence, getName, crelistfromclientdata

Examples

Run this code
# Need internet connection
 choosebank("genbank")
 bb <- query("bb", "sp=Borrelia burgdorferi")
 # To get the names of the 4 first sequences:
 sapply(bb$req[1:4], getName)
 # To get the 4 first sequences:
 sapply(bb$req[1:4], getSequence, as.string = TRUE)

Run the code above in your browser using DataLab