Gallery - Example 4
Below is the R code to reproduce the example:library(DECIPHER)
>
> # import a GenBank sequence file
> gen <- system.file("extdata",
+ "Bacteria_175seqs.gen",
+ package="DECIPHER")
> dbConn <- dbConnect(SQLite(),
+ ":memory:")
> Seqs2DB(gen,
+ "GenBank",
+ dbConn,
+ "")
Reading GenBank file chunk 1
175 total sequences in table Seqs.
Time difference of 0.23 secs
>
> # add rank information to the database
> ids <- IdentifyByRank(dbConn,
+ level=10,
+ add2tbl=TRUE)
Updating column: "identifier"...
Formed 72 distinct groups.
Added to table Seqs: "identifier".
Time difference of 0.03 secs
>
> # add length information to the database
> lns <- IdLengths(dbConn,
+ add2tbl=TRUE)
Lengths counted for 175 sequences.
Added to Seqs: "bases", "nonbases", and "width".
>
> # view the database table in a browser
> BrowseDB(dbConn,
+ maxChars=25)
>
> dbDisconnect(dbConn)
[1] TRUE