Title: | Calculate Correlations and Estimate Causality |
---|---|
Description: | This tool performs pairwise correlation analysis and estimate causality. Particularly, it is useful for detecting the metabolites that would be altered by the gut bacteria. |
Authors: | Tomomi Sugiyama [aut, cre] |
Maintainer: | Tomomi Sugiyama <[email protected]> |
License: | MIT + file LICENSE |
Version: | 0.1.3 |
Built: | 2025-03-05 03:01:38 UTC |
Source: | https://github.com/sugym/causcor |
Make list of A-B pair causal correlations - 40% Filtering version
filter_40( a_mat, b_mat, a_category, b_category, min_cor, min_r2, min_sample = ceiling((ncol(a_mat) - 1) * 0.4), max_sample = ncol(a_mat) - 1 - min_sample )
filter_40( a_mat, b_mat, a_category, b_category, min_cor, min_r2, min_sample = ceiling((ncol(a_mat) - 1) * 0.4), max_sample = ncol(a_mat) - 1 - min_sample )
a_mat |
Matrix of measurements of A for each sample. |
b_mat |
Matrix of measurements of B for each sample. |
a_category |
Category name of A. |
b_category |
Category name of B. |
min_cor |
Minimum spearman correlation coefficient. |
min_r2 |
Minimum R2 score. |
min_sample |
Minimum number of samples. The default is 40% of the total samples. |
max_sample |
Maximum number of samples. The default is 60% of the total samples. |
Make list of A-B pair causal correlations
filter_cc( a_mat, b_mat, a_category, b_category, min_cor, min_r2, min_sample, max_sample = ncol(a_mat) - 1, direction = T )
filter_cc( a_mat, b_mat, a_category, b_category, min_cor, min_r2, min_sample, max_sample = ncol(a_mat) - 1, direction = T )
a_mat |
Matrix of measurements of A for each sample. |
b_mat |
Matrix of measurements of B for each sample. |
a_category |
Category name of A. |
b_category |
Category name of B. |
min_cor |
Minimum spearman correlation coefficient. |
min_r2 |
Minimum R2 score. |
min_sample |
Minimum number of samples. |
max_sample |
Maximum number of samples. The default is the total number of samples. |
direction |
Extract only directional associations where a change in category A causes a change in category B. The default is True. |
Make list of A-B pair causal correlations - Normal Filtering version
filter_n(a_mat, b_mat, a_category, b_category, min_cor, min_r2, min_sample)
filter_n(a_mat, b_mat, a_category, b_category, min_cor, min_r2, min_sample)
a_mat |
Matrix of measurements of A for each sample. |
b_mat |
Matrix of measurements of B for each sample. |
a_category |
Category name of A. |
b_category |
Category name of B. |
min_cor |
Minimum spearman correlation coefficient. |
min_r2 |
Minimum R2 score. |
min_sample |
Minimum number of samples. |
Save scatter plots
plot_16(a_mat, b_mat, list, out_info, x_italic = F, y_italic = T)
plot_16(a_mat, b_mat, list, out_info, x_italic = F, y_italic = T)
a_mat |
Matrix of measurements of A for each sample. |
b_mat |
Matrix of measurements of B for each sample. |
list |
List of results. |
out_info |
Output directory. |
x_italic |
Italicize the x-axis label of the plot. The default is False. |
y_italic |
Italicize the y-axis label of the plot. The default is True. |
Save list as a text file
save_text(list, out_info, file_type)
save_text(list, out_info, file_type)
list |
List of results. |
out_info |
Output directory. |
file_type |
Choose from "excel", "csv", "tsv". |