mikpom / uslcount

Quantitation of gene expression from read alignments
GNU General Public License v3.0
0 stars 0 forks source link

Error in calculating junction probabilities #2

Open balayev1 opened 4 years ago

balayev1 commented 4 years ago

Hello, I'm trying to run python3 -m uslcount analyze command on my unstranded RNA-seq bam file:

python3 -m uslcount analyze -out DLBCL -count_intron_overlapping yes -count_qc_failed no -mapq 20 /home/ubuntu /home/ubuntu/I04-1731_s.bam

but get this error:

Calculating junction probabilities... Traceback (most recent call last): File "/usr/lib/python3.6/runpy.py", line 193, in _run_module_as_main "__main__", mod_spec) File "/usr/lib/python3.6/runpy.py", line 85, in _run_code exec(code, run_globals) File "/home/ubuntu/uslcount/uslcount/__main__.py", line 94, in <module> quiet=args.quiet) File "/home/ubuntu/uslcount/uslcount/main.py", line 294, in analyze_bam freqs = gdat.jct_freq(rl) File "/home/ubuntu/uslcount/uslcount/gdata.py", line 294, in jct_freq overhang=sj_overhang) File "/home/ubuntu/uslcount/uslcount/utils.py", line 36, in jct_freq return jctn_pos / (trt_len - rl) ZeroDivisionError: division by zero

My reads in the file are 100 bp long, so I'm not sure how they can span the whole transcript. And if they do, could you please help to resolve the issue? Thanks in advance. Ubuntu version: 18.04

Kind regards, Agshin

mikpom commented 4 years ago

Greetings!

The error seems to be not too hard to fix. However could you provide a sample to reproduce it? Ideally it should be a small subset of GTF (link to the whole genome GTF would probably suffice too). -Mikhail

balayev1 commented 4 years ago

Greetings!

The error seems to be not too hard to fix. However could you provide a sample to reproduce it? Ideally it should be a small subset of GTF (link to the whole genome GTF would probably suffice too). -Mikhail

Hello, Thank you for the reply. This is the link to the GTF file: ftp://ftp.ebi.ac.uk/pub/databases/gencode/Gencode_human/release_34/gencode.v34.annotation.gtf.gz

Kind regards, Agshin

mikpom commented 4 years ago

Should be fixed in 7f4589b6f0be14f1eb87fc95202aa3a4bed568d3. Do pip install --upgrade -e git+https://github.com/mikpom/uslcount.git#egg=uslcount to try out.