Retrieving from a genome the sequences specified in a gff.table
.
gff2fasta(gff.table, genome)
A gff.table
(data.frame
) with genomic features information.
A Fasta
object with the genome sequence(s).
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
.
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.
# 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