| gff2fasta {microseq} | R Documentation |
Retrieving from a genome the sequences specified in a gff.table.
gff2fasta(gff.table, genome)
gff.table |
A |
genome |
A |
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.
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.
Lars Snipen and Kristian Hovde Liland.
# 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)