Entering edit mode
7.2 years ago
fufuyou
▴
110
Hi, This is my gff file. I want to change some names. I tried to write a code, but it does not work well. The file is :
Contig11434 EVM gene 148504 151454 . + . ID=SGH012586-RA;Name=Contig11434.9;
Contig11434 EVM mRNA 148504 151454 . + . ID=SGH012586-RA;Parent=SGH012586-RA;Name=Contig11434.9;
Contig11434 EVM exon 148504 148731 . + . ID=Contig11434.9.1;Parent=SGH012586-RA;
Contig11434 EVM CDS 148504 148731 . + 0 ID=SGH012586-RA;Parent=SGH012586-RA;
Contig11434 EVM exon 149332 149538 . + . ID=Contig11434.9.2;Parent=SGH012586-RA;
I want to get the modified file is:
Contig11434 EVM gene 148504 151454 . + . ID=SGH012586-RA;Name=SGH012586-RA;
Contig11434 EVM mRNA 148504 151454 . + . ID=SGH012586-RA;Parent=SGH012586-RA;Name=SGH012586-RA;
Contig11434 EVM exon 148504 148731 . + . ID=SGH012586-RA.1;Parent=SGH012586-RA;
Contig11434 EVM CDS 148504 148731 . + 0 ID=SGH012586-RA;Parent=SGH012586-RA;
Contig11434 EVM exon 149332 149538 . + . ID=SGH012586-RA.2;Parent=SGH012586-RA;