crelistfromclientdata {seqinr}R Documentation

To create on server a bitlist from data lines sent by client

Description

This function is usefull if you have a local file with sequence names (sequence ID), or sequence accession numbers, or species names, or keywords. This allows you to create on the server a list with the corresponding items.

Usage

crelistfromclientdata(listname, file, type, socket = "auto", invisible = TRUE, verbose = FALSE, 
virtual = FALSE)

Arguments

listname The name of the list as a quoted string of chars
file The local file name
type Could be one of "SQ", "AC", "SP", "KW", see examples
socket a socket of class connection and sockconn returned by choosebank.Default value (auto) means that the socket will be set to to the socket component of the banknameSocket variable.
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.

Details

Value

A list with the following components:

bank the name of the bank that has been choosen by choosebank.socket
call original call
name list name
nelem number of elements in the list on the server
typelist the type of the elemnts 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.
req a list of sequence names that fit the required criteria or NA when called with parameter virtual is TRUE

Author(s)

J.R. Lobry

References

citation("seqinr")

See Also

choosebank, query

Examples

 ## Not run: 
 # Need internet connection
 # Need internet connection
 choosebank("emblTP")
 #
 # Example with a file that contains sequence names:
 #
 fileSQ <- system.file("sequences/bb.mne", package = "seqinr")
 crelistfromclientdata("listSQ", file = fileSQ, type = "SQ")
 sapply(listSQ$req, getName)
 #
 # Example with a file that contains sequence accession numbers:
 #
 fileAC <- system.file("sequences/bb.acc", package = "seqinr")
 crelistfromclientdata("listAC", file = fileAC, type = "AC")
 sapply(listAC$req, getName) 
 #
 # Example with a file that contains species names:
 #
 fileSP <- system.file("sequences/bb.sp", package = "seqinr")
 crelistfromclientdata("listSP", file = fileSP, type = "SP")
 sapply(listSP$req, getName) 
 #
 # Example with a file that contains keywords:
 #
 fileKW <- system.file("sequences/bb.kwd", package = "seqinr")
 crelistfromclientdata("listKW", file = fileKW, type = "KW")
 sapply(listKW$req, getName) 
 
## End(Not run)

[Package seqinr version 1.0-6 Index]