Description Usage Arguments Details Value Warning Author(s) References See Also Examples
Adds sequences to a database.
1 2 3 4 5 6 7 8 9 10 11 |
seqs |
A connection object or a character string specifying the file path to the file containing the sequences, an |
type |
The type of the sequences ( |
dbFile |
A SQLite connection object or a character string specifying the path to the database file. If the |
identifier |
Character string specifying the |
tblName |
Character string specifying the table in which to add the sequences. |
chunkSize |
Number of characters to read at a time. |
replaceTbl |
Logical indicating whether to overwrite the entire table in the database. If |
fields |
Named character vector providing the fields to import from a |
processors |
The number of processors to use, or |
verbose |
Logical indicating whether to display each query as it is sent to the database. |
... |
Further arguments to be passed directly to |
Sequences are imported into the database in chunks of lines specified by chunkSize
. The sequences can then be identified by searching the database for the identifier
provided. Sequences are added to the database verbatim, so that no sequence information is lost when the sequences are exported from the database. The sequence (record) names are recorded into a column named “description” in the database.
The total number of sequences in the database table is returned after import.
If replaceTbl
is TRUE
then any sequences already in the table are overwritten, which is equivalent to dropping the entire table.
Erik Wright eswright@pitt.edu
ES Wright (2016) "Using DECIPHER v2.0 to Analyze Big Biological Sequence Data in R". The R Journal, 8(1), 352-359.
1 2 3 4 5 6 | gen <- system.file("extdata", "Bacteria_175seqs.gen", package="DECIPHER")
dbConn <- dbConnect(SQLite(), ":memory:")
Seqs2DB(gen, "GenBank", dbConn, "Bacteria")
BrowseDB(dbConn)
dna <- SearchDB(dbConn, nameBy="description")
dbDisconnect(dbConn)
|
Loading required package: Biostrings
Loading required package: BiocGenerics
Loading required package: parallel
Attaching package: ‘BiocGenerics’
The following objects are masked from ‘package:parallel’:
clusterApply, clusterApplyLB, clusterCall, clusterEvalQ,
clusterExport, clusterMap, parApply, parCapply, parLapply,
parLapplyLB, parRapply, parSapply, parSapplyLB
The following objects are masked from ‘package:stats’:
IQR, mad, sd, var, xtabs
The following objects are masked from ‘package:base’:
anyDuplicated, append, as.data.frame, basename, cbind, colnames,
dirname, do.call, duplicated, eval, evalq, Filter, Find, get, grep,
grepl, intersect, is.unsorted, lapply, Map, mapply, match, mget,
order, paste, pmax, pmax.int, pmin, pmin.int, Position, rank,
rbind, Reduce, rownames, sapply, setdiff, sort, table, tapply,
union, unique, unsplit, which.max, which.min
Loading required package: S4Vectors
Loading required package: stats4
Attaching package: ‘S4Vectors’
The following object is masked from ‘package:base’:
expand.grid
Loading required package: IRanges
Loading required package: XVector
Attaching package: ‘Biostrings’
The following object is masked from ‘package:base’:
strsplit
Loading required package: RSQLite
Reading GenBank file chunk 1
175 total sequences in table Seqs.
Time difference of 0.26 secs
Search Expression:
select description, _Seqs.sequence from Seqs join _Seqs on Seqs.row_names =
_Seqs.row_names where _Seqs.row_names in (select row_names from Seqs)
DNAStringSet of length: 175
Time difference of 0.02 secs
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.