ed-lau / jcast

Junction centric alternative splicing translator
MIT License
19 stars 3 forks source link

Bio.Alphabet has been removed from Biopython #7

Closed GundryLab closed 2 years ago

GundryLab commented 3 years ago

Bio.Alphabet has been removed from Biopython

Please see: https://biopython.org/wiki/Alphabet

Because of this, JCAST does not run with the latest BioPython (1.78, released Sept. 4, 2020). The error is: "Bio.Alphabet has been removed from Biopython. In many cases, the alphabet can simply be ignored and removed from scripts. In a few cases, you may need to specify the molecule_type as an annotation on a SeqRecord for your script to work correctly. Please see https://biopython.org/wiki/Alphabet for more information."

ed-lau commented 3 years ago

Thanks for picking this up -- can you try the latest on GitHub to see if it works for your data. I tried it on the test files and will take a closer look. If everything is OK I will stage for the next PyPI version.

mranjan1 commented 3 years ago

I installed jcast using the pip command and encountered the same error. Then I downloaded the jcast folder from github and installed it using python setup.py install but the error is persisting.

ed-lau commented 3 years ago

I will look into this. In the meantime installing from pip then downgrading to BioPython 1.77 might be a workaround.

mranjan1 commented 3 years ago

Hello again,

Using pip uninstall I removed the python 1.78 following which I downloaded biopython 1.77 from the source page and installed it using python setup.py install method. The installation returned no error.

Upon execution of jcast, it returned the following error:

pandas.core.computation.ops.UndefinedVariableError: name 'transcript_biotype' is not defined

Is this an error related to biopython version or is there something wrong in my command line as given below:

python -m jcast /home/jcast/diff_col/ /home/genome/gencode.v35.annotation.gtf /home/genome/GRCh38.primary_assembly.genome.fa -o /home/jcast/output/diff_col/

thanks!

ed-lau commented 3 years ago

The current github version should work with Biopython 1.78 but not 1.77; or at least when it did I tried a couple of datasets on my computer. If you use Biopython 1.77, you should install the PyPI Jcast release through pip, rather than install from github.

If you could send me the full error message when using the github version and Biopython 1.78 that could help me pinpoint where the problem is. Thanks!

mranjan1 commented 3 years ago

I've attached the error as a text file and jcast log file. I'm running the Github version of jcast with Biopython 1.78 error.txt jcast_main.log

ed-lau commented 3 years ago

could you try using an ensembl annotation gtf to see if it works for you for the time being? I will look into what is causing the error with gencode in the next few days.

mranjan1 commented 3 years ago

Sure, I'll try but I've used Gencode gtf and fasta for the initial alignment using STAR.

ed-lau commented 3 years ago

Ok - I just pushed a very quick fix to Github (Gencode uses transcript_type vs. Ensembl's transcript_biotype to denote coding transcripts in the gtf). Could you let me know if Jcast runs for your data now?

ed-lau commented 3 years ago

Moved to #8.

pkokate18 commented 2 years ago

I am having a similar issue while running ductape package. Can you please suggest what I can do as a workaround?