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

Hi Abbie, #11

Open
HCB-M2RG opened this issue Nov 24, 2021 · 2 comments
Open

Hi Abbie, #11

HCB-M2RG opened this issue Nov 24, 2021 · 2 comments

Comments

@HCB-M2RG
Copy link

Hi Abbie,

Thank you for this! I'm able to generate the plot using the code from the tutorial without any issues - could you try entering these commands into your console and let me know what it outputs?

library(biomehorizon)
library(dplyr)

## Subset the data set to the subjects who were sampled on all 17 days, and arrange by date
metadata_17 <- metadatasample_diet %>%
  filter(subject %in% c("MCTs08","MCTs18","MCTs23","MCTs26","MCTs33","MCTs36")) %>%
  arrange(subject, collection_date)

otu_17 <- otusample_diet %>%
  select(taxon_id, as.character((metadatasample_diet %>% filter(subject %in% c("MCTs08","MCTs18","MCTs23","MCTs26","MCTs33","MCTs36")))$sample))

## Single variable analysis with "Taxon 1"
paramList <- prepanel(otudata = otu_17, metadata = metadata_17, singleVarOTU = "taxon 1", subj = 		
	c("MCTs08","MCTs18","MCTs23","MCTs26","MCTs36","MCTs33"))

horizonplot(paramList)

Originally posted by @isaacfink21 in #10 (comment)

@HCB-M2RG
Copy link
Author

Hello,
Following up on the comment posted above. I can run the code you provided in my console with no problems. However, I get an error "metadata must have the same number of samples for each subject to perform single OTU analysis" when trying to run my own data every time. I have spent some time making sure that I have exactly 39 samples for each "subject" type in my data. I have also attempted to standardise the "collection_date" to make sure that both "subjects" (environmental locations in my case) start and end with the same number of days. Do you have any suggestions? I really like this package and would like to see my focal ASV across the time series from multiple locations.

@isaacfink21
Copy link
Collaborator

Hi @HCB-M2RG,

Could you try entering table(<your_metadata_here>$subject) into the console and let me know what the output is? One possibility is that there's somehow an extra variable being counted in this function - this should show if there are more entries for one of your subjects/variables than another.

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

2 participants