[Seqinr-forum] Concerning the biological databases access and queries in the last version of seqinr

Simon Penel simon.penel at univ-lyon1.fr
Thu Dec 18 15:25:23 CET 2014


Dear seqinr users/developers,

the last version of seqinr ( 3.1-3) is now available on CRAN and R-forge.

Examples dealing with  databases access and   queries  have been 
modified thanks to a suggestion from Tang Chin Cheung.

all the best

Simon




Le 17/11/14 11:58, Simon Penel a écrit :
> Dear seqinr users/developers,
>
> since the last version of R, it not possible to change an object 
> belonging the global environment from a package.
> This means that an object defined in seqinr (i.e. in the seqinr 
> environment .seqinrEnv)  is not anymore defined  in the global 
> environment.
> This leads to errors in the examples. Typically :
>
> choosebank("genbank")
> query("bb", "sp=Borrelia burgdorferi")
> # To get the names of the 4 first sequences:
> sapply(bb$req[1:4], getName)
> Error in lapply(X = X, FUN = FUN, ...) : object 'bb' not found
>
>
> Instead using directly the bb object, you should now use 
> get("bb",env=.seqinrEnv)
>
> For example:
>
>
> apply((get("bb",env=.seqinrEnv)$req[1:4]),getName)
>
>
> more generally if you want to store to the results of the request you 
> may type :
>
> mybb <- (get("bb",env=.seqinrEnv)
>
>
> We need to modify the examples and/or the R functions involved in the 
> database queries in the next version of seqinr, we will do that as 
> soon as possible.
>
> We are thinking of a global solution  by creating a function "seqobj" 
> ( aliased to  "so" ) :
>
>
> seqobj <- function (obj) { get (obj,env=.seqinrEnv)}
>
>
> And and to use so("x")  instead x in the examples.
>
> Any suggestions are of course welcome.
>
> Sorry for the troubles,
> all the best
>
> Simon
>


-- 
Simon Penel
Laboratoire de Biometrie et Biologie Evolutive
Bat 711 - CNRS UMR 5558 - Universite Lyon 1
43 bd du 11 novembre 1918 69622 Villeurbanne Cedex
Tel:   04 72 43 29 04      Fax:  04 72 43 13 88
http://lbbe.univ-lyon1.fr/-Penel-Simon-.html?lang=fr

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.r-forge.r-project.org/pipermail/seqinr-forum/attachments/20141218/80e6e489/attachment.html>


More information about the Seqinr-forum mailing list