How to replace the "." in a table with "0"
1
0
Entering edit mode
4.4 years ago
bright602 ▴ 50

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
next-gen sequence • 712 views
ADD COMMENT
3
Entering edit mode
4.4 years ago
ATpoint 62k
awk 'OFS="\t" {if ($4 == "CDS") $8 = "0"; print $0}' in.gff > out.gff
ADD COMMENT

Login before adding your answer.

Traffic: 1694 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