crelistfromclientdata: To create on server an ACNUC list from data lines sent by...

Description Usage Arguments Details Value Author(s) References See Also Examples

View source: R/clfcd.R

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

1
2
3
4
5
crelistfromclientdata(listname, file, type,
 socket = autosocket(), invisible = TRUE,
 verbose = FALSE, virtual = FALSE)
clfcd(listname, file, type, socket = autosocket(),
 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

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.

Details

clfcd is a shortcut for crelistfromclientdata.

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:

call

the original call

name

the ACNUC list name

nelem

the number of elements (for instance sequences) in the ACNUC list

typelist

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.

req

a list of sequence names that fit the required criteria or NA when called with parameter virtual is TRUE

socket

the socket connection that was used

Author(s)

J.R. Lobry

References

citation("seqinr")

See Also

choosebank, query, savelist for the reverse operation with an ACNUC list of sequences.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
 ## Not run:  # Need internet connection
 choosebank("emblTP")
 #
 # Example with a file that contains sequence names:
 #
 fileSQ <- system.file("sequences/bb.mne", package = "seqinr")
 listSQ <- 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")
 listAC <- 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")
 listSP <- 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")
 listKW <- crelistfromclientdata("listKW", file = fileKW, type = "KW")
 sapply(listKW$req, getName)
 #
 # Summary of ACNUC lists:
 #
 sapply(alr()$rank, getliststate)
 closebank() 
 
## End(Not run)

seqinr documentation built on June 9, 2021, 9:06 a.m.