Skip to content

picante error in ses.comdistnt2 #1

@karoraw1

Description

@karoraw1

i've attached my distance matrix, strata vector, and phylogenetic distance matrix.

I use the following code to load and run them:

library(ape)
library(picante)
library(MicEco)
library(doSNOW)

tsv.data <- read.delim("../otu_data/clustered_sequences/test_abundances.txt", row.names=1)
phydf <- read.delim("../otu_data/clustered_sequences/test_distmat.txt", row.names=1)
strata_df <- read.delim("../otu_data/clustered_sequences/test_strata.txt", row.names=1)
strat_vec <- unname(unlist(strata_df[,'CollectionAgency']))
strata_ <- as.integer(as.factor(strat_vec)[drop = TRUE])
phydist = as.matrix(phydf)
mntd_scores <- ses.comdistnt2(tsv.data, phydist, method = "quasiswap", strata =strata_ , abundance.weighted = TRUE, runs = 5, cores=1)

The error I get is:

Error in match.comm.dist(comm, dis) : 
  Community data set lacks taxa (column) names, these are required to match distance matrix and community data

I do not get this error when strata = NULL

test_abundances.txt
test_distmat.txt
test_strata.txt

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions