formatSequence {dagLogo}R Documentation

Format already aligned peptide sequences.

Description

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

Usage

formatSequence(seq, proteome, upstreamOffset, downstreamOffset)

Arguments

seq

A vector of aligned peptide sequences of the same length

proteome

An object of Proteome-class 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

## You already have the aligned peptides sequences in hand. 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
seq <- formatSequence(seq = dat, proteome = proteome, upstreamOffset = 14,
                     downstreamOffset = 15)


[Package dagLogo version 1.22.2 Index]