modifylist | R Documentation |
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.
modifylist(listname, modlistname = listname, operation,
type = c("length", "date", "scan"), socket = autosocket(),
virtual = FALSE, verbose = FALSE)
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 |
socket |
an object of class |
virtual |
if TRUE, no attempt is made to retrieve the information about all the elements of the list. In this case, the |
verbose |
logical, if TRUE mode verbose is on |
Example of possible values for the argument operation
:
as in "> 10000" or "< 500"
as in "> 1/jul/2001" or "< 30/AUG/98"
specify the string to be searched for
Character < is to be understood as <= and > likewise.
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:
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 |
socket |
the socket connection that was used |
J.R. Lobry
https://doua.prabi.fr/databases/acnuc.html
citation("seqinr")
choosebank
, query
and
prepgetannots
to select the annotation lines for scan.
## 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)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.