Get the directives from a GFF file
getGFFDirectives(file, nMax = Inf)
Matches lines beginning with
#!<key> <value> or
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.
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