zhpn1024 / ribotish

Ribo-seq TIS Hunter, predicting translation initiation sites and ORFs using riboseq data
http://dx.doi.org/10.1038/s41467-017-01981-8
GNU General Public License v3.0
24 stars 7 forks source link

AttributeError: 'Exp' object has no attribute 'sq' #30

Open noepozzan opened 1 year ago

noepozzan commented 1 year ago

Hi,

I am trying to run ribotish on human samples with older genome and annotation (gtf) from 2014.

This is the command I ran:

ribotish predict \
-b file.bam \
-g Homo_sapiens.GRCh37.75_without_bs.gtf \
-f Homo_sapiens.GRCh37.75.dna.primary_assembly.fa \
--ribopara SRR1333394.sorted_indexed.bam.para.py \
--aaseq --tpth 1 --fpth 1 --fspth 1 --fsqth 1 --longest -v \
-o ribotish_pred.txt

This is the error:

Thu Nov 24 10:02:01 2022 Loading genome...
Making fasta index for Homo_sapiens.GRCh37.75.dna.primary_assembly.fa...
No input TIS data!
Thu Nov 24 10:02:42 2022 Predicting...
1
Traceback (most recent call last):
  File "/usr/local/bin/ribotish", line 56, in <module>
    main()
  File "/usr/local/bin/ribotish", line 34, in main
    commands[cmd].run(args)
  File "/usr/local/lib/python3.8/dist-packages/ribotish/run/predict.py", line 236, in run
    for result in pred_iter:
  File "/usr/local/lib/python3.8/dist-packages/ribotish/run/predict.py", line 469, in _pred_gene
    e = getResult(t, tis, o.stop, cds1, cds2, tsq, [ip, ttis.cnts[tis], tps[i], rps[i], rst[i], fsp], o.has_stop_codon)
  File "/usr/local/lib/python3.8/dist-packages/ribotish/run/predict.py", line 499, in getResult
    if aaseq : e.aa = orf.translate(e.sq)
AttributeError: 'Exp' object has no attribute 'sq'

Can you help me on this one?

zhpn1024 commented 1 year ago

I think it is a bug. You can add --seq and try again.

noepozzan commented 1 year ago

It works with "--seq". Thank you! Would love to have the "--aaseq", though. Do you have an idea where the bug may come from?

zhpn1024 commented 1 year ago

You can use both --seq and --aaseq here. I have found the problem and will fix it in the next version.

noepozzan commented 1 year ago

I see. I misunderstood what you meant. But it makes sense that way. Thank you!