infer_experiment.py issue
1
0
Entering edit mode
3.2 years ago
Omar • 0

Hi. When I try to run rseqc to detect the strandness of a bam file (obtained from alignment of reads in paire-end on a genomic reference format gtf using STAR) I get this error:


This is PairEnd Data
Fraction of reads failed to determine: %.4f
Traceback (most recent call last):
  File "/home/omar/Dropbox/TCF19_project/SCRIPTS/infer_experiment.py", line 118, in <module>
    main()
  File "/home/omar/Dropbox/TCF19_project/SCRIPTS/infer_experiment.py", line 103, in main
    print ("Fraction of reads failed to determine: %.4f") % other
TypeError: unsupported operand type(s) for %: 'NoneType' and 'float'

Anyone have a tip?

My bam file composition: enter image description here

My bed file composition: enter image description here

infer_experiment.py • 836 views
ADD COMMENT
0
Entering edit mode

Please copy and paste a small amount of relevant data. Use 10101 button to format that part as code (with a monospace font). Pasting screen shots that show a wall of text are hard to read and not very useful.

ADD REPLY
0
Entering edit mode
3.2 years ago
Mensur Dlakic ★ 29k

The line in the script that throws an error:

print ("Fraction of reads failed to determine: %.4f") % other

should be:

print("Fraction of reads failed to determine: %.4f" % other)

That's assuming that other variable is a float-point number, and the parentheses from print should have this variable inside rather than out.

ADD COMMENT

Login before adding your answer.

Traffic: 2665 users visited in the last hour
Help About
FAQ
Access RSS
API
Stats

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6