u1_gen: Generating Data Structure

Description Usage Arguments Details Value Author(s) References See Also Examples

Description

These utility functions generate and summarize sequence strings into several useful formats such as reu13.df, y, and n, etc.

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
  gen.reu13.df(seq.string, phi.df = NULL, aa.names = .CF.GV$amino.acid,
               split.S = TRUE, drop.X = TRUE, drop.MW = TRUE,
               drop.1st.codon = TRUE)
  gen.y(seq.string, aa.names = .CF.GV$amino.acid,
        split.S = TRUE, drop.X = TRUE, drop.MW = TRUE)
  gen.n(seq.string, aa.names = .CF.GV$amino.acid,
        split.S = TRUE, drop.X = TRUE, drop.MW = TRUE)

  gen.reu13.list(seq.string, aa.names = .CF.GV$amino.acid,
                 split.S = TRUE, drop.X = TRUE, drop.MW = TRUE,
                 drop.1st.codon = TRUE)
  gen.phi.Obs(phi.df)
  gen.scuo(seq.string, aa.names = .CF.GV$amino.acid,
           split.S = TRUE, drop.X = TRUE, drop.MW = TRUE)

Arguments

seq.string

a list of sequence strings.

phi.df

a phi.df object returned from read.phi.df().

aa.names

a vector contains amino acid names for analysis.

split.S

split amino acid 'S' if any.

drop.X

drop amino acid 'X' if any.

drop.MW

drop amino acid 'M' and 'W' if any.

drop.1st.codon

if drop the first codon.

Details

These functions mainly take inputs of sequence strings seq.string or phi.df and turn them into corresponding format.

Value

The outputs are data structure in corresponding formats. See AllDataFormats for details.

Author(s)

Wei-Chen Chen [email protected].

References

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

See Also

AllDataFormats, read.seq(), read.phi.df(), and convert.seq.data.to.string().

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
## 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)
reu13.df <- gen.reu13.df(seq.string, phi.df, aa.names)
reu13.list.new <- gen.reu13.list(seq.string, aa.names)
y <- gen.y(seq.string, aa.names)
n <- gen.n(seq.string, aa.names)
scuo <- gen.scuo(seq.string, aa.names)

# Convert to list format.
reu13.list <- convert.reu13.df.to.list(reu13.df)
y.list <- convert.y.to.list(y)
n.list <- convert.n.to.list(n)

## End(Not run)

snoweye/cubfits documentation built on May 26, 2017, 1:28 p.m.