Hello,
I am attempting to use the tin.py script in the RSeQC package, on BAM files generated by STAR aligner.
When running tin.py, I end up with the following error:
/python-2.7.15/lib/python2.7/site-packages/numpy/core/fromnumeric.py:2957: RuntimeWarning: Mean of empty slice.
out=out, **kwargs)
/python-2.7.15/lib/python2.7/site-packages/numpy/core/_methods.py:80: RuntimeWarning: invalid value encountered in double_scalars
ret = ret.dtype.type(ret / rcount)
/python-2.7.15/lib/python2.7/site-packages/numpy/core/_methods.py:135: RuntimeWarning: Degrees of freedom <= 0 for slice
keepdims=keepdims)
/python-2.7.15/lib/python2.7/site-packages/numpy/core/_methods.py:105: RuntimeWarning: invalid value encountered in true_divide
arrmean, rcount, out=arrmean, casting='unsafe', subok=False)
/python-2.7.15/lib/python2.7/site-packages/numpy/core/_methods.py:127: RuntimeWarning: invalid value encountered in double_scalars
ret = ret.dtype.type(ret / rcount)
@ 2018-06-09 12:14:41: Processing CmusAligned.sortedByCoord.out.bam
I don't know where to start fixing this/don't know where the problem comes from, so any guidance would be much appreciated!
freuv
1 answer
Old post, but I just had the same issue. The warnings are numpy warnings due to division by zero. In my case, the transcripts were not getting any coverage (see the .xls output) because the chromosomes in the .bed reference and the bam file were different. In the bam file, the chromosomes were called chr1, chr2, ... and in the genome which was used during alignment, the chromosomes were simply numbered 1, 2, ...
I fixed this by removing the 'chr' prefix from the chromosomes in the .bed file I used as reference:
awk 'BEGIN{FS=OFS="\t"} {gsub(/chr/, "", $1)} 1' reference.bed > no_chr_prefix_reference.bed
Log in to answer this question.
I don't see an error, just warnings.