Question: How to replace the "." in a table with "0"
0
gravatar for bright602
2.8 years ago by
bright60240
bright60240 wrote:

Hi there, I am working with a gff file, however I find that the 8th phase column of CDS are "." instead of integers such as "0" or "1" or "2". Could anyone show me a command line that can replace the "." with "0" in 8th column when the 4th column is CDS?

Thanks!

DDB0232428  Sequencing Center   exon    1890    3287    .   +   .   Parent=DDB0216437
DDB0232428  Sequencing Center   CDS 1890    3287    .   +   .   Parent=DDB0216437
DDB0232428  Sequencing Center   exon    3848    4855    .   +   .   Parent=DDB0216438
DDB0232428  Sequencing Center   CDS 3848    4855    .   +   .   Parent=DDB0216438
sequence next-gen • 547 views
ADD COMMENTlink modified 2.8 years ago by ATpoint41k • written 2.8 years ago by bright60240
3
gravatar for ATpoint
2.8 years ago by
ATpoint41k
Germany
ATpoint41k wrote:
awk 'OFS="\t" {if ($4 == "CDS") $8 = "0"; print $0}' in.gff > out.gff
ADD COMMENTlink modified 2.8 years ago • written 2.8 years ago by ATpoint41k
Please log in to add an answer.

Help
Access

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.
Powered by Biostar version 2.3.0
Traffic: 1848 users visited in the last hour