Outputs GRangesList object from reading a GTF file

readFromGTF(file, keep.extra.columns = NULL)

Arguments

file

a .gtf file

keep.extra.columns

a vector with names of columns to keep from the the attributes in the gtf file. For ensembl, this could be keep.extra.columns=c('gene_name','gene_biotype', 'transcript_biotype', 'transcript_name')

Value

grlist a GRangesList object, with two columns

TXNAME

specifying prefix for new gene Ids (genePrefix.number), defaults to empty

GENEID

indicating whether filter to remove read classes which are a subset of known transcripts(), defaults to TRUE

Examples

gtf.file <- system.file("extdata",
    "Homo_sapiens.GRCh38.91_chr9_1_1000000.gtf",
    package = "bambu"
)
readFromGTF(gtf.file)
#> GRangesList object of length 105:
#> $ENST00000190165
#> GRanges object with 2 ranges and 1 metadata column:
#>       seqnames        ranges strand |   exon_rank
#>          <Rle>     <IRanges>  <Rle> | <character>
#>   [1]        9 976964-977455      + |           1
#>   [2]        9 990041-991731      + |           2
#>   -------
#>   seqinfo: 1 sequence from an unspecified genome; no seqlengths
#> 
#> $ENST00000305248
#> GRanges object with 2 ranges and 1 metadata column:
#>       seqnames      ranges strand |   exon_rank
#>          <Rle>   <IRanges>  <Rle> | <character>
#>   [1]        9 34965-35264      - |           2
#>   [2]        9 35504-35871      - |           1
#>   -------
#>   seqinfo: 1 sequence from an unspecified genome; no seqlengths
#> 
#> $ENST00000314367
#> GRanges object with 16 ranges and 1 metadata column:
#>        seqnames        ranges strand |   exon_rank
#>           <Rle>     <IRanges>  <Rle> | <character>
#>    [1]        9 121060-121573      - |          16
#>    [2]        9 121961-122090      - |          15
#>    [3]        9 123217-123282      - |          14
#>    [4]        9 123386-123454      - |          13
#>    [5]        9 134979-135030      - |          12
#>    ...      ...           ...    ... .         ...
#>   [12]        9 172081-172172      - |           5
#>   [13]        9 173270-173366      - |           4
#>   [14]        9 175698-175784      - |           3
#>   [15]        9 177723-177820      - |           2
#>   [16]        9 178816-179047      - |           1
#>   -------
#>   seqinfo: 1 sequence from an unspecified genome; no seqlengths
#> 
#> ...
#> <102 more elements>