fallerlab/Ribo-ODDR

Ribo-ODDR.py runs on Python 3 while TopHat2 on Python 2.7

Closed this issue · 2 comments

Hi, when I ran Ribo-ODDR.py using trimmed-read files, I used the following command (the arguments were successfully parsed) and got the following error message. I suspect that this might be because I ran this command under a conda environment where Python 3, Biopython 1.76 and pysam are installed, while TopHat v2.1.1 (the latest version) uses Python 2.7 (TopHat2 is installed on our campus cluster), so when TopHat2 was run using Python 3, some error occurred. I am wondering if there is any way to solve this problem. Thanks!

Command:

python Ribo-ODDR.py -r rRNA_20210321.fasta -o out -fp trimmed -fs .fq --bowtie2-build_exe d --samtools_exe d --tophat_exe d -s S1_trimmed --RIsearch2_exe d

Error message:

ERROR: File "/opt/apps/rhel7/tophat-2.1.1/bin/tophat", line 1003
except getopt.error, msg:
^
SyntaxError: invalid syntax

Hi there! Quick solution would be to map the trimmed-reads to your rRNAs outside Ribo-ODDR and feed the ".bam" files to Ribo-ODDR instead. Be aware that you have to use the same rRNA sequence file for the alignment and Ribo-ODDR. Let me know if that solves your problem.

Thanks! So we aligned the reads by ourselves and then used your scripts, and it worked!
Thanks again for this great and timely package!