Hi all,
I have a specific question regarding matrix design for analyses.
I would like to analyze my samples across two hierarchical levels, and I can think
of at least two ways of performing this in edgeR. After trying them, they gave pretty different answers,
which was not surprising, but I would like to hear insights as to which is more statistically appropriate.
I have 4 population samples, with 2 RNA-seq replicates in each. Also, two populations can be grouped as 'Northern',
and two as 'Southern', hence having for replicates for each of 2 locations.
I would like to perform: 1) comparison between the two populations of the 'Southern' group, and 2) compare the two
locations (by pooling samples within populations).
Hence, for the first analysis, I could simply import a data matrix such as:
data1:
sample group
pop1.1 A
pop1.2 A
pop3.1 C
pop3.2 C
and proceed with that comparison as usual.
However, an alternative approach is to import the full data matrix:
sample
pop1.1
pop1.2
pop2.1
pop2.2
pop3.1
pop3.2
pop4.1
pop4.2
And for analysis (1), code the groups by population:
sample group
pop1.1 A
pop1.2 A
pop2.1 B
pop2.2 B
pop3.1 C
pop3.2 C
pop4.1 D
pop4.2 D
then perform a test on the pair=c("A","C"), which would be 'equivalent' to the test with the small dataset above.
However, the two produce very different number of DE (~60 vs 200, respectively). It makes sense why they are different, since the common dispersion
in the small data set is being estimated from 2 sets of reps, while the one in the full data set is estimated across 4 sets of reps.
My motivation for having the full data set is so that I can then recode the groups and perform analysis (2):
sample group
pop1.1 south
pop1.2 south
pop2.1 south
pop2.2 south
pop3.1 north
pop3.2 north
pop4.1 north
pop4.2 north
My hesitation in performing analysis (1) after estimating dispersion on the full dataset is that the samples between localities are quite differentiated, so I'm not sure it's appropriated to allow replicates from one locality to influence dispersion for the full data set.
It's actually a simple scenario, but I can't convince myself of the appropriate way. Any insights from a more statistical mind would be greatly appreciated!!
Thanks!
I have a specific question regarding matrix design for analyses.
I would like to analyze my samples across two hierarchical levels, and I can think
of at least two ways of performing this in edgeR. After trying them, they gave pretty different answers,
which was not surprising, but I would like to hear insights as to which is more statistically appropriate.
I have 4 population samples, with 2 RNA-seq replicates in each. Also, two populations can be grouped as 'Northern',
and two as 'Southern', hence having for replicates for each of 2 locations.
I would like to perform: 1) comparison between the two populations of the 'Southern' group, and 2) compare the two
locations (by pooling samples within populations).
Hence, for the first analysis, I could simply import a data matrix such as:
data1:
sample group
pop1.1 A
pop1.2 A
pop3.1 C
pop3.2 C
and proceed with that comparison as usual.
However, an alternative approach is to import the full data matrix:
sample
pop1.1
pop1.2
pop2.1
pop2.2
pop3.1
pop3.2
pop4.1
pop4.2
And for analysis (1), code the groups by population:
sample group
pop1.1 A
pop1.2 A
pop2.1 B
pop2.2 B
pop3.1 C
pop3.2 C
pop4.1 D
pop4.2 D
then perform a test on the pair=c("A","C"), which would be 'equivalent' to the test with the small dataset above.
However, the two produce very different number of DE (~60 vs 200, respectively). It makes sense why they are different, since the common dispersion
in the small data set is being estimated from 2 sets of reps, while the one in the full data set is estimated across 4 sets of reps.
My motivation for having the full data set is so that I can then recode the groups and perform analysis (2):
sample group
pop1.1 south
pop1.2 south
pop2.1 south
pop2.2 south
pop3.1 north
pop3.2 north
pop4.1 north
pop4.2 north
My hesitation in performing analysis (1) after estimating dispersion on the full dataset is that the samples between localities are quite differentiated, so I'm not sure it's appropriated to allow replicates from one locality to influence dispersion for the full data set.
It's actually a simple scenario, but I can't convince myself of the appropriate way. Any insights from a more statistical mind would be greatly appreciated!!
Thanks!