Open dhinkris opened 5 years ago
Hi @dhinkris,
We'll be glad to assist. First, can you paste the full traceback of that error/exception? We'd like to see where it came from exactly if possible, a line number etc.
Also, if you are able to share it, it would also help to see the data and any configs you have used. If you cannot share this, then no worries.
Best, Steve
Hi @sgiavasis, Below is the piece of code I am trying to execute.
def test_mdmr():
from CPAC.cwas.mdmr import mdmr
from CPAC.cwas.cwas import calc_cwas
import numpy as np
X = np.genfromtxt(os.path.join(os.path.dirname(__file__), 'predictors_n59.csv'), delimiter=',')
Y = np.genfromtxt(os.path.join(os.path.dirname(__file__), 'Ymat_n59.csv'), delimiter=',')
print("Shape of X:", X.shape)
print("Shape of Y:", Y.shape)
X = X.reshape((X.shape[0], X.shape[1], 1))
F_value, p_value = calc_cwas(X, Y, np.array([0], dtype=int), 1000, range(0, X.shape[1]))
print(F_value, p_value)
And the traceback is :
('Shape of X:', (59, 9))
('Shape of Y:', (59, 19900))
(9, 59, 59)
Traceback (most recent call last):
File "test_cwas.py", line 19, in
Thank you.
Hi Steve, Did you get a chance to look into this issue.
Thank you.
Hi, I have an issue in calculating mdmr based cwas calculation. It would be great if you could help me with this.
I have 7 phenotypic variables and 19900 voxel-pairing for 60 subjects. I am trying to find cwas based on mdmr. Here I consider the X as the phenotypic variable (60x7) and the Y as the voxel-pairing(60, 19900). I am getting the “Exception: matrix is rank deficient (rank 60 vs cols 19900), whereas it runs for (60, >60) voxel-pairing with no significance.
I am lost at the moment. Please let me know where i am missing. Thanks