Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

lefse analysis questions and plotting without tags #411

Open
Roctry opened this issue Sep 14, 2024 · 3 comments
Open

lefse analysis questions and plotting without tags #411

Roctry opened this issue Sep 14, 2024 · 3 comments

Comments

@Roctry
Copy link

Roctry commented Sep 14, 2024

Hello, microeco has very conveniently implemented lefse analysis, but I have the following two questions.
PixPin_2024-09-14_11-32-39

First
t1 <- trans_diff$new(dataset = dataset, method = “lefse”, group = “Group”, alpha = 0.05, lefse_norm = 10000,
taxa_level = “all”, p_adjust_method = “none”, boots = 100, by_group = “KW”,
lefse_subgroup = NULL)
t1$plot_diff_bar(threshold = 2,
width = 0.8, group_order = c(“RR”, “RW”), add_sig = T,
use_number = 1:20)
Why is it that the LDA in t1$res_diff are all greater than zero, but in t1$plot_diff_bar out of the plot there is a negative LDA score value.
PixPin_2024-09-14_11-30-58
1

Second
t1$plot_diff_cladogram(use_taxa_num = 200,
use_feature_num = 30,
clade_label_level = 5,
group_order = c(“RR”, “RW”),
select_show_labels = NULL ,
only_select_show = F,
sep = “|”,
branch_size = 3,
alpha = 0.2,
clade_label_size = 2)
The outgoing developmental tree has no species annotations and no letters (a, b, c ···), but the labeling is normal.
PixPin_2024-09-14_11-31-09

Very much looking forward to getting an answer.

@ChiLiubio
Copy link
Owner

Hi. It is not negative values in the figure, just for the beauty with two types of values on both sides. For the second issue, please refer to this topic (https://chiliubio.github.io/microeco_tutorial/other-examples-1.html#tidy_taxonomy-function) and use tidy_taxonomy function to tidy your taxonomic info. It is also mentioned in the trans_diff part (https://chiliubio.github.io/microeco_tutorial/model-based-class.html#trans_diff-class)

meco_qiime2$tax_table %<>% tidy_taxonomy
meco_qiime2$tidy_dataset()
meco_qiime2$cal_abund()
lefse_diff <- trans_diff$new(dataset = meco_qiime2, method = "lefse", group = "Group")

@Roctry
Copy link
Author

Roctry commented Sep 14, 2024

rm(list = ls())
sample_info_16S <- read.xlsx("sample_info_16S.xlsx", rowNames = TRUE)
otu_table_16S <- read.xlsx("otu_table_16S.xlsx", rowNames = TRUE)
taxonomy_table_16S <- read.xlsx("taxonomy_table_16S.xlsx",rowNames = TRUE)
dataset <- microtable$new(sample_table = sample_info_16S, otu_table = otu_table_16S,
tax_table = taxonomy_table_16S)
dataset$tax_table %<>% tidy_taxonomy
dataset
t1 <- trans_diff$new(dataset = dataset, method = "lefse", group = "Group", alpha = 0.05, lefse_norm = 10000,
taxa_level = "all", p_adjust_method = "none", boots = 100, by_group = "KW",
lefse_subgroup = NULL)
t1$plot_diff_cladogram(use_taxa_num = 200,
use_feature_num = 30,
clade_label_level = 5,
group_order = c("RR", "RW"),
select_show_labels = NULL ,
only_select_show = F,
sep = "|",
branch_size = 3,
alpha = 0.2,
clade_label_size = 2)

Hello, I used tidy_taxonomy and still did not solve the problem.
1111

@ChiLiubio
Copy link
Owner

Hi. Could you please attach your dataset object so that I can reproduce your issue? To save the dataset, please follow the steps in the tutorial (https://chiliubio.github.io/microeco_tutorial/notes.html#save-function) and attach the compressed object.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants