GFF3.ReaderMethod
GFF3.Reader(input::IO;
            index=nothing,
            save_directives::Bool=false,
            skip_features::Bool=false,
            skip_directives::Bool=true,
            skip_comments::Bool=true)

GFF3.Reader(input::AbstractString;
            index=:auto,
            save_directives::Bool=false,
            skip_features::Bool=false,
            skip_directives::Bool=true,
            skip_comments::Bool=true)

Create a reader for data in GFF3 format.

The first argument specifies the data source. When it is a filepath that ends with .bgz, it is considered to be block compression file format (BGZF) and the function will try to find a tabix index file (<filename>.tbi) and read it if any. See http://www.htslib.org/doc/tabix.html for bgzip and tabix tools.

Arguments

  • input: data source (IO object or filepath)
  • index: path to a tabix file
  • save_directives: flag to save directive records (which can be accessed with GFF3.directives)
  • skip_features: flag to skip feature records
  • skip_directives: flag to skip directive records
  • skip_comments: flag to skip comment records
GFF3.RecordMethod
GFF3.Record(str::AbstractString)

Create a GFF3 record object from str. This function verifies and indexes fields for accessors.

GFF3.RecordMethod
GFF3.Record(data::Vector{UInt8})

Create a GFF3 record object from data. This function verifies and indexes fields for accessors. Note that the ownership of data is transferred to a new record object.

GFF3.RecordMethod
GFF3.Record()

Create an unfilled GFF3 record.

GFF3.WriterType
GFF3.Writer(output::IO)

Create a data writer of the GFF3 file format.

Arguments:

  • output: data sink
GFF3.attributesMethod
attributes(record::Record, key::String)::Vector{String}

Get the attributes of record with key.

GFF3.attributesMethod
attributes(record::Record)::Vector{Pair{String,Vector{String}}}

Get the attributes of record.

GFF3.contentMethod
content(record::Record)::String

Get the content of record. Leading '#' letters are removed.

GFF3.directivesMethod

Return all directives that preceded the last GFF entry parsed as an array of strings.

Directives at the end of the file can be accessed by calling close(reader) and then directives(reader).

GFF3.featuretypeMethod
featuretype(record::Record)::String

Get the type of record.

GFF3.getfastaMethod

Return a FASTA.Reader initialized to parse trailing FASTA data.

Throws an exception if there is no trailing FASTA, which can be checked using hasfasta.

GFF3.hasfastaMethod

Return true if the GFF3 stream is at its end and there is trailing FASTA data.

GFF3.iscommentMethod
iscomment(record::Record)::Bool

Test if record is a comment record.

GFF3.isdirectiveMethod
isdirective(record::Record)::Bool

Test if record is a directive record.

GFF3.isfeatureMethod
isfeature(record::Record)::Bool

Test if record is a feature record.

GFF3.phaseMethod
phase(record::Record)::Int

Get the phase of record.

GFF3.scoreMethod
score(record::Record)::Float64

Get the score of record.

GFF3.seqendMethod
seqend(record::Record)::Int

Get the end coordinate of record.

GFF3.seqidMethod
seqid(record::Record)::String

Get the sequence ID of record.

GFF3.seqstartMethod
seqstart(record::Record)::Int

Get the start coordinate of record.

GFF3.sourceMethod
source(record::Record)::String

Get the source of record.

GFF3.strandMethod
strand(record::Record)::GenomicFeatures.Strand

Get the strand of record.