Entering edit mode
8.9 years ago
MAPK
★
2.1k
Hi Guys,
I have a huge table like the one shown below with repeated snp positions. I want to combine all the rows with same position and get the nucleotide counts for each position as shown in the result. Thank you for your help!
df1
seqnames pos nucleotide count
1: chr11 1643082 A 1
2: chr11 1643082 C 3
3: chr11 1643082 T 18
4: chr11 47663948 C 27
5: chr11 47663948 T 2
result
chr11:1643082 T:18,C:3,A:1
chr11 47663948 C:27,T:2