This is a test version of Biostars. For the public version, visit https://www.biostars.org.
Linking beta/M value DNAm matrix to gene annotation and filtering on a list of candidate genes

Hello everyone,

I have a very rudimentary question and am happy to just be suggested I go read a package reference! I have a matrix of M values as well as an annotation file. When I join them and filter on UCSC_RefGene_Name I get too few sites associated with the genes I'm interested in. E.g., I know that a particular candidate gene should have ~60 sites associated with it, but my filter cuts out 50 of them. There must be a more elegant and appropriate way of doing this than the bonehead way I am (just good old joining and filtering). Please let me know where I can start looking to find a tutorial?

minfi epic candidate-gene

So your issue is that your filtering removed probes of interest for you ? Have you identified which filter you applied removed those probes ?

gene_list <- c("NR3C1", "FKBP5", "BDNF", "AVP", "CRH")

d_both <- left_join(d_cpg, annotation, by = "Name") %>% 
  filter(UCSC_RefGene_Name %in% gene_list)

Something like this!

It would be helpful if you could share example of those dataframes (d_cpg, annotation), otherwise it would be difficult to reproduce the issue

If you do :

gene_list <- c("NR3C1", "FKBP5", "BDNF", "AVP", "CRH")
for (k in gene_list){
  print(sum(d_cpg$Name==k))
}

what is the output ?

0 answers

No answers yet.

Log in to answer this question.