Open gaminn6 opened 11 months ago
Here are a few suggestions for troubleshooting:
Please check if your SPARCC results (sparcc_f) are normal. Specifically, verify if there is a correlation network of taxa at p < P_THRESHOLD.
Examine your data for any anomalies or taxa with an abundance of zero.
In the run_causalinference.py script, modify the parameters such as DATA_PATH, SPARCC_PATH, OUT_PATH, OUT_TEMP_PATH, in_f, and sparcc_f to match your file paths.
You can perform a single calculation using the causal_inference_from_prior(data, pattern, times) function in run_causalinference.py, without iterative optimization. Check the output of e_matrix and p_matrix. Code :
data = load_abundance(DATA_PATH + in_f) prior = load_prior_network(SPARCC_PATH + sparcc_f, threshold=P_THRESHOLD) e_matrix, p_matrix = causal_inference_from_prior(data, pattern=prior, times=BOOTSTRAP_TIMES)
I could completely run the results with your example "demo.ipynb". But after I used my own data (24x26 columns) and ran “run_causalinference.py” for 4 hours, the following description appeared and generated a blank file "AGP_control_causal_log.txt".
Hope you can give a little guidance. Thank you very much!
Debug: