new()parse()parse_fasta()parse_featureparse_gff3_directive()parse_local_directive()parse_seed_directive()GFFFeaturecontig_length()contigs()fasta_data()methodsInformation about the source of the sequence.genome_id()genome_name()project()taxonomy()gff3_for_featureReturns the GFF3 information for a given feature.The return is a pair ($contig_data, $fasta_sequences) that can be passed
into write_gff3().$contig_data is a hashref mapping a contig name to a list of GFF3 file line
for the sequences in that contig.write_gff3Write a set of gff3 per-contig data and fasta sequence data to a file or filehandle.$genome is the genome these contigs are a part of
$contig_list is a list of contig-data hashes as returned by gff_for_feature
$fast_list is a list of fasta data strings.GFFParserA parser for GFF3 files.new()Instantiat
my $fgff = GFFParser->new($fig);parse()Takes a filename as an argument, and returns a file object.| The file object is a reference to a hash with the following keys | |
| features_by_genom | |
| An array of all the features in this genom | |
| feature_inde | |
| A hash with a key of the features by ID and the value being the GFFFeatur | |
| feature | |
| All the features in the genome, as an array with each element being a GFFFeature elemen | |
| filenam | |
| The filename of the file that was parse | |
| fasta_dat | |
| A hash with the key being the ID and the value being the sequence |
parse_seed_directive()Parse out seed information that we hide in the headers, eg, project, name, taxid, and so on. These are our internal representations, but are generally treated as comments by other gff3 parsersparse_local_directive()I haven't seen one of these :)parse_featureReads a feature line and stuffs it into the right places, as appropriate.parse_fasta()Read the fasta sequence into memoryGFFFeatureA GFFFeature that acceesses the datamethodsfig seqid source type start end score strand phase attributes genome fig_idfasta_data()Get or set the fasta data. Given an id and some data will set the data for that id. Given an id will return the data for that id. Called without arguments will return a reference to a hash of sequences.This means that if you give it an id and sequence it will return that sequence. Hmmm.contigs()Add a contig to the list, or return a reference to an array of contigscontig_length()Get or set the length of a specfic contig.
my $length=$fob->contig_length($contig, $length)
my $length=$fob->contig_length($contig);Information about the source of the sequence.These are things that we have parsed out the GFF3 file, or want to add into the GFF3 file. We can use these methods to get or set them as required. In general, if a value is supplied that will be used as the new value.genome_id()Get or set a genome id for this file.genome_name()Get or set a genome id for this file.project()Get or set the project.taxonomy()Get or set the taxonomy