Extract gene_id and protein_id from .gtf file to create a list with them
0
0
Entering edit mode
23 days ago

Hi everyone!

I'm trying to create a list with de gene_id and respective protein_id from a .gtf file, I want to extract de information using a simple line code. I tried using this command:

grep -o 'gene_id "[^"]*"\|protein_id "[^"]*"' file.gtf | paste - - > lista_genes_proteins.txt

But the paste results in the list are not correct. Does anyone know how I can do this? Can help me, please? Thanks.

gtf bash protein_id • 384 views
ADD COMMENT
1
Entering edit mode
ADD REPLY
0
Entering edit mode

Thanks! I resolve it using a different command line and sublime text to edit the text.

I use this command line:

grep -w 'CDS' GCF_003086295.2_arahy.Tifrunner.gnm1.KYV3_genomic.gtf| cut -f9 > columna_9.txt

and use sublime text to edit the file columna_9.txt, It works!.

thanks for taking the time to answer.

ADD REPLY

Login before adding your answer.

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