FilipeMatteoli / 2020_network_ML_microbiome

Code used in https://doi.org/10.1016/j.apsoil.2021.104335
0 stars 0 forks source link

data analysis code reproducibility failed #1

Closed yuanping-Zhou closed 2 years ago

yuanping-Zhou commented 2 years ago

hi, I noticed your paper present beautiful network graphs, but when i went to reference your code, i found i cannot practice the code you provided as"code_networks_ML" in R. mistake happened when i read data"feature-table.biom" as follow:

ps <- import_biom(feature-table.biom)

Error in import_biom(feature - table.biom) : object 'feature' not found

then added character quotation"", still not right as:

ps <- import_biom("feature-table.biom")

Error in dimnames(x) <- dn :

length of 'dimnames' [2] not equal to array extent

In addition: There were 50 or more warnings (use warnings() to see the first 50)

Finally, i found the data you provided is not right will you give me some suggestions about the time-sparing way to reproduce you analysis?

FilipeMatteoli commented 2 years ago

Hello, looks like the biom file is broken. As a temporary fix I provided the raw biom file now in the repo (biom2_tax_MD), just tested it and now is working. Please note that 3 samples were originally removed from this file, so to rebuild the broken biom from this one: ps <- import_biom("biom2_tax_MD")

remove outliers

ps.z = subset_samples(ps, samplename!=3) ps.z1 = subset_samples(ps.z, samplename!=6) ps = subset_samples(ps.z1, samplename!=9) taxa_names(ps) <- paste0("ASV", seq(ntaxa(ps)))

ps now has 69 samples

now you can go back to the code

ps.filt <- phyloseq_filter_prevalence....

Whenever I got some spare time I will replace the filtered biom by a working one in json format.