This is a test version of Biostars. For the public version, visit https://www.biostars.org.
genepredtogtf command fails

Hi, I am trying to generate a gtf file using the txt gene annotation file of a virus genome and getting this message. This command line worked perfectly with hg19 or hg38 txt files...So I really don't know what I am doing wrong here.

$ cut -f2-11 XGenome.txt|genePredToGtf file stdin XGenome.gtf

"Expecting at least 10 words line 2 of stdin got 1"

txt to gtf conversion

What are the first few lines of XGenome.txt?

1 answer

I had the same error, and from what I can see, the error comes from the input file. That's because your initial file does not have at least 12 words/columns in all lines, and therefore, after using cut, the resulting words used as input to genePredToGtf are less than 10 (in your case, that happens in the second line).

Therefore, I would recommend you to check that line in your file.

Log in to answer this question.