How can I extract duplicated rows for the same value and write them down in one row
I have a tsv file for duplicated genes and their transcripts, I need to extract each duplicated gene with their transcripts in one row using bash
input:
STRG.8 STRG.8.1
STRG.8 STRG.8.2
STRG.88 STRG.88.1
STRG.88 STRG.88.2
I need the output to be the gene with the number of duplicated transcripts and these transcripts like this
STRG.8 2 STRG.8.1, STRG.8.2
STRG.88 2 STRG.88.1, STRG.88.2
• 913 views
•
link
0 answers
No answers yet.
Log in to answer this question.
Is
bashyour only option, or are you fine with a bit ofR?