Description Usage Arguments Details Value Author(s) Examples
View source: R/GenCAT_functions.R
The function maps SNPs to classes based on genome coordinates
1 |
coords |
A data frame containing chromosome and upper and lower coordinates for a each class to be mapped. This must include column names 'chr', 'start', 'stop', and 'class'. |
SNPs |
A data frame containing genome coordinates of SNPs. This must include column names 'SNP', 'chr', 'position'. |
extend.boundary |
Number of base pairs to extend the class coordinates for mapping. |
Genomic coordinates defining the class boundaies in object, coors
, and SNP location in object, SNPs
should be annotated within the same build.
Note: That if using the map2class
function to map SNPs to classes to use in the GenCAT
function, then additional columns for effect_allele
and other_allele
can be used.
A data frame with SNP information including class label.
Eric Reed, Sara Nunez, Jing Qian, Andrea Foulkes
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 | data('CardioData')
data('coords')
######################
#Mapping SNPs to genes
######################
print(head(coords))
#Subset CardioData to decrease CPU time
CardioDataSub<-CardioData[CardioData$chr < 15,]
set.seed(1)
CardioDataSub<-CardioDataSub[sample(1:nrow(CardioDataSub), 100),]
print(head(CardioDataSub))
CardioMapped<-map2class(coords, CardioDataSub, extend.boundary = 5000)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.