Off topic:gff file name replace!
0
0
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;
Assembly • 2.4k views
ADD COMMENT
This thread is not open. No new answers may be added
Traffic: 2807 users visited in the last hour
Help About
FAQ
Access RSS
API
Stats

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6