vmikk / metagMisc

Miscellaneous functions for metagenomic analysis.
MIT License
46 stars 11 forks source link

shared otus function problem #16

Closed pavlo888 closed 3 years ago

pavlo888 commented 3 years ago

Hi,

I am trying to see the shared OTUs from my phyloseq object.

I am running the function:

shared <- phyloseq_extract_shared_otus(physeqr, samp_names = sample_names(physeqr)) And then I obtain the following error:

Error in (function (classes, fdef, mtable)  : 
  unable to find an inherited method for function ‘prune_samples’ for signature ‘"array", "phyloseq"’

Any idea what is wrong?

Cheers, Pablo

vmikk commented 3 years ago

Hello Pablo!

As a first guess, is phyloseq package loaded?

library(phyloseq)

And does the examples from the help pages work?

data(esophagus)
ps <- phyloseq_extract_shared_otus(esophagus, samp_names = sample_names(esophagus))
ps
otu_table(ps)

With kind regards, Vladimir

pavlo888 commented 3 years ago

Hi Vladimir,

Yes the library is loaded and the example works.

What can I do next?

Cheers, Pablo

vmikk commented 3 years ago

Hello Pablo,

It is difficult to say why it's not working without seeing the data. How many samples are in your physeqr object? Could you post the results of the following commands?

sample_sums(physeqr)
taxa_are_rows(physeqr)

With kind regards, Vladimir

vmikk commented 3 years ago

I will close this issue for now. However, if it is not solved yet, feel free to reopen the issue if necessary.