Entering edit mode
6.2 years ago
HZZ0036
▴
30
Hi,
I want to use 'Sed' to change the names in both sequences and annotation files. Such as change
scaffold1_size2426064 exon
scaffold2_size1571916 exon
scaffold3_size1509833 gene
scaffold4_size1453470
scaffold5_size1243770
scaffold6_size1253778
scaffold7_size1219719
scaffold8_size1223566
scaffold9_size1121364
scaffold10_size1060754
...... to
scaffold1 exon
scaffold2 exon
scaffold3 gene
scaffold4
scaffold5
scaffold6
scaffold7
scaffold8
scaffold9
scaffold10
Delete '_'and the following things. I tried sed 's/_size*//g' file
but it didn't work. And I don't want to use blank to instead those things in my annotation file. Does anybody know how to do this? Thanks.
Zhang