jorvis / biocode

Bioinformatics code libraries and scripts
MIT License
504 stars 247 forks source link

Augustus conversion failing #51

Open jorvis opened 6 years ago

jorvis commented 6 years ago

User @kayussky911 reports:

convert_augustus_to_gff3.py -i augustus_erins.gtf -o new_augustus

my input looks like,

scaffold10x_1 AUGUSTUS gene 3591 4530 0.27 - . g1 scaffold10x_1 AUGUSTUS transcript 3591 4530 0.27 - . g1.t1 scaffold10x_1 AUGUSTUS stop_codon 3591 3593 . - 0 transcript_id "g1.t1"; gene_id "g1"; scaffold10x_1 AUGUSTUS CDS 3591 3859 0.34 - 2 transcript_id "g1.t1"; gene_id "g1"; scaffold10x_1 AUGUSTUS exon 3591 3859 . - . transcript_id "g1.t1"; gene_id "g1"; scaffold10x_1 AUGUSTUS intron 3860 4022 0.28 - . transcript_id "g1.t1"; gene_id "g1"; scaffold10x_1 AUGUSTUS CDS 4023 4530 0.63 - 0 transcript_id "g1.t1"; gene_id "g1"; scaffold10x_1 AUGUSTUS exon 4023 4530 . - . transcript_id "g1.t1"; gene_id "g1"; scaffold10x_1 AUGUSTUS start_codon 4528 4530 . - 0 transcript_id "g1.t1"; gene_id "g1"; scaffold10x_1 AUGUSTUS gene 26186 31433 0.2 - . g2 scaffold10x_1 AUGUSTUS transcript 26186 31433 0.2 - . g2.t1 scaffold10x_1 AUGUSTUS stop_codon 26186 26188 . - 0 transcript_id "g2.t1"; gene_id "g2"; scaffold10x_1 AUGUSTUS CDS 26186 26304 0.37 - 2 transcript_id "g2.t1"; gene_id "g2"; scaffold10x_1 AUGUSTUS exon 26186 26304 . - . transcript_id "g2.t1"; gene_id "g2"; scaffold10x_1 AUGUSTUS intron 26305 29389 0.28 - . transcript_id "g2.t1"; gene_id "g2"; scaffold10x_1 AUGUSTUS CDS 29390 30220 0.39 - 2 transcript_id "g2.t1"; gene_id "g2"; scaffold10x_1 AUGUSTUS exon 29390 30220 . - . transcript_id "g2.t1"; gene_id "g2"; scaffold10x_1 AUGUSTUS intron 30221 30844 0.45 - . transcript_id "g2.t1"; gene_id "g2"; scaffold10x_1 AUGUSTUS CDS 30845 31433 0.41 - 0 transcript_id "g2.t1"; gene_id "g2"; scaffold10x_1 AUGUSTUS exon 30845 31433 . - . transcript_id "g2.t1"; gene_id "g2";

the output just says;

gff-version 3

and that's it. so I think its the last columns of the input files I need to work on.

kayDaramola commented 6 years ago

Regarding the version of Augustus, the file was generated using braker, the AUGUSTUS version should be augustus-3.2.3, although I have augustus.2.5.5 in my environment.

jorvis commented 6 years ago

When you ran Augustus, did you tell it to output GFF? By default its output is GTF. The important option is:

--gff3=on/off
  output in gff3 format

Source

This is also documented in the conversion script:

https://github.com/jorvis/biocode/blob/master/gff/convert_augustus_to_gff3.py#L9

kayDaramola commented 6 years ago

thanks Jorvis

I would repeat the augustus analysis.

jorvis commented 6 years ago

Leaving this open so the script can be modified to support either format from Augustus

On Jan 11, 2018 1:48 PM, "Olukayode Daramola" notifications@github.com wrote:

thanks Jorvis

I would repeat the augustus analysis.

— You are receiving this because you were assigned. Reply to this email directly, view it on GitHub https://github.com/jorvis/biocode/issues/51#issuecomment-357040840, or mute the thread https://github.com/notifications/unsubscribe-auth/AAUMk9-tN6Tz65eXDlFcqqORlS6Nszp0ks5tJmWCgaJpZM4RZrJ6 .

Kapeel commented 5 years ago

Hi, I used the example gtf in the script convert_augustus_to_gff3.py. I get the below error:

convert_augustus_to_gff3.py -i test.gtf -o test.gff3
Traceback (most recent call last):
  File "/Users/kchougul/development/anaconda3/bin/convert_augustus_to_gff3.py", line 189, in <module>
    main()
  File "/Users/kchougul/development/anaconda3/bin/convert_augustus_to_gff3.py", line 91, in main
    gene.print_as(fh=fout, source='AUGUSTUS', format='gff3')
AttributeError: 'NoneType' object has no attribute 'print_as'