collapsing samples using the median

17 views
Skip to first unread message

AnnaC

unread,
Oct 20, 2016, 7:25:57 AM10/20/16
to Qiime 1 Forum

Hello everyone,


When I perform collapse samples using the median values, I get a lower number of reads than expected. I thought that median value per OTU and category were calculated and then added up to make the total count, but it looks like I am wrong.

Could anyone clarify me that? 


Thank you!


I attach different biom summarize tables to show that:


Non-collapsed table begins like this (so I was expecting median values around 40,000 reads).


Num samples: 306

Num observations: 1396

Total count: 13963032

Table density (fraction of non-zero values): 0.275

 

Counts/sample summary:

 Min: 5.0

 Max: 191411.0

 Median: 41071.000

 Mean: 45630.824

 Std. dev.: 25281.454

 Sample Metadata Categories: None provided

 Observation Metadata Categories: taxonomy

 

This is my biom_summarize when using median values.


Num samples: 35

Num observations: 1396

Total count: 421190

Table density (fraction of non-zero values): 0.260

 

Counts/sample summary:

 Min: 866.5

 Max: 22721.5

 Median: 12193.000

 Mean: 12034.000

 Std. dev.: 5978.280

 Sample Metadata Categories: collapsed_ids

 Observation Metadata Categories: taxonomy

 

Counts/sample detail:

 16: 866.5

 15: 1405.0

 7: 3076.0

 4: 3808.5

 34: 4245.0

 2: 5493.5

 25: 6203.0

 36: 6531.5

 32: 6626.5

 12: 7568.0

 1: 8692.0

 35: 9542.5

 17: 9898.0

 30: 9906.0

 3: 10953.5

 14: 11353.0

 33: 11573.0

 20: 12193.0

 24: 12431.5

 11: 13303.5

 8: 13645.0

 29: 13858.0

 28: 13986.5

 5: 15144.0

 6: 15161.0

 9: 15919.5

 19: 16498.5

 27: 17292.0

 21: 18055.0

 18: 19289.0

 13: 20035.0

 22: 20362.5

 26: 21552.0

 31: 22001.0

 23: 22721.5

 

Daniel McDonald

unread,
Nov 3, 2016, 11:55:24 PM11/3/16
to Qiime 1 Forum
Hi Anna,

I apologize for such a delayed response. The median collapse is defined as the median value of an OTU within a group of samples. So if you had three samples in a group, and for a given OTU, you had counts of 25, 50, and 75 for the samples, the median there would be 50. The end effect on the table summary is that it would look as though 100 of the 150 reads had dropped. Does that make sense?

What might be confusing somewhat here as well is the the summary you provided is over the samples, so that its the median reads per sample, not the median reads per OTU within a group of samples.

Best,
Daniel 

AnnaC

unread,
Nov 6, 2016, 12:04:16 PM11/6/16
to Qiime 1 Forum
Hi Daniel,
thank you so much for your response!!! It absolutely makes sense, I was just very confused.
Best,

Anna

Daniel McDonald

unread,
Nov 7, 2016, 12:24:56 AM11/7/16
to Qiime 1 Forum
No problem at all :)

Best,
Daniel
Reply all
Reply to author
Forward
0 new messages