geneFactors: Returns a factor vector across pos (chr:pos vector)...

Description Usage Arguments Value Examples

View source: R/pointsWithin.R

Description

Returns a factor vector across pos (chr:pos vector) indicating if the pos is in one of the genes (row number)

Usage

1
geneFactors(posList, gtf, fill = TRUE, gene = TRUE)

Arguments

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)

Value

a factor vector across pos (chr:pos vector) indicating if the pos is in one of the genes (row number)

Examples

 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)

JEFworks/badger documentation built on May 7, 2019, 7:40 a.m.