Learn R Programming

microseq (version 1.3)

gff2fasta: Retrieving annotated sequences

Description

Retrieving from a genome the sequences specified in a gff.table.

Usage

gff2fasta(gff.table, genome)

Arguments

gff.table

A gff.table (data.frame) with genomic features information.

genome

A Fasta object with the genome sequence(s).

Value

A Fasta object with one row for each row in gff.table. The Header for each sequence is a summary of the information in the corresponding row of gff.table.

Details

Each row in gff.table (see readGFF) describes a genomic feature in the genome. The information in the columns Seqid, Start, End and Strand are used to retrieve the sequences from genome$Sequence. Every Seqid in the gff.table must match the first token in one of the genome$Header texts.

See Also

readGFF, findOrfs.

Examples

Run this code
# NOT RUN {
# Using two files in this package
xpth <- file.path(path.package("microseq"),"extdata")
gff.file <- file.path(xpth,"small.gff")
genome.file <- file.path(xpth,"small_genome.fasta")

# Reading
gff.table <- readGFF(gff.file)
genome <- readFasta(genome.file)

# Retrieving sequences
fasta.obj <- gff2fasta(gff.table,genome)
summary(fasta.obj)
plot(fasta.obj)

# }

Run the code above in your browser using DataLab