jorvis / biocode

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

convert_augustus_to_gff3.py error #64

Closed JingXia730 closed 5 years ago

JingXia730 commented 5 years ago

Hi,

I used the convert_augustus_to_gff3.py with the code python3 convert_augustus_to_gff3.py -i RH88_augustus_draft.gff -o RH88_augustus_draft_converted.gff3

And I got the following error: Traceback (most recent call last): File "convert_augustus_to_gff3.py", line 179, in <module> main() File "convert_augustus_to_gff3.py", line 135, in main feat_id = gff.column_9_value(cols[8], 'ID') NameError: name 'gff' is not defined

I tried run the script directly ./convert_augustus_to_gff3.py -i RH88_augustus_draft.gff -o RH88_augustus_draft_converted.gff3 but it didn't work.

My python version is python/3.7.0. How can I fix this?

Thanks!! Jing

jorvis commented 5 years ago

Do you mind compressing and attaching your input file? I don't have any augustus ones currently to test with.

JingXia730 commented 5 years ago

This is the input file Test_augustus.gff.gz

jorvis commented 5 years ago

Thank you. And did you install biocode via pip or git checkout?

JingXia730 commented 5 years ago

No, I just directly run this script. Should I install biocode first?

jorvis commented 5 years ago

It's fine to operate from a checkout rather than installing, you just have to modify PYTHONPATH so it knows where to find the modules. From the README:

cd /opt git clone https://github.com/jorvis/biocode.git

You probably want to add this line to your $HOME/.bashrc file

export PYTHONPATH=/opt/biocode/lib:$PYTHONPATH

jorvis commented 5 years ago

When I did this the conversion ran fine. Attaching result. test.gff3.gz