Last active
March 8, 2021 12:47
-
-
Save tuhulab/e6d0f69605b8ecd5a84c2693bd9c8218 to your computer and use it in GitHub Desktop.
quick trick to clean pseudo genes
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
library(dplyr) | |
a_vector_of_genes <- c("AP005212.4", "Z98257.1", "U62317.4", "CLIC4P3", "PGLYRP2", "NEK4P1") | |
a_vector_of_cleaned_genes <- data.frame(a_vector_of_genes) %>% filter(!a_vector_of_genes %>% stringr::str_detect("\\d{1,}P$|\\d{1,}P\\d{1,}$|\\.|-AS\\d{1}|-DT")) %>% pull(a_vector_of_genes) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment