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

Problems with primary_transcript.py #345

Closed
mbarkdull opened this issue Feb 12, 2020 · 2 comments
Closed

Problems with primary_transcript.py #345

mbarkdull opened this issue Feb 12, 2020 · 2 comments

Comments

@mbarkdull
Copy link

Hi!

I'm encountering two issues with primary_transcript.py. One, the command given in the OrthoFinder tutorials to run the script gives the path to the script incorrectly:
for f in *fa ; do python ~/orthofinder-tutorial/OrthoFinder/tools/primary_transcript.py $f ; done
where it should be:
for f in *fa ; do python ~/orthofinder_tutorial/OrthoFinder/tools/primary_transcript.py $f ; done
This might save other folks some frustration in trying to figure out why the script can't be found.

Second, when I do run the primary_transcript.py script on my dowloaded proteomes, I get this whole series of errors:

Traceback (most recent call last):
  File "/Users/meganbarkdull/orthofinder_tutorial/OrthoFinder/tools/primary_transcript.py", line 147, in <module>
    main(args)
  File "/Users/meganbarkdull/orthofinder_tutorial/OrthoFinder/tools/primary_transcript.py", line 143, in main
    CreatePrimaryTranscriptsFile(fn, dout)
  File "/Users/meganbarkdull/orthofinder_tutorial/OrthoFinder/tools/primary_transcript.py", line 63, in CreatePrimaryTranscriptsFile
    if not line.startswith(">"): continue
TypeError: startswith first arg must be bytes or a tuple of bytes, not str
Traceback (most recent call last):
  File "/Users/meganbarkdull/orthofinder_tutorial/OrthoFinder/tools/primary_transcript.py", line 147, in <module>
    main(args)
  File "/Users/meganbarkdull/orthofinder_tutorial/OrthoFinder/tools/primary_transcript.py", line 143, in main
    CreatePrimaryTranscriptsFile(fn, dout)
  File "/Users/meganbarkdull/orthofinder_tutorial/OrthoFinder/tools/primary_transcript.py", line 63, in CreatePrimaryTranscriptsFile
    if not line.startswith(">"): continue
TypeError: startswith first arg must be bytes or a tuple of bytes, not str
Traceback (most recent call last):
  File "/Users/meganbarkdull/orthofinder_tutorial/OrthoFinder/tools/primary_transcript.py", line 147, in <module>
    main(args)
  File "/Users/meganbarkdull/orthofinder_tutorial/OrthoFinder/tools/primary_transcript.py", line 143, in main
    CreatePrimaryTranscriptsFile(fn, dout)
  File "/Users/meganbarkdull/orthofinder_tutorial/OrthoFinder/tools/primary_transcript.py", line 63, in CreatePrimaryTranscriptsFile
    if not line.startswith(">"): continue
TypeError: startswith first arg must be bytes or a tuple of bytes, not str
Traceback (most recent call last):
  File "/Users/meganbarkdull/orthofinder_tutorial/OrthoFinder/tools/primary_transcript.py", line 147, in <module>
    main(args)
  File "/Users/meganbarkdull/orthofinder_tutorial/OrthoFinder/tools/primary_transcript.py", line 143, in main
    CreatePrimaryTranscriptsFile(fn, dout)
  File "/Users/meganbarkdull/orthofinder_tutorial/OrthoFinder/tools/primary_transcript.py", line 63, in CreatePrimaryTranscriptsFile
    if not line.startswith(">"): continue
TypeError: startswith first arg must be bytes or a tuple of bytes, not str
Traceback (most recent call last):
  File "/Users/meganbarkdull/orthofinder_tutorial/OrthoFinder/tools/primary_transcript.py", line 147, in <module>
    main(args)
  File "/Users/meganbarkdull/orthofinder_tutorial/OrthoFinder/tools/primary_transcript.py", line 143, in main
    CreatePrimaryTranscriptsFile(fn, dout)
  File "/Users/meganbarkdull/orthofinder_tutorial/OrthoFinder/tools/primary_transcript.py", line 63, in CreatePrimaryTranscriptsFile
    if not line.startswith(">"): continue
TypeError: startswith first arg must be bytes or a tuple of bytes, not str
Traceback (most recent call last):
  File "/Users/meganbarkdull/orthofinder_tutorial/OrthoFinder/tools/primary_transcript.py", line 147, in <module>
    main(args)
  File "/Users/meganbarkdull/orthofinder_tutorial/OrthoFinder/tools/primary_transcript.py", line 143, in main
    CreatePrimaryTranscriptsFile(fn, dout)
  File "/Users/meganbarkdull/orthofinder_tutorial/OrthoFinder/tools/primary_transcript.py", line 63, in CreatePrimaryTranscriptsFile
    if not line.startswith(">"): continue
TypeError: startswith first arg must be bytes or a tuple of bytes, not str

It seems that there is an error in the script such that it is not reading the .fasta files correctly, but I don't know enough to locate and fix the problem.

Thanks so much for the help!

@davidemms
Copy link
Owner

Hi

Thanks for letting me know about this, I've updated the primary_transcript.py script to make it compatible with python3 so that should resolve those problems.

I've also updated the tutorial so that it refers to "orthofinder_tutorial", which now makes it consistent with the previous tutorial etc.

All the best
David

@mbarkdull
Copy link
Author

Thank you so much! I really appreciate it.

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