mhammell-laboratory / TEtranscripts

A package for including transposable elements in differential enrichment analysis of sequencing datasets.
http://hammelllab.labsites.cshl.edu/software/#TEtranscripts
GNU General Public License v3.0
206 stars 29 forks source link

Personal GTF file error #90

Closed AlBaarS closed 3 years ago

AlBaarS commented 3 years ago

Hello

I am using a custom GTF file for a fungus, but whatever I do, I cannot get TEtranscripts to accept the file.

I have read issues #21 and #6, and I followed the instructions described in issue #21, adding the class_id and family_id with a python script, as the class_id and family_id fields were not present at first. However, even when adding those, I still get the error.

Here is the first line of my (final) GTF file: HiC_scaffold_1 EDTA transposon 3172 3272 . . . gene_id "LTR/Copia"; ID "851"; Name "98"; thickStart "LTR/Copia"; family_id "LTR/Copia"; class_id "LTR/Copia";

I have had to do several conversion steps, as the output I had was a BED file, which I converted (with AGAT) to GFF3 and then to GTF, and finally adding the class_id and family_id.

Here is the same line of my (original) BED file: HiC_scaffold_1 3171 3272 98 C RLX-incomp-chim_C7_LTR LTR/Copia

And the converted GFF3 file: HiC_scaffold_1 EDTA transposon 3172 3272 . TE_00000160_LTR . ID=851;Name=98;thickStart=LTR/Copia

With the number of conversion/modification steps (3 in total), I don't see any information disappearing, however, AGAT inflates some info. Does this cause the error? Or is something else wrong? Do you have any tips for fixing it?

Thanks in advance :)

Alejandro

EDIT: While it looks like spaces, it is tab separated (triple-checked)!

olivertam commented 3 years ago

Hi Alejandro,

Thank you for your interest in the software. I noticed that the third column is transposon. It should be exon, as this is the feature that would be recognized by the software to use as annotation. It is also missing the transcript_id field. It is also interesting that there is no standard strand information (e.g. + or -) for your TE, though I suspect that your BED file column 5 (with the C) probably refers to Watson/Crick strand.

In your case, I would recommend starting from your BED file, and generate your TE GTF with the following information:

That should be sufficient to make it work.

You can also try using our TE GTF generating script (unzip to use):

  1. Change values in BED column 5 to + or -
  2. Run the TE GTF script using the following parameters:
    $ perl makeTEgtf.pl -c 1 -s 2 -e 3 -o 5 -t 6 -f 7 -C 7 [your BED file] > [TE GTF]

Please let us know if you encounter any more issues. Thanks.

AlBaarS commented 3 years ago

Hi Oliver,

Thank you for the response. Using your perl script to create my GTF helped, TEtranscripts is now running fine by the looks of it. Thank you for sharing the script. I would like to suggest adding it as is to the toolkit, so that others who encounter the same issue in the future can immediately solve it :)

olivertam commented 3 years ago

Hi Alejandro,

Thank you for your suggestion. The script is technically in beta (and in another language), so we decided not to include it with the toolkit for now. We prefer to recommend it on a case-by-case basis, as it is heavily dependent on what is used as the input.

Thanks.