snps.to.genes: Assigns SNPs to genes

Description Usage Arguments Value See Also Examples

View source: R/snps.to.genes.R

Description

Assigns SNPs to genes based on their physical distance.

Usage

1
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

See Also

SNPs, genes, snps.to.pathways

Examples

1
2
3
data(SNPs)
data(genes)
snps.to.genes(snp.info=SNPs,gene.info=genes,distance=50)

Example output

Loading required package: lars
Loaded lars 1.2

Loading required package: foreach
Loading required package: mnormt
$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)

PAGWAS documentation built on May 2, 2019, 3:26 p.m.