SKAT in R
0
1
Entering edit mode
20 months ago
Eliza ▴ 40

hi, I have data that looks like this: 3-column SNPs their gene based on Annovar and a p-value for every SNP. What I would like is to aggregate the p values for every gene.

snps <- data.frame(
  snp_id = c("rs1", "rs2", "rs3", "rs4", "rs5", "rs6", "rs7", "rs8"),
  Gene.refGene_ANNOVAR = c("gene1", "gene1", "gene1", "gene1", "gene2", "gene2", "gene2", "gene2"),
  p.value = c(0.7703884, 0.9648540, 0.9648540, 0.9648540, 0.54, 0.03, 0.03, 0.8)
)

above an example of the data. I read about the SKAT method -> https://www.hsph.harvard.edu/skat/ and figured it might do the work. I read about the package here:https://rdrr.io/cran/SKAT/man/SKAT.html tried to implement it on my data, but got lost as to how to perform it correctly:

gene_pvals <- aggregate(p.value ~ Gene.refGene_ANNOVAR, data = df, FUN = function(x) SKAT::SKAT_Null(x)$p.value)

it doesn't work and returns errors. I would be happy if you could share your knowledge in this situation. I don't have information about the correlations between the SNPs but I know that they are correlated, do I have enough data to complete the SKAT method?

pvalue skat snp • 1.4k views
ADD COMMENT
0
Entering edit mode

I have no sense of whether SKAT is the right tool for your analysis, but some insight into your errors: did you mean data = snps instead on data = df? Also, SKAT_Null() does not appear to be a valid function in SKAT v2.2.5. Did you mean to call SKAT_Null_Model()?

ADD REPLY
0
Entering edit mode

would SAIGE-GENE+ be any help here ?

ADD REPLY
0
Entering edit mode

acvill can you sujjest maybe pther tools , methods for this ? ( also for every SNP i have data how many patients had the hetro/homozygous encodein (0,1,2). THANKS

ADD REPLY
0
Entering edit mode
ADD REPLY

Login before adding your answer.

Traffic: 1783 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