Title: | Calculate Correlations and Estimate Causality |
Version: | 0.1.3 |
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. |
URL: | https://github.com/sugym/CausCor |
License: | MIT + file LICENSE |
Language: | en-US |
Encoding: | UTF-8 |
RoxygenNote: | 7.1.2 |
Imports: | cowplot, dplyr, ggplot2, grDevices, magrittr, stats, WriteXLS |
Suggests: | testthat (≥ 3.0.0) |
Config/testthat/edition: | 3 |
NeedsCompilation: | no |
Packaged: | 2023-11-10 05:33:40 UTC; sugiyamatomomi |
Author: | Tomomi Sugiyama [aut, cre] |
Maintainer: | Tomomi Sugiyama <sugiyama.t.am@m.titech.ac.jp> |
Repository: | CRAN |
Date/Publication: | 2023-11-10 05:50:02 UTC |
Make list of A-B pair causal correlations - 40% Filtering version
Description
Make list of A-B pair causal correlations - 40% Filtering version
Usage
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
)
Arguments
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
Description
Make list of A-B pair causal correlations
Usage
filter_cc(
a_mat,
b_mat,
a_category,
b_category,
min_cor,
min_r2,
min_sample,
max_sample = ncol(a_mat) - 1,
direction = T
)
Arguments
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
Description
Make list of A-B pair causal correlations - Normal Filtering version
Usage
filter_n(a_mat, b_mat, a_category, b_category, min_cor, min_r2, min_sample)
Arguments
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
Description
Save scatter plots
Usage
plot_16(a_mat, b_mat, list, out_info, x_italic = F, y_italic = T)
Arguments
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
Description
Save list as a text file
Usage
save_text(list, out_info, file_type)
Arguments
list |
List of results. |
out_info |
Output directory. |
file_type |
Choose from "excel", "csv", "tsv". |