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 communityI 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.
For working with a relatively small dataset in tabular format, I would recommend dplyr. You can read in a excel
file using readxl
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)