Entering edit mode
2.8 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!
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?Thanks, my data is like this format.
Yes, "palindromic" is the same as the definition you mentioned in the link.
Thanks and look forward to your help.