Returns gTrack object representing GENCODE transcripts and their components (utr, cds etc) with assigned colors. Usually built from cached data objects but can also be built from provided GRangesList
track.gencode(
gencode = NULL,
gene.collapse = TRUE,
genes = NULL,
grep = NULL,
grepe = NULL,
build = "hg19",
bg.col = alpha("blue", 0.1),
cds.col = alpha("blue", 0.6),
utr.col = alpha("purple", 0.4),
st.col = "green",
en.col = "red",
grl.labelfield,
gr.labelfield,
col,
cached = T,
cached.dir = Sys.getenv("GENCODE_DIR"),
cached.path = paste(cached.dir, "gencode.composite.rds", sep = "/"),
cached.path.collapsed = paste(cached.dir, "gencode.composite.collapsed.rds", sep = "/"),
gr.srt.label = 0,
gr.cex.label = 0.3,
cex.label = 0.5,
labels.suppress.gr = T,
drop.rp11 = TRUE,
stack.gap = 1e+06,
gencode.cols = "gene_label",
use.gene.ids = FALSE,
...
)
(optional) path to GENCODE gtf or a GRanges object from which to generate and cache new gTrack GENCODE object (into path specified by GENCODE_DIR or provided as cached.dir argument to this function object). Only necessary to run if gTrack GENCODDE .rds has not already been cacned, (note: cached = FALSE in order for new GENCODE gTrack to be generated )
scalar logical specifying whether to collapse genes by transcript (or used stored version of transcripts)
(optional) character vector specifying genes to limit gTrack object to
character vector for which to grep genes to positively select
character vector for which to grep genes which to exclude
character can be 'hg19', 'hg38', if GENCODE_DIR and gencode not specified will download this build from mskilab.com
scalar character representing background color for genespan
scalar character representing background color for CDS
scalar character representing color of CDS start
scalar character representing color of CDS end
logical scalar whether to use "cached" version provided with package
scalar numeric specifying angle on exon label
scalar numeric > 0 specifying character expansion on exon label
scalar logical specifying whether to suppress exon label plotting
stack.gap argument to gTrack
character vector specifying additional columns to include in the gencode data used to generate the gTrack. By default if gencode includes a metadata column "gene_label" then this column is included. "gene_label" is regarded as a special case in which the value for each gene is assumes to be unique and the "gene_label" value is also used to annotate the GRangesList associated with the output gTrack. This allows the users to supply alternative values for annotations of the genes. In this case gngt$grl.labelfield = 'gene_label' could be used in order for the "gene_label" values to be show up when plotting the gencode gTrack.
(logical) use the gene_id column to name items in the GRangesList. By default set to FALSE to maintain backwards compatibility, which means "gene_name" is used to name items in the output. The problem with this is that gene_name is not unique. For example, 5S_rRNA is a gene_name that is associated with multiple different gene_id's, each representing a different copy of 5S_rRNA on various chromossomes.
additional arguments passed down to gTrack
(optional) GRangesList representing transcript models imported from GENCODE gff3 file using rtracklayer import
scalar character representing background color for UTR