Learn R Programming

seqinr (version 3.3-3)

modifylist: Modification of an ACNUC list

Description

This function modifies a previously existing ACNUC list by selecting sequences either by length, either by date, either for the presence of a given string in annotations.

Usage

modifylist(listname, modlistname = listname, operation, type = c("length", "date", "scan"), socket = autosocket(), virtual = FALSE, verbose = FALSE)

Arguments

listname
the name of the ACNUC list to modify
modlistname
the name of the modified ACNUC list. Default is to use the same list name so that previous list is lost.
operation
a string of character describing the operation to be done, see details.
type
the type of operation, could be one of "length", "date", "scan". Default is "length"
socket
an object of class sockconn connecting to a remote ACNUC database (default is a socket to the last opened database).
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.
verbose
logical, if TRUE mode verbose is on

Value

The result is directly assigned to the object modlistname in the user workspace. This is an objet of class qaw, a list with the following 6 components:

Details

Example of possible values for the argument operation:

Character < is to be understood as <= and=""> likewise.

References

http://doua.prabi.fr/databases/acnuc.html

citation("seqinr")

See Also

choosebank, query and prepgetannots to select the annotation lines for scan.

Examples

Run this code
## Not run:  # Need internet connection
#   choosebank("emblTP")
#   mylist <- query("mylist", "sp=felis catus et t=cds", virtual=TRUE)
#   mylist$nelem # 603 sequences
#   stopifnot(mylist$nelem == 603)
# 
#   # select sequences with at least 1000 bp:
#   mylist <- modifylist("mylist", operation = ">1000", virtual = TRUE)
#   mylist$nelem # now, only 132 sequences
#   stopifnot(mylist$nelem == 132)
# 
#   # scan for "felis" in annotations:
#   mylist <- modifylist("mylist", op = "felis", type = "scan", virtual = TRUE)
#   mylist$nelem # now, only 33 sequences
#   stopifnot(mylist$nelem == 33)
# 
#   # modify by date:
#   mylist <-  modifylist("mylist", op = "> 1/jul/2001", type = "date", virtual = TRUE)
#   mylist$nelem # now, only 15 sequences
#   stopifnot(mylist$nelem == 15)
# 
#   # Summary of current ACNUC lists, one list called MYLIST on sever:
#   sapply(alr()$rank, getliststate)
#   closebank()
#   ## End(Not run)

Run the code above in your browser using DataLab