readFasta-methods {pairseqsim}R Documentation

reader for databases in Fasta file format.

Description

Reads file in FASTA format. An sequence entry in the fasta dabase consists of a header line starting with the ">" sign which contains the id of the sequence. It is followed by several lines of the protein sequence. Because the header line may vary the user can specify a function which will extract (grep) the id. infogrep <- function(x) { return(sub("^>([a-zA-Z0-9]+) .+","\1",x,perl=TRUE)) }

Arguments

object either AASequence or AASequenceList
file Path to the file
grepinfo Function which extracts the id from the fasta description line.
grepseq Function to pre-process the sequence.

Value

Returns an object of class AASequenceList.

Methods

object = "AASequenceList"
Read sequence database in FASTA format.

Author(s)

Witold E. Wolski witek96@users.sourceforge.net

See Also

AASequenceList-class

Examples

mySequlist <- new("AASequenceList",info="my sequence list")
#mySequlist<-readFasta(mySequlist,"ex.fasta",grepinfo=infogrep,grepseq=seqgrep)

[Package pairseqsim version 1.0.4 Index]