extract_field_from_gencode: Extract field from gencode GTF file

Description Usage Arguments Details Value Author(s) See Also Examples

Description

Extract field from gencode GTF file

Usage

1
2
extract_field_from_gencode(file, level = "gene",
    primary_key = "gene_id", field = "gene_name")

Arguments

file

the input GTF file

level

level of the annotation (e.g. gene, transcript, exon, ...)

primary_key

primary field

field

field to be retrieved

Details

Although GTF file can be imported by makeTranscriptDbFromGFF, some information in the original GTF file will not be imported. This function aims to extract additionally information from GTF file.

The function calls external perl script, so you need to have perl installed.

Value

A vector in which 'primary_key' corresponds to the name and 'field' corresponds to the value.

Author(s)

Zuguang Gu <z.gu@dkfz.de>

See Also

available_gencode_fields lists all possible values for primary_key and field.

Examples

1
2
3
4
5
6
7
8
## Not run: 
download.file("ftp://ftp.sanger.ac.uk/pub/gencode/Gencode_human/release_19/gencode.v19.annotation.gtf.gz",
    destfile = "gencode.v19.annotation.gtf.gz")
extract_field_from_gencode("gencode.v19.annotation.gtf.gz")
extract_field_from_gencode("gencode.v19.annotation.gtf.gz", field = "gene_type")

## End(Not run)
NULL

eilslabs/epic documentation built on May 16, 2019, 1:24 a.m.