Contig order rearranged agat
0
0
Entering edit mode
9 months ago
plain_text • 0

Hi,

I annotated a genome with prokka and while converting to GTF with agat, I get the following error:

=> Version of the Bioperl GFF parser selected by AGAT: 3
gff3 reader error level1: No ID attribute found @ for the feature: ...
1 warning messages: gff3 reader error level1: No ID attribute found

I'm guessing from this thread AGAT - Another Gff/Gtf Analysis Toolkit that agat automatically fixes the error but the output gtf file has all my contigs rearranged in a different order: contigs 4, 2, 1.... which makes it incompatible (returning 0s) when I use featureCounts....

How do I fix this? I'm not sure if I'm missing something basic... Thanks in advance xx

transcriptomics • 881 views
ADD COMMENT
0
Entering edit mode

You can sort your GTF file using AGAT to get it back in correct order : https://agat.readthedocs.io/en/latest/topological-sorting-of-gff-features.html

ADD REPLY
0
Entering edit mode

Thank you for the resource, I'll have a look :)

ADD REPLY
0
Entering edit mode

Could you show the error thrown by feature count? I don’t think the order from agat gtf/gff output is the problem

ADD REPLY
0
Entering edit mode

Hi, :)

FeatureCounts did not give me an error message but a count file with 0 counts: contig 2 pos1 po2 strand length count=0; contig 2 pos3 po4 strand length count=0; contig 1 pos1 po2 strand length count=0; contig 1 pos3 po4 strand length count=0;

The original gff annotation was in this order: contig 1 ... features; contig 1 ... features; contig 2 ... features; contig 2 ... features;

Agat had rearranged the contigs in a different order 4,3,1,6 etc (not sure im explaining this well enough, sorry I have deleted the files so I cant refer to them here), but it wasn't the kind of sorting referred to in the link shared by GenoMax.

I had an unconventionally named genome assembly, so I went in and changed the names of the contigs manually and reannotated the genome, after which it worked, but it would be great to know why when using Agat that change in order occurred.

Thank you for helping me out regardless :)

ADD REPLY
1
Entering edit mode

Maybe if you have space between contig and the number. I already seen some limitation for the sequence ordering. In the next release (1.2.0, but it is already in the version available in the master branch of the repo), I use sort naturally to avoid problems in sorting sequence ID.

ADD REPLY

Login before adding your answer.

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