This is a test version of Biostars. For the public version, visit https://www.biostars.org.
How to convert gff file to a csv file

Hello,

I wanted to know how one can convert a GFF file to CSV file. I need to compare a few genes I have found and placed in an excel sheet with the gff file. I am not able to find a code that could work. and I myself am bad at programming so..\

Any help will be appreciated, Thank you

next-gen sequencing gene

2 answers

You could try this :

awk -F '\t' -v OFS=, '!/^#/ {$1=$1;print}' file.gff > file.csv;

It will ignore lines starting with '#" in your GFF and convert tab to comma

I have attempted this conversion: https://github.com/zyxue/gtf2csv, may be helpful to some one.

Log in to answer this question.