importGtf {RCAS} | R Documentation

## importGtf

### Description

This function uses `rtracklayer::import.gff()` function to import genome annoatation data from an Ensembl gtf file

### Usage

    importGtf(
      filePath,
      saveObjectAsRds = TRUE,
      readFromRds = TRUE,
      overwriteObjectAsRds = FALSE,
      keepStandardChr = TRUE,
      ...
    )

### Arguments

`filePath` | Path to a GTF file
`saveObjectAsRds` | TRUE/FALSE (default:TRUE). If it is set to TRUE, a GRanges object will be created and saved in RDS format (<filePath>.granges.rds) so that importing can re-use this .rds file in next run.
`readFromRds` | TRUE/FALSE (default:TRUE). If it is set to TRUE, annotation data will be imported from previously generated .rds file (<filePath>.granges.rds).
`overwriteObjectAsRds` | TRUE/FALSE (default:FALSE). If it is set to TRUE, existing .rds file (<filePath>.granges.rds) will overwritten.
`keepStandardChr` | TRUE/FALSE (default:TRUE). If it is set to TRUE, `seqlevelsStyle` will be converted to 'UCSC' and `keepStandardChromosomes` function will be applied to only keep data from the standard chromosomes.
`...` | Other arguments passed to rtracklayer::import.gff function

### Value

A `GRanges` object containing the coordinates of the annotated genomic features in an input GTF file

### Examples

    #import the data and write it into a .rds file
    ## Not run:
    importGtf(filePath='./Ensembl75.hg19.gtf')

    ## End(Not run)
    #import the data but don't save it as RDS
    ## Not run:
    importGtf(filePath='./Ensembl75.hg19.gtf', saveObjectAsRds = FALSE)

    ## End(Not run)
    #import the data and overwrite the previously generated
    ## Not run:
    importGtf(filePath='./Ensembl75.hg19.gtf', overwriteObjectAsRds = TRUE)

    ## End(Not run)

[Package RCAS version 1.20.0 Index]