How to select panlindromic SNPs in R
0
0
Entering edit mode
2.2 years ago
Phylicia ▴ 10
setwd("C:\\XXX")
data <- read.table("XXX.csv", head = TRUE, sep = ",")

library("dplyr")

data <- data %>% mutate ("Alleles" = paste0(data$effectallele,"/", data$NonEA))

data$panlindromic<-sapply(data$Alleles, function(x){x %in% c("(A/T)","(T/A)","(C/G)","(G/C)")}) & sapply(data$EAF, function(x){x >0.42})

data <- data[which(data$panlindromic==F),]

The aboved lines are my code. I merge the effect alleles and non-effect alleles into a column named Alleles, and I want to select panlidromic alleles among column Alleles. But the results show all FALSE, without filtering. I want to see what the wrong is. Thank you very much!

SNP panlindromic • 589 views
ADD COMMENT
0
Entering edit mode

Can you give examples of what you are looking for? By "palindromic" do you mean as in here? Can you give samples of your data, what format is it in ("CSV" doesn't suggest a standard)? What preprocessing have you done? Are you sure that (A/T) is what your data looks like?

ADD REPLY
0
Entering edit mode

Thanks, my data is like this format. enter image description here

Yes, "palindromic" is the same as the definition you mentioned in the link.

Thanks and look forward to your help.

ADD REPLY

Login before adding your answer.

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