Input and Output Utility {cubfits} | R Documentation |
These utility functions read and write data of FASTA and phi.df formats.
read.seq(file.name, forceDNAtolower = FALSE, convertDNAtoupper = TRUE)
write.seq(seq.data, file.name)
read.phi.df(file.name, header = TRUE, sep = "\t", quote = "")
write.phi.df(phi.df, file.name)
get.expath(file.name, path.root = "./ex_data/", pkg = "cubfits")
file.name |
a file name to read or write. |
forceDNAtolower |
an option passed to |
convertDNAtoupper |
force everything in upper case. |
header |
an option passed to |
sep |
an option passed to |
quote |
an option passed to |
seq.data |
a |
phi.df |
a |
path.root |
root path for the file name relatively to the pkg. |
pkg |
package name for the path of root. |
read.seq()
and write.seq()
typically read and
write FASTA files (DNA ORFs or sequences).
read.phi.df()
and write.phi.df()
typically read and write
phi.df files (expression values of ORFs or sequences).
get.expath()
is only for demonstration returning a full path
to the file.
read.seq()
returns an object of seq.data
format
which can be converted to seq.string
format later via
convert.seq.data.to.string()
.
read.phi.df()
returns an object of phi.df
format
which contains expression values.
Wei-Chen Chen wccsnow@gmail.com.
https://github.com/snoweye/cubfits/
## Not run:
suppressMessages(library(cubfits, quietly = TRUE))
seq.data <- read.seq(get.expath("seq_200.fasta"))
phi.df <- read.phi.df(get.expath("phi_200.tsv"))
aa.names <- c("A", "C", "D")
# Read in from FASTA file.
seq.string <- convert.seq.data.to.string(seq.data)
## End(Not run)