Assigns SNPs to genes based on their physical distance.
Usage
snps.to.genes(snp.info, gene.info, distance)
Arguments
snp.info
A data frame with 3 columns with names: Name, Position and Chr that correspond to the SNP name, its position on the genome and its chromosome, respectively
gene.info
A data frame with 4 columns with names: Name, Start, End and Chr that correspond to the gene name, start and end positions on the genome and its chromosome, respectively
distance
A number that corresponds to the distance below and above the Start and End positions of the gene that all SNPs in that region should be assigned to the gene
Value
A list of the same size as the number of genes of the gene.info data frame. The names of the SNPs assigned to each gene are returned
R version 3.3.1 (2016-06-21) -- "Bug in Your Hair"
Copyright (C) 2016 The R Foundation for Statistical Computing
Platform: x86_64-pc-linux-gnu (64-bit)
R is free software and comes with ABSOLUTELY NO WARRANTY.
You are welcome to redistribute it under certain conditions.
Type 'license()' or 'licence()' for distribution details.
R is a collaborative project with many contributors.
Type 'contributors()' for more information and
'citation()' on how to cite R or R packages in publications.
Type 'demo()' for some demos, 'help()' for on-line help, or
'help.start()' for an HTML browser interface to help.
Type 'q()' to quit R.
> library(PAGWAS)
Loading required package: lars
Loaded lars 1.2
Loading required package: foreach
Loading required package: mnormt
> png(filename="/home/ddbj/snapshot/RGM3/R_CC/result/PAGWAS/snps.to.genes.Rd_%03d_medium.png", width=480, height=480)
> ### Name: snps.to.genes
> ### Title: Assigns SNPs to genes
> ### Aliases: snps.to.genes
>
> ### ** Examples
>
> data(SNPs)
> data(genes)
> snps.to.genes(snp.info=SNPs,gene.info=genes,distance=50)
$GENE1
character(0)
$GENE2
[1] "SNP50" "SNP65"
$GENE20
character(0)
$GENE3
[1] "SNP28" "SNP34" "SNP38"
$GENE4
[1] "SNP61" "SNP89"
$GENE5
[1] "SNP26" "SNP41" "SNP56" "SNP69" "SNP78" "SNP87"
$GENE6
[1] "SNP45" "SNP67" "SNP95"
$GENE7
[1] "SNP1" "SNP77" "SNP100"
$GENE8
[1] "SNP77"
$GENE9
[1] "SNP4" "SNP6" "SNP18" "SNP32" "SNP47" "SNP96"
$GENE10
[1] "SNP21" "SNP60" "SNP98"
$GENE11
[1] "SNP10" "SNP17" "SNP37" "SNP39" "SNP40"
$GENE12
[1] "SNP2" "SNP25" "SNP49" "SNP64" "SNP76"
$GENE13
[1] "SNP97"
$GENE14
[1] "SNP5" "SNP8" "SNP36"
$GENE15
character(0)
$GENE16
character(0)
$GENE17
character(0)
$GENE18
character(0)
$GENE19
character(0)
>
>
>
>
>
> dev.off()
null device
1
>