Top 10 genes with highest correlation to Rv3582c/ispD:
none
Correlation of Rv3582c/ispD with Rv3582c/ispD
--> -->
ValueError |
Python 3.12.3: /usr/bin/python3 Mon Dec 2 17:01:02 2024 |
A problem occurred in a Python script. Here is the sequence of function calls leading up to the error, in the order they occurred.
/data-bucket/var/www/U19/TnSeqCorr/cgi-bin/TnSeqCorr.py in <module> |
157 print(f"LFCs not found for {label2}") |
158 else: |
=> 159 my_base64_data = make_scatter_plot(LFCs[orf1], LFCs[orf2], label1, label2) |
160 print(f'<IMG SRC="data:image/png;base64,{my_base64_data}">') |
161 |
my_base64_data undefined, make_scatter_plot = <function make_scatter_plot>, LFCs = {'Rv0001': [0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, ...], 'Rv0002': [0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, ...], 'Rv0003': [2.382, 0.0, 0.281, 0.333, 0.0, 0.063, -1.086, -0.288, -0.624, -0.913, -0.554, -0.807, -1.344, -1.416, 1.24, 1.099, -0.168, -0.273, 0.0, 0.084, ...], 'Rv0004': [0.0, 0.0, 0.0, 0.0, 0.0, 0.851, -0.712, 0.14, 0.266, -0.698, 0.0, -1.865, 0.0, 0.0, 0.385, 0.0, 0.0, 0.0, 0.0, 0.0, ...], 'Rv0005': [0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, ...], 'Rv0006': [0.0, 0.0, 0.0, 0.85, 1.292, 0.0, 0.374, 0.0, 0.165, 0.366, 0.0, 0.195, 0.0, -0.549, -0.282, -0.568, -0.324, 0.0, 0.132, -0.614, ...], 'Rv0007': [1.163, -0.539, -0.845, -0.229, 0.603, -0.535, -6.0, -0.824, -3.279, -5.709, -0.595, 1.208, -2.644, -3.733, -0.762, 0.688, -0.876, -0.775, 0.129, 1.282, ...], 'Rv0008c': [-2.052, -0.85, 1.575, 2.298, 1.965, 0.56, 0.412, 0.27, -0.231, 0.979, 0.0, 0.113, -0.702, -0.1, 0.856, 0.366, 0.449, 1.347, -0.973, -0.648, ...], 'Rv0009': [2.183, 1.482, -1.145, -0.977, 1.123, -1.94, -1.806, -0.899, -2.463, -1.769, 0.114, 0.627, -3.712, -2.481, 0.75, -0.364, -0.903, -3.559, 0.608, -1.083, ...], 'Rv0010c': [1.301, -0.517, -0.289, 0.181, 1.209, 0.604, 0.62, 0.82, 0.0, 0.769, -0.234, 0.892, -0.933, -0.597, -0.148, -0.168, -2.141, 0.374, -0.227, -1.154, ...], ...}, orf1 = 'Rv3582c', orf2 = 'Rv3582c', label1 = 'Rv3582c/ispD', label2 = 'Rv3582c/ispD' |
/data-bucket/var/www/U19/TnSeqCorr/cgi-bin/TnSeqCorr.py in make_scatter_plot(lfcs1=[0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, ...], lfcs2=[0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, ...], label1='Rv3582c/ispD', label2='Rv3582c/ispD') |
49 |
50 def make_scatter_plot(lfcs1, lfcs2, label1, label2): |
=> 51 slope, intercept, r_value, p_value, std_err = stats.linregress(lfcs1, lfcs2) |
52 X = numpy.array([-6, 6]) |
53 Y = slope * X + intercept |
slope undefined, intercept undefined, r_value undefined, p_value undefined, std_err undefined, global stats = <module 'scipy.stats' from '/usr/lib/python3/dist-packages/scipy/stats/__init__.py'>, stats.linregress = <function linregress>, lfcs1 = [0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, ...], lfcs2 = [0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, ...] |
/usr/lib/python3/dist-packages/scipy/stats/_stats_mstats_common.py in linregress(x=array([0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0... 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0.]), y=array([0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0... 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0.]), alternative='two-sided') |
155 |
156 if np.amax(x) == np.amin(x) and len(x) > 1: |
=> 157 raise ValueError("Cannot calculate a linear regression " |
=> 158 "if all x values are identical") |
159 |
builtin ValueError = <class 'ValueError'> |
ValueError: Cannot calculate a linear regression if all x values are identical
add_note =
<built-in method add_note of ValueError object>
args =
('Cannot calculate a linear regression if all x values are identical',)
with_traceback =
<built-in method with_traceback of ValueError object>