jianhao2016 / SimiC

this is the github repo for simicLASSO
5 stars 1 forks source link

ValueError('invalid path to tf list file.') in SimiC_example.py #1

Closed ggruenhagen3 closed 3 years ago

ggruenhagen3 commented 3 years ago

Hi, I tried running the SimiC_example.py scripts, but I got an error in file path to the tf list file. I tried executing the script using the absolute file path and I even tried changing the filepaths in the script to be absolute, but still I get an invalid path error. I don't get these errors when running the example R script. Here's the detailed output:

Done loading, shape of X = (500, 15090) ------ Begin the regression part... df in regression shape = (500, 15090) df test = (100, 15090) test data assignment set: {0, 1, 2} df train = (400, 15090) train data assignment set: {0, 1, 2} ------- Traceback (most recent call last): File "SimiC_example.py", line 34, in lambda1=lambda1, lambda2 = lambda2) File "/storage/home/hcoda1/6/ggruenhagen3/.conda/envs/grn/lib/python3.7/site-packages/simiclasso-0.3.2-py3.7.egg/simiclasso/clus_regression.py", line 512, in simicLASSO_op raise ValueError('invalid path to tf list file.') ValueError: invalid path to tf list file. If you suspect this is an IPython 7.19.0 bug, please report it at: https://github.com/ipython/ipython/issues or send an email to the mailing list at ipython-dev@python.org You can print a more detailed traceback right now with "%tb", or use "%debug" to interactively debug it. Extra-detailed tracebacks for bug-reporting purposes can be enabled via: %config Application.verbose_crash=True

GuiSeSanz commented 3 years ago

Actually the problem here is the order of the parameters... The example has an issue, and the correct order to run it, is:

simicLASSO_op(p2df, p2assignment, similarity, p2tf, p2saved_file,  k_cluster, num_TFs, num_target_genes, 
        max_rcd_iter = max_rcd_iter, df_with_label = df_with_label,
        cross_val=cross_val)

I hope that works!

jianhao2016 commented 3 years ago

Hi @ggruenhagen3 , thank you for pointing out! As @GuiSeSanz mentioned, the problem should be solved by changing the order of parameters, or call them with name specified. I will patch the example code to make them compatible with latest version.