microeco icon indicating copy to clipboard operation
microeco copied to clipboard

Error in rep(1, nrow(edges)) When running plot_diff_cladogram

Open Harr7y opened this issue 11 months ago • 3 comments

Hi, when I am running plot_diff_cladogram, an strange error occured.

""" Select 50 significant features ... Provided use_taxa_num: 200 >= total effective taxa number. Skip the selection ... Error in rep(1, nrow(edges)) : invalid 'times' argument """

Can you help me to solve it? Besides, it works when I run plot_diff_bar.

Harr7y avatar Mar 11 '24 10:03 Harr7y

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

ChiLiubio avatar Mar 12 '24 01:03 ChiLiubio

dataset.zip Thanks, attached is a part of my data, which has the same error.

The dataset is generated with: dataset <- microtable$new(sample_table = sample_table, otu_table = feature_table, tax_table = tax_table)

Harr7y avatar Mar 12 '24 09:03 Harr7y

Hi. Please also attach all the steps. I need to reproduce your issue. The dataset you attached cannot be found! Please send it to me via email ([email protected]).

ChiLiubio avatar Mar 13 '24 02:03 ChiLiubio

For v1.7.0, when such error is coming, the function will return a stop message that "The parent and child nodes are not correctly recognized! Please try to use tidy_taxonomy function to tidy taxonomic table in your microtable object! Then rerun cal_abund function and trans_diff class!". This means you should use tidy_taxonomy function to clean up your taxonomic table which probably have non-standard classification information.

ChiLiubio avatar May 16 '24 02:05 ChiLiubio

Thanks a lot~

Harr7y avatar May 16 '24 02:05 Harr7y

Hi, lefse$plot_diff_cladogram(use_taxa_num=100,

  •                       use_feature_num=10,
    
  •                       clade_label_level=5,
    
  •                       group_order=c("Low", "Medium", "High"))
    

Select 10 significant features ... Part of groups in group_order, High, not found in the feature table ... Error in private$plot_backgroud_tree(abund_table = abund_table, use_taxa_num = use_taxa_num, : After filtering out non-standard taxonomy information, the abundance table only has 1 feature(s)! Is there an issue with the taxonomy table? Please first use the tidy_taxonomy function to process the taxonomy information table before constructing the microtable object.

LiDianjia avatar Sep 10 '24 01:09 LiDianjia

Hi. Please first try to run this shown in the tutorial (https://chiliubio.github.io/microeco_tutorial/other-examples-1.html#tidy_taxonomy-function). Remember to change the corresponding names.

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

ChiLiubio avatar Sep 10 '24 05:09 ChiLiubio

Thanks very much!My problem was solved using your method.

LiDianjia avatar Sep 10 '24 05:09 LiDianjia