How to extract certain lines from gff3 file?
1
0
Entering edit mode
2.1 years ago
Kurban ▴ 230

How to extract lines with GENE from gff3 file and write them into another file?

file content as blow:

NW_008989317.1 Gnomon CDS 2122 2224 . + 1 Parent=rna51510;ID=CDS:rna51510:9 NW_008989317.1 Gnomon CDS 2347 2493 . + 0 ID=CDS:rna51510:10;Parent=rna51510 NW_008989317.1 Gnomon gene 77367 78593 . + . Name=LOC103941441;ID=gene40805;Name=gene40805 NW_008989317.1 Gnomon mRNA 77367 78593 . + . Parent=gene40805;ID=rna51515 NW_008989317.1 Gnomon CDS 77367 77922 . + 0 Parent=rna51515;ID=CDS:rna51515:1 NW_008989317.1 Gnomon CDS 78059 78276 . + 2 Parent=rna51515;ID=CDS:rna51515:2

gff3 gene_ids extract • 468 views
ADD COMMENT
2
Entering edit mode
2.1 years ago
Jichen Wen ▴ 30

Open your terminal and change to your directory that .gff3 located, then run the following command.

awk '$3=="gene" {print $0}' INPUT.gff3 > OUTPUT.gff3
ADD COMMENT

Login before adding your answer.

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