Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

pip2 install biocode error #49

Closed
kayDaramola opened this issue Dec 28, 2017 · 10 comments
Closed

pip2 install biocode error #49

kayDaramola opened this issue Dec 28, 2017 · 10 comments

Comments

@kayDaramola
Copy link

Hi I tried installing biocode using pipe3 in python3, and here is the output (I also tried using pip install biocode, from python 3.6.3 in anaconda)

Collecting biocode
Using cached biocode-0.5.3.tar.gz
Complete output from command python setup.py egg_info:
Traceback (most recent call last):
File "/tmp/pip-build-a5aeh2_4/biocode/setup.py", line 5, in
from pypandoc import convert
ModuleNotFoundError: No module named 'pypandoc'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "<string>", line 1, in <module>
  File "/tmp/pip-build-a5aeh2_4/biocode/setup.py", line 8, in <module>
    raise Exception("Error: pypandoc module not found, could not convert Markdown to RST")
Exception: Error: pypandoc module not found, could not convert Markdown to RST

----------------------------------------

Command "python setup.py egg_info" failed with error code 1 in /tmp/pip-build-a5aeh2_4/biocode/

I need to convert augustus gtf to GFF3 format

any ideas?
Thanks
Kay

@jorvis
Copy link
Owner

jorvis commented Dec 28, 2017 via email

@jorvis
Copy link
Owner

jorvis commented Dec 29, 2017

Did you make any progress here? Also, the title said you were attempting this using pip2, but the body of your report said pip3. Just in case, biocode isn't supported in Python 2.x

@jorvis
Copy link
Owner

jorvis commented Jan 10, 2018

Marking as resolved, since the current code no longer has the dependency which caused this error.

@jorvis jorvis closed this as completed Jan 10, 2018
@kayDaramola
Copy link
Author

Hi Jorvis,
thanks for the reply, I've been away.
I actually used` pip install biocode, to install biocode-0.5.3
just figuring out how to use it to convert my gff or gtf to GFF3
Kay

@jorvis
Copy link
Owner

jorvis commented Jan 10, 2018

OK, so you got a successful installation now? If so, you can just run the convert_augustus_to_gff3.py script, which should now be in your PATH. Run it without arguments to see usage:

$ convert_augustus_to_gff3.py
usage: convert_augustus_to_gff3.py [-h] -i INPUT -o OUTPUT
convert_augustus_to_gff3.py: error: the following arguments are required: -i/--input, -o/--output

@kayDaramola
Copy link
Author

what I've is to
$ python
then;

import biocode.gff
(assemblies, features) = biocode.gff.get_gff3_features( "/pub38/kayussky/gff_to_GTF3/augustus_erins.gff" )

says;
Traceback (most recent call last):
File "", line 1, in
File "/pub38/kayussky/biocode/lib/biocode/gff.py", line 252, in get_gff3_features
atts = column_9_dict(cols[8])
File "/pub38/kayussky/biocode/lib/biocode/gff.py", line 101, in column_9_dict
raise Exception("Bad column 9 format: {0}".format(colstring) )
Exception: Bad column 9 format: g1

it does bring me back to why i wanted to install biocode in the first place, seems the last column (9), which contains the attributes is in a bad format, thats why I couldnt use it in the first place. Unfortunately, I just trying to learn how to maybe use python to re-write affected columns.

@jorvis
Copy link
Owner

jorvis commented Jan 10, 2018

Do you mind attaching the file or putting it somewhere I can download it? Also, which version of Augustus are you using?

The biocode.gff.get_gff3_features() will only work if the GFF3 is valid already and the output from Augustus isn't. The script I mentioned is used to transform the August GFF into actual, valid GFF3, after which you can use the biocode libraries on it.

@kayDaramola
Copy link
Author

so I tried what you suggested:

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.

Thanks for your assistance so far

@jorvis
Copy link
Owner

jorvis commented Jan 10, 2018

OK, that helps. Can you tell me what version of Augustus was used to generate this file? Mario does like changing the output formats occasionally, so I'll need to modify the conversion script to account for the different versions.

@jorvis jorvis reopened this Jan 10, 2018
@jorvis
Copy link
Owner

jorvis commented Jan 10, 2018

Let's please shift this discussion to issue #51, since the installer isn't an issue here.

@jorvis jorvis closed this as completed Jan 10, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants