I have a table with information about SNPs, the table has a total of 55127 rows.
How can I know the number of gene mutations in the table and if a gene is present?
The table is in xls format.
Bioinformatics Stack Exchange is a question and answer site for researchers, developers, students, teachers, and end users interested in bioinformatics. It only takes a minute to sign up.Sign up to join this community
library(readxl) library(dplyr) df <- read_excel(FILENAME)
To get the number of mutations per gene:
df %>% group_by(`Gene name`) %>% summarise(num_mutations=n())
If you want to know if there are mutations in a particular gene:
df %>% filter(`Gene name` == QUERY)