This function allows to select one of the databases structured under ACNUC and located on the web.
Called without arguments, choosebank()
, will return the list of available databases.
Then, you can use query
to make your query and get a list of sequence names.
Remote access to ACNUC databases works by opening a socket connection on a port (for example
on port number 5558 at pbil.univ-lyon1.fr) and by communicating on this socket following the protocol
described in the section references
.
choosebank(bank = NA, host = "pbil.univ-lyon1.fr", port = 5558, server = FALSE,
blocking = TRUE, open = "a+", encoding = "", verbose = FALSE,
timeout = 5, infobank = FALSE, tagbank = NA)
When called with a regular bank name, an (invisible) list with 6 components:
an object of class socket
the name of the bank
the type of the bank (GENBANK, EMBL, SWISSPROT, NBRF)
the total number of sequences present in the opened database
the total number of species present in the opened database
the total number of keywords present in the opened database
When called with bank = NA:
A vector of all available bank names.
When called with bank = NA and infobank = TRUE, a data.frame with three columns:
The name of the bank.
The bank status (on/of).
Short description of bank with last release date.
string. The name of the bank. If NA, choosebank
will return the names of all database known by the server.
string. Host name for port (see socketConnection
)
integer. The TCP port number (see socketConnection
)
logical. Should the socket be a client or a server? (see socketConnection
)
logical. (see socketConnection
)
string. A description of how to open the connection (see socketConnection
)
string. The name of the encoding to be used. (see socketConnection
)
logical. If TRUE, verbose mode is on
integer. The timeout in seconds for socketConnection
. Default 5 seconds.
logical. If infobank
is TRUE and bank
is NA
, a data.frame
with all database informations will be returned
string. If bank
is NA
and tagbank
is documented, the names
of special purposes databases are returned. Current allowed values are TP
for frozen databases (TP is an acronym for "travaux pratiques" which means practicals
in french, these databases are useful mainly for teaching so as to have stable results),
TEST for test databases, and DEV for databases under development (unstable).
D. Charif, J.R. Lobry
When called without arguments, choosebank()
returns a list of all the databases names known
by the server, as a vector of string. When called with choosebank(infobank = TRUE)
, a data.frame
with more information is returned.The environment .seqinrEnv
is used to save several variables
such as socket and sequence list.
For more information about the socket communication protocol with ACNUC please get at https://doua.prabi.fr/databases/acnuc/remote_acnuc.html.
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")
where.is.this.acc
if you have a sequence accession number but you
don't know which database to open, query
to make a query when a database
is opened, connection
, socketConnection
if (FALSE) # Need internet connection
# Show available databases:
choosebank()
# Show frozen databases:
choosebank(tag = "TP")
# Select a database:
choosebank("emblTP", tag = "TP")
# Do something with the database:
myseq <- gfrag("LMFLCHR36", start = 1, length = 30)
stopifnot(myseq == "cgcgtgctggcggcaatgaagcgttcgatg")
# Close the database:
closebank()
Run the code above in your browser using DataLab