Entering edit mode
2.4 years ago
Nova
▴
20
Is there a method to automate the counting of all the numbers for every gene -including all different variants. Thats for large number of genes over 10000 genes.
Variant | numbers_cases | numbers_control | Gene |
---|---|---|---|
1 | 20 | 55 | ABC |
2 | 48 | 149 | ABC |
3 | 20 | 456 | ABC |
4 | 73 | 55 | TET |
5 | 48 | 77 | TET |
6 | 189 | 454 | TET |
Out put I want
| Gene | numbers_cases | numbers_control |
| ------- | --------- | --------|
| ABC |88 |660 |
| TET|310 |586 |
with datamash
with csvtk
with R data table:
with base R:
R, Datamash and csvtk don't come by default with OS. You may have to install via apt, yum, brew, conda etc.
Tidyverse solution.