Phyloseq Objects for different time points
1
0
Entering edit mode
2.4 years ago
ymj ▴ 10

Hi

I am very new to this microbiome analysis so this might be a very simple question... I have a question related to the microbiome analysis I'm doing. I have microbiome data from 3 different timepoints (T1, T7, and T13), for I made each time a phyloseq object. For each of the timepoints there are the same number of samples (IAM01-IAM30) for which I have (for now) available: gender, age.

I now want to plot a t-SNE plot where I have colors per gender, age-group and timepoint but I don't know how to merge the phyloseq objects?

I made first a dataframe with the ASV in the columns and the samples in the rows, and then the metadata next to it, for each timepoint. This I would then merge, but the ASVs ofcourse vary (ASV1 for timepoint 1 phyloseq object is different from ASV1 in timepoint 7).

Can someone help me out? Ideally I would need to have this kind of dataframe (cell = relative abundances/counts) enter image description here

Thank you very much in advance!

microbiome phyloseq timepoint • 1.8k views
ADD COMMENT
0
Entering edit mode

I now want to plot a t-SNE plot where I have colors per gender, age-group and timepoint but I don't know how to merge the phyloseq objects?

Then, why did you analyzed each timepoint independently?

ADD REPLY
0
Entering edit mode

Hmm. I have a phyloseq object per time point seperately. I followed the DADA2 tutorial (starting from fastq files per sample, per time point) and ended up in this way in 3 different phyloseq objects. I still want to consider samples from different timepoints as being independent samples.

ADD REPLY
0
Entering edit mode

this DADA2 tutorial?

ADD REPLY
0
Entering edit mode

Yes, in which I analyzed the timepoints seperately. So I'm thinking to do this DADA2 tutorial maybe again, on all fastq samples and then afterwards extract the timepoint?

ADD REPLY
0
Entering edit mode

ymj Do not delete posts that have received feedback.

ADD REPLY
3
Entering edit mode
2.4 years ago

If you look at the tutorial, all samples are analyzed with DADA2. In the section Bonus: Handoff to phyloseq, the author construct a data.frame (samdf`) with the sample data:

samples.out <- rownames(seqtab.nochim)
subject <- sapply(strsplit(samples.out, "D"), `[`, 1)
gender <- substr(subject,1,1)
subject <- substr(subject,2,999)
day <- as.integer(sapply(strsplit(samples.out, "D"), `[`, 2))
samdf <- data.frame(Subject=subject, Gender=gender, Day=day)
samdf$When <- "Early"
samdf$When[samdf$Day>100] <- "Late"
rownames(samdf) <- samples.out

Then, samdf it is used here:

ps <- phyloseq(otu_table(seqtab.nochim, taxa_are_rows=FALSE), 
               sample_data(samdf), 
               tax_table(taxa))

to create a SINGLE phyloseq object ps and store all the information: Gender, Day, Subject, When regarding each sample

ADD COMMENT
0
Entering edit mode

Thanks for your answer! I have now the results of the analysis on a single phyloseq object. :)

ADD REPLY
0
Entering edit mode

Thanks for your answer! I have now the results of the analysis on a single phyloseq object. :)

ADD REPLY
0
Entering edit mode

I've moved the comment to an answer. Please accept it to mark the post resolved.

upvote_bookmark_accept

ADD REPLY

Login before adding your answer.

Traffic: 1712 users visited in the last hour
Help About
FAQ
Access RSS
API
Stats

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6