Description Usage Arguments Value Examples
Returns a factor vector across pos (chr:pos vector) indicating if the pos is in one of the genes (row number)
1 | geneFactors(posList, gtf, fill = TRUE, gene = TRUE)
|
posList |
Data frame of SNP positions |
gtf |
GTF file contents |
fill |
Boolean of whether to map SNPs not annotated as within genes to unique gene ids |
gene |
Boolean of whether to use genes (or exons only) |
a factor vector across pos (chr:pos vector) indicating if the pos is in one of the genes (row number)
1 2 3 4 5 6 7 8 9 10 | posList <- data.frame(
'chr' = c('1', '1', '1', '2', '2', '3'),
'pos' = c(11869+7, 11869+100, 14363+101, 29554+0, 52473+10, 62948+5)
)
## Not run:
gtfFile <- 'Homo_sapiens.GRCh37.75.gtf'
gtf <- read.table(gtfFile, header=F, stringsAsFactors=F, sep='\t')
geneFactors(posList, gtf)
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.