P-value in SNP attributes
1
0
Entering edit mode
@jaspreet-kaur-12425
Last seen 7.1 years ago

Hi,

I am getting difficulty in understanding what exactly p-value in listAttributes(FOR SNPs) indicate?

library(biomaRt)

mart<-useMart("ENSEMBL_MART_SNP", "hsapiens_snp", host = "www.ensembl.org")

listAttributes(mart)

25           phenotype_description                                        Phenotype description
26  associated_variant_risk_allele                               Associated variant risk allele
27                         p_value                                                      P value

Also, I am providing a list of RSID's  as values to getBM function but it tends to give me list of all snps from database instead of giving list of 5 snps.

vals<-c("rs10261247","rs10952923","rs12538777","rs1358064","rs1358065")
getsnp<- function(vals,mart){attr_4<- getBM(attributes =c("refsnp_id", "p_value", "minor_allele_freq", "minor_allele")
                                         ,values = vals , mart = mart)
           return(attr_4)}
SNPs<-getsnp(vals,mart)

This results in 351401 observations for 4 variables. It will be great if I can get any help on this. 

Thanks.

biomart • 846 views
ADD COMMENT
0
Entering edit mode
@james-w-macdonald-5106
Last seen 44 minutes ago
United States

You are missing the filter argument, and if you don't provide that, you get everything (because you didn't say to filter on anything!).

Also do note that Ensembl doesn't have anything for those four SNPs anyway:

> vals<-c("rs10261247","rs10952923","rs12538777","rs1358064","rs1358065")

> getBM(c("refsnp_id", "p_value", "minor_allele_freq", "minor_allele"),"snp_filter",values = vals , mart = mart)
[1] refsnp_id         p_value           minor_allele_freq minor_allele     
<0 rows> (or 0-length row.names)

But if we add one more rsID, then we at least get some data.

> vals<-c("rs10261247","rs10952923","rs12538777","rs1358064","rs1358065", "rs61753175")
> getBM(c("refsnp_id", "p_value", "minor_allele_freq", "minor_allele"),"snp_filter",values = vals , mart = mart)
   refsnp_id p_value minor_allele_freq minor_allele
1 rs61753175      NA                NA           NA

 

ADD COMMENT

Login before adding your answer.

Traffic: 1084 users visited in the last hour
Help About
FAQ
Access RSS
API
Stats

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6