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
.
query(listname, query, socket = autosocket(),
invisible = TRUE, verbose = FALSE, virtual = FALSE)
The name of the list as a quoted string of chars
A quoted string of chars containing the request with the syntax given in the details section
an object of class sockconn
connecting to a remote ACNUC
database (default is a socket to the last opened database).
if FALSE
, the result is returned visibly.
if TRUE
, verbose mode is on
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
.
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:
the original call
the ACNUC list name
the number of elements (for instance sequences) in the ACNUC list
the 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.
a list of sequence names that fit the required criteria or NA
when
called with parameter virtual
is TRUE
the socket connection that was used
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://doua.prabi.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:
seqs attached to taxon or any other below in tree; @ wildcard possible
seqs attached to given numerical NCBI's taxon id
seqs attached to keyword or any other below in tree; @ wildcard possible
seqs of specified type
seqs published in journal specified using defined journal code
seqs from reference specified such as in jcode/volume/page (e.g., JMB/13/5432)
seqs from references having specified author (only last name, no initial)
seqs attached to specified accession number
seqs of given name (ID or LOCUS); @ wildcard possible
seqs published in specified year; > and < can be used instead of =
seqs from specified organelle named following defined code (e.g., chloroplast)
seqs from specified molecule as named in ID or LOCUS annotation records
seqs from specified data class (EMBL) or review level (UniProt)
seqs whose names are in given file, one name per line (unimplemented use clfcd
instead)
seqs attached to accession numbers in given file, one number per line (unimplemented use clfcd
instead)
produces the list of keywords named in given file, one keyword per line (unimplemented use clfcd
instead)
produces the list of species named in given file, one species per line (unimplemented use clfcd
instead)
the named list that must have been previously constructed
Operators (always followed and preceded by blanks or parentheses) are:
intersection of the 2 list operands
union of the 2 list operands
complementation of the single list operand
compute the list of parent seqs of members of the single list operand
add subsequences of members of the single list operand
project to species: list of species attached to member sequences of the operand list
project to keywords: list of keywords attached to member sequences of the operand list
unproject: list of seqs attached to members of the species or keywords list operand
compute the list of species placed in the tree below the members of the species list operand
compute the list of keywords placed in the tree below the members of the keywords list operand
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.
To get the release date and content of all the databases located at the pbil, please look at the following url: http://doua.prabi.fr/search/releases 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")
# NOT RUN {
# }
# NOT RUN {
# 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