Package 'CausCor'

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

Help Index


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".