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

Encountered error when using ribotish predict #35

Closed lbwfff closed 7 months ago

lbwfff commented 7 months ago

Dear developer, I am using ribotish to predict ORF from Ribo-seq data, but I am getting some errors while running ribotish predict, here is my code:

INPUT_DIR="/scratch/lb4489/project/liver_ribo/mapping/ribotish/LC001_normal_RPFAligned.sortedByCoord.out.bam,/scratch/lb4489/project/liver_ribo/mapping/ribotish/LC001_tumor_RPFAligned.sortedByCoord.out.bam"

ribotish predict -b "$FILES" -g /scratch/lb4489/bioindex/gencode_human_plus_selNONCODE.gtf -f /scratch/lb4489/bioindex/GRCh38.p14.genome.fa --framebest -o ribotish_demo.txt

Here is the error message

No offset parameter file found for . Using default offset (12). 
No input TIS data!
Fri Mar  1 12:35:28 2024 Predicting...
Traceback (most recent call last):
  File "/home/lb4489/.conda/envs/ribotish/bin/ribotish", line 56, in <module>
    main()
  File "/home/lb4489/.conda/envs/ribotish/bin/ribotish", line 34, in main
    commands[cmd].run(args)
  File "/home/lb4489/.conda/envs/ribotish/lib/python2.7/site-packages/ribotish/run/predict.py", line 236, in run
    for result in pred_iter:
  File "/home/lb4489/.conda/envs/ribotish/lib/python2.7/site-packages/ribotish/run/predict.py", line 375, in _pred_gene
    ribombl = ribo.multiRiboGene(g, ribobampaths, offdict = riboffdict, compatible = compatible, mis = compatiblemis, paired = paired)
  File "/home/lb4489/.conda/envs/ribotish/lib/python2.7/site-packages/ribotish/zbio/ribo.py", line 504, in multiRiboGene
    mbl.merge(bam.BamLoadChr(bampaths[i], chr = gene.chr, region = regions[gene.chr], strand = gene.strand, posFunc = offunc, maxNH = maxNH, minMapQ = minMapQ, secondary = secondary, paired = paired))
  File "/home/lb4489/.conda/envs/ribotish/lib/python2.7/site-packages/ribotish/zbio/bam.py", line 583, in __init__
    bamfile = Bamfile(bampath)
  File "pysam/calignmentfile.pyx", line 318, in pysam.calignmentfile.AlignmentFile.__cinit__ (pysam/calignmentfile.c:4730)
  File "pysam/calignmentfile.pyx", line 388, in pysam.calignmentfile.AlignmentFile._open (pysam/calignmentfile.c:5652)
  File "pysam/calignmentfile.pyx", line 534, in pysam.calignmentfile.AlignmentFile._open (pysam/calignmentfile.c:7261)
IOError: file `` not found

Firstly, I generated the offset parameter file in the bam file location and also tried copying the offset parameter file to the current folder. But ribotish doesn't even seem to recognise it automatically, what should I do. Secondly I don't quite understand how to fix the error reported, I have installed pysam version 0.8.4 using pip, can you help me see what the problem is.

Thanks, LeeLee

zhpn1024 commented 7 months ago
  1. The error says the input file name is empty. What's the content of $FILES?
  2. the offset parameter file is corresponding to the input bam file path. If you link the original bam file to the current folder, the offset file also need to be in the current folder (can be a link).
lbwfff commented 7 months ago

Sorry, I've just realised it's because I'm using the wrong variables to cause this.