cubfits (version 0.1-2)

Input and Output Utility: Input and Output Utility

Description

These utility functions read and write data of FASTA and phi.df formats.

Usage

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")

Arguments

file.name
a file name to read or write.
forceDNAtolower
an option passed to read.fasta() of seqinr package.
convertDNAtoupper
force everything in upper case.
header
an option passed to read.table().
sep
an option passed to read.table().
quote
an option passed to read.table().
seq.data
a seq.data object.
phi.df
a phi.df object.
path.root
root path for the file name relatively to the pkg.
pkg
package name for the path of root.

Value

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.

Details

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.

References

https://github.com/snoweye/cubfits/

See Also

convert.seq.data.to.string().

Examples

Run this code
## 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)

Run the code above in your browser using DataLab