Skip to content

Commit

Permalink
transpose matrix for clr
Browse files Browse the repository at this point in the history
  • Loading branch information
Cengoni authored Nov 27, 2024
1 parent b139d5f commit 940b0bb
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions metaphlan/utils/calculate_diversity.R
Original file line number Diff line number Diff line change
Expand Up @@ -224,8 +224,8 @@ if (opt$diversity == "beta"){
# CLR or Aitchison
if (opt$metric == "clr" || opt$metric == "aitchison"){
# Centered Log-Ratio
ait_norm_mpa_table <- compositions::clr(mpa_table)
mat <- as.matrix(compositions::as.data.frame.rmult(ait_norm_mpa_table))
ait_norm_mpa_table <- compositions::clr(t(mpa_table))
mat <- t(as.matrix(compositions::as.data.frame.rmult(ait_norm_mpa_table)))

if (opt$metric == "aitchison"){
# Aitchison
Expand Down

0 comments on commit 940b0bb

Please sign in to comment.