formatSequence: Format already aligned peptide sequences.

Description Usage Arguments Value Author(s) Examples

View source: R/formatSequence.R

Description

Convert already aligned peptide sequences into an object of dagPeptides-class.

Usage

1
formatSequence(seq, proteome, upstreamOffset, downstreamOffset)

Arguments

seq

A vector of aligned peptide sequences of the same length

proteome

An object of Proteome-class.

upstreamOffset

An integer, the upstream offset relative to the anchoring position.

downstreamOffset

An integer, the downstream offset relative to the anchoring position.

Value

An object of dagPeptides-class Class

Author(s)

Jianhong Ou, Haibo Liu

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
## Suppose you already have the aligned peptides sequences at hands. Then you can use 
## the formatSequence function to prepare an object of dagPeptides. Befor doing 
## that, you need prepare a Proteome object by the prepareProteome function.

dat <- unlist(read.delim(system.file(
                                   "extdata", "grB.txt", package = "dagLogo"),
                         header = FALSE, as.is = TRUE))
                         
## prepare an object of Proteome Class from a fasta file
proteome <- prepareProteome(fasta = system.file("extdata",
                                                "HUMAN.fasta",
                                                package = "dagLogo"), 
                            species = "Homo sapiens")
                            
## prepare an object of dagPeptides Class from a Proteome object
seq <- formatSequence(seq = dat, proteome = proteome, upstreamOffset = 14,
                     downstreamOffset = 15)

haibol2016/dagLogo documentation built on June 28, 2020, 1:31 a.m.