| DotBracketStringSet-io {Structstrings} | R Documentation |
readDotBracketStringSet and writeDotBracketStringSet are
functions to read and write dot bracket strings from/to file. Since the
<> is in conflict with the fasta format, saving to fastq file is
sometimes the only option. Saving a string with a <> bracket type to a
fasta file will throw an error.
The functions use the underlying Biostrings infrastructure and share
most of its parameters. For a more detailed look have a look
here.
readDotBracketStringSet(filepath, format = "fasta", nrec = -1L, skip = 0L, seek.first.rec = FALSE, use.names = TRUE, with.qualities = FALSE) writeDotBracketStringSet(x, filepath, append = FALSE, compress = FALSE, format = "fasta", ...) saveDotBracketStringSet(x, objname, dirpath = ".", save.dups = FALSE, verbose = TRUE)
filepath |
The file name, when writing, or file name(s) when reading. |
format |
"fasta" or "fastq" |
nrec |
Single integer. The maximum of number of records to read in. Negative values are ignored. |
skip |
Single non-negative integer. The number of records of the data file(s) to skip before beginning to read in records. |
seek.first.rec, with.qualities, compress, ..., use.names, objname, dirpath, save.dups, verbose |
Have a look |
x |
A DotBracketStringSet object |
append |
|
readDotBracketStringSet returns a DotBracketStringSet
object, writeDotBracketStringSet returns NULL invisibly.
data("dbs", package = "Structstrings", envir = environment())
file <- tempfile()
# works both since a DotBracketStringSet is a BStringSet
writeXStringSet(dbs,file)
writeDotBracketStringSet(dbs,file)
# to return immediatly a DotBracketStringSet us readDotBracketStringSet()
dbs2 <- readDotBracketStringSet(file)