DB2Seqs(file, dbFile, tblName = "Seqs", identifier = "", type = "BStringSet", limit = -1, replaceChar = "-", nameBy = "description", orderBy = "row_names", removeGaps = "none", append = FALSE, width = 80, compress = FALSE, chunkSize = 1e5, sep = "::", clause = "", verbose = TRUE)XStringSet (sequences) to export to a FASTA formatted file or QualityScaledXStringSet to export to a FASTQ formatted file. This should be (an unambiguous abbreviation of) one of "DNAStringSet", "RNAStringSet", "AAStringSet", "BStringSet", "QualityScaledDNAStringSet", "QualityScaledRNAStringSet", "QualityScaledAAStringSet", or "QualityScaledBStringSet". (See details section below.)
-1) does not limit the number of results.
XStringSet's alphabet. Not applicable if type=="BStringSet". (See details section below.)
sep, in the order specified.
" ASC" or " DESC" to specify ascending (the default) or descending order.
"none", "all" or "common".
file.
file at a time. Cannot be less than the total number of sequences if removeGaps is "common".
file.
type of sequences. If type is an XStringSet then sequences are exported to FASTA format. Quality information for QualityScaledXStringSets are interpreted as PredQuality scores before export to FASTQ format.If type is "BStringSet" (the default) then sequences are exported to a FASTA file exactly the same as they were when imported. If type is "DNAStringSet" then all U's are converted to T's before export, and vise-versa if type is "RNAStringSet". All remaining characters not in the XStringSet's alphabet are converted to replaceChar.
db <- system.file("extdata", "Bacteria_175seqs.sqlite", package="DECIPHER")
tf <- tempfile()
DB2Seqs(tf, db, limit=10)
file.show(tf) # press 'q' to exit
unlink(tf)
Run the code above in your browser using DataLab