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

Change levels for LM modeling in tax_tree #175

Open
scilexenko opened this issue Aug 29, 2024 · 0 comments
Open

Change levels for LM modeling in tax_tree #175

scilexenko opened this issue Aug 29, 2024 · 0 comments

Comments

@scilexenko
Copy link

scilexenko commented Aug 29, 2024

Hi David,

I hope you’re doing well!

I’m encountering an issue with my data, which consists of four levels. I’m trying to change the comparison level to generate different heat trees. I attempted to relevel the factor within my phyloseq object using the following code:

sample_data(phyloseq_g_zz)$Code <- factor(sample_data(phyloseq_g_zz)$Code, levels = c("SNA", "CNA", "SMA", "SVA"))

lm_models2 <- phyloseq_g_zz  %>% 
  taxatree_models(
    ranks = c("Phylum", "Class", "Order", "Family", "Genus", "Species"),
    trans = "log2", trans_args = list(add = "halfmin"),
    formula = ~ Code,
    #variables = "Code", type = lm # modelling function
  ) %>%
  taxatree_models2stats(.keep_models = F) 

However, this doesn’t seem to work as expected when using taxatree_models.
Would you be able to help me with this? I would greatly appreciate any guidance you can provide.

Thank you so much in advance!
Best regards,
Ivan

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