Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error in .M.kind(data) : not yet implemented for matrix with typeof character #2

Open
samd1993 opened this issue Mar 24, 2022 · 0 comments

Comments

@samd1993
Copy link

samd1993 commented Mar 24, 2022

Hi all,

When I attempt to run BDTT I get this outcome:

> slices=c(0:0.5)
> Betas=BDTT(similarity_slices=slices,tree=tree,sampleOTUs=amt)
[1] "0 similarity provides 142906 total new OTUs"
Error in .M.kind(data) : 
  not yet implemented for matrix with typeof character

some notes: my tree was in newick format (I imported it with ape so not sure if I need to use something different) and I have modified the OTUIDs like so:

d__Bacteria; p__Bacteroidota; c__Bacteroidia; o__Bacteroidales; f__Bacteroidales_RF16_group; g__Bacteroidales_RF16_group; s__uncultured_bacterium|00009c1cc42953fb4702f6331325c7cc

where the taxonomy levels are separated by a '|' and the OTUID is appended at the end. My tree tips are also labeled like this.

Any pointers on what the error could be? Can attach files if needed as well.

EDIT/UPDATE:
I realized I may need to have turned the otu table into a proper matrix. So I went ahead did that but also made a small test dataset with 3 samples to make sure it wasn't a large dataset issue. Now I get this error:

Error in onlyBeta == F :
  comparison (1) is possible only for atomic and list types

#Here is my code:

ttree=phytools::read.newick('amttree.nwk')
tamt=read.table('amtesttable.tsv',sep="\t",header=TRUE,row.names=1)
tamtm=as.matrix(tamt)
head(tamt)
 
slices=c(0:0.5)
Betas=BDTT(similarity_slices=slices,tree=ttree,sampleOTUs=tamt)
 Error in onlyBeta == F :
  comparison (1) is possible only for atomic and list types

Also attached a pic of my otu table.

image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant