joey711 / phyloseq

phyloseq is a set of classes, wrappers, and tools (in R) to make it easier to import, store, and analyze phylogenetic sequencing data; and to reproducibly share that data and analysis with others. See the phyloseq front page:
http://joey711.github.io/phyloseq/
582 stars 187 forks source link

duplicate sample with different variable value #1709

Open francescaangiol opened 11 months ago

francescaangiol commented 11 months ago

Hi!

I am having an issue with my dataset rather than any functioning and I wonder if anyone had any suggestions on how to deal with this.

In my experiment I have sets of data composed by samples from adulst, offspring and environment. I have three treatments for these sets and I am mainly analyzing the differences in diversity between parents and offspring depending on the treatments. The problem rises because some adult samples are shared between treatents (the parents layed several clutches that were later assigned to treatment)which means that on my metadata the same sample has two values (treatments) for the same variable. So far I have "solved" the issue by duplicating the variable column and then have 2 values per sample for the same variable, but this is making my life a bit complicated and all analyses are geting more and more challenging.

My questions are:

1) I have thought of duplcating the sample in the phyloseq object and just have 2 samples (maybe with different names) each assigned to the corresponding treatment. Is this a good idea? How could I do this without affecting the analysis and should I do this before or after normalizing?

2) Is thereany other way to make this simpler?

I appreciate any imput in this!