ChiLiubio / microeco_tutorial

Documentation for microeco package
Creative Commons Zero v1.0 Universal
4 stars 3 forks source link

cal_tax4fun() showing error #5

Closed Ngemephr closed 1 year ago

Ngemephr commented 1 year ago

Hello,

I was trying to get microorganisms' functions of the three treatments that I was interested in; the R code was able to run and showed the results with biological functions for each replicate using the following script: t2 = trans_func$new(paolo) t2$cal_spe_func() t2$cal_spe_func_perc(abundance_weighted = F) t2$plot_spe_func_perc(use_group_list = T) Even though I got the functions within each replicate, this was not my expectations; I was expecting to get these functions within modules generated from the co-occurrence analysis using the following code

Network analysis

# Correlation based on spearman

t1 = trans_network$new(dataset = paolo, cor_method = "spearman", filter_thres = 0.0001, taxa_level = "OTU",cal_cor = "WGCNA")

use arbitrary coefficient threshold to construct network

t1$cal_network(COR_p_thres = 0.001, COR_cut = 0.7)

Calling unidirected network

t1$cal_module(method = "cluster_fast_greedy", module_name_prefix = "M")

Save network

t1$cal_network_attr()

After all, I was expecting a clear repartition of functions within treatments but I couldn't load the reference folder SILVA123 (unzipped) which was saved on my local drive. By running the following script t3 = trans_func$new(dataset = paolo) t3$cal_tax4fun(folderReferenceData = "C:/Users/ngeme/Documents/SILVA123") the script run into the following error: Error in dimnames(x) <- dn : length of 'dimnames' [1] not equal to array extent Could you please help me out. Thank you. Find the attached dataset I was using paolo.zip