Get the directives from a GFF file

getGFFDirectives(file, nMax = Inf)

Arguments

file

character(1). File path.

nMax

integer(1). or Inf. Maximum number (i.e. of lines) to include. Use Inf to not apply a limit.

Value

DataFrame or NULL.

Details

Matches lines beginning with #!<key> <value> or ##<key>: <value>

Note

Updated 2021-01-21.

GFF3

Lines beginning with '##' are directives (sometimes called pragmas or meta-data) and provide meta-information about the document as a whole. Blank lines should be ignored by parsers and lines beginning with a single '#' are used for human-readable comments and can be ignored by parsers. End-of-line comments (comments preceded by # at the end of and on the same line as a feature or directive line) are not allowed.

See also

  • https://github.com/The-Sequence-Ontology/Specifications/blob/master/gff3.md

Examples

url <- pasteURL( "ftp.ensembl.org", "pub", "release-102", "gtf", "homo_sapiens", "Homo_sapiens.GRCh38.102.gtf.gz", protocol = "ftp" ) df <- getGFFDirectives(url) print(df)
#> DataFrame with 5 rows and 2 columns #> key value #> <character> <character> #> 1 genebuild-last-updated 2020-09 #> 2 genome-build GRCh38.p13 #> 3 genome-build-accession NCBI:GCA_000001405.28 #> 4 genome-date 2013-12 #> 5 genome-version GRCh38