Description Fields Methods Examples
Reference class to manipulate GTF data
GTF
complicated structure of list
sorted
data is sorted or not
geneLength(type = c("gene", "exon"))
get gene/exon length
getGeneID(index = NULL)
get Gene ID (ensembl ID)
getTranscriptsByGeneID(geneID)
get transcripts by gene IDs
getValueByGeneID(geneID, type = c("chr", "name", "strand", "type", "end",
"start"))
get values corresponding to gene IDs
mergeTranscripts(mc.cores = 1)
merge alternative transcripts into one union gene
read(gtf)
read from GTF file
sort()
sort GTF
toBed(file = NULL, type = c("gene", "exon"), chromosome = paste("chr",
c(1:22, "X", "Y"), sep = ""))
convert and write to BED file
write(file)
write to GTF file
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 | ## Not run:
library(GTF)
gencode = new("GTF")
gencode$read(paste(system.file(package = "GTF"), "/extdata/test.gtf", sep=""))
gencode$mergeTranscripts()
gencode$mergeTranscripts(mc.cores = 2)
gencode$write("output.gtf")
gene_length = gencode$geneLength("exon")
gene = gencode$toBed(type = "gene")
exon = gencode$toBed(type = "exon")
gencode$toBed(file = "gene.bed", type = "gene")
gencode$toBed(file = "exon.bed", type = "exon")
gi = gencode$getGeneID(1:10)
chr = gencode$getValueByGeneID(gi, type = "chr")
tr = gencode$getTranscriptsByGeneID(gi)
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.