joey711 / phyloseq

phyloseq is a set of classes, wrappers, and tools (in R) to make it easier to import, store, and analyze phylogenetic sequencing data; and to reproducibly share that data and analysis with others. See the phyloseq front page:
http://joey711.github.io/phyloseq/
569 stars 187 forks source link

Error in building phyloseq object using phyloseq() #1623

Closed rfjkullberg closed 1 year ago

rfjkullberg commented 1 year ago

I am having a problem when building a new phyloseq object from manually imported data using phyloseq(). If I run:

phyloseq <- phyloseq(OTU, TAX, tree)

I get this error:

## Error in paste (..., sep = sep) : 
## 4 arguments passed to .Internal(paste) which requires 3

Adding only one of the components (either OTU-table or Tax-table) at a time, gives the same error: phyloseq <- phyloseq(OTU)

## Error in paste (..., sep = sep) : 
## 4 arguments passed to .Internal(paste) which requires 3

All other steps are -as far as I'm aware of- working perfectly fine. It's only this final step of combining the components that gives an error.

head(tax, n=3)

## Kingdom    Phylum          Class         Order           Family            Genus              Species
## Zotu1 "Bacteria" "Bacteroidetes" "Bacteroidia" "Bacteroidales" "Prevotellaceae"  "Prevotella_9"     "copri"
## Zotu2 "Bacteria" "Firmicutes"    "Clostridia"  "Clostridiales" "Ruminococcaceae" "Faecalibacterium" NA     
## Zotu3 "Bacteria" "Firmicutes"    "Clostridia"  "Clostridiales" "Lachnospiraceae" "Agathobacter"     NA
TAX <- tax_table(tax)
asv <- column_to_rownames(asv, var = "sample_id")
ASV <- otu_table(asv, taxa_are_rows = F)

Anyone know what is the problem here? Many thanks!