Skip to main content
In data analysis, pre-processing is the set of operations applied to a Data Table before any downstream analysis. Typical Data Table pre-processing operations include removing sparse features (features detected in only a few samples), aggregating features at a different taxonomic level, normalising values so that samples can be compared with each other, and transforming abundance values that follow a skewed distribution. Pre-processing determines how the data will be used for a downstream analysis,

Data Table Pre-processing and Microbiome data

Four characteristics of the microbiome, and of the way it is measured, complicate the analysis of microbiome data.
  • Sparsity: the microbiome changes from sample to sample, and many species are found in only a few individuals. The data are therefore sparse, full of zeros that can mean a species is absent or too rare to be detected. For example, a species found in 3 of 50 stool samples is zero in the other 47.
  • Compositionality: sequencing shows which share of the community each microbe represents, while the total number of microbes stays unknown. This makes the data compositional, like the slices of a pie chart. For example, if Lactobacillus doubles in a vaginal sample that was 50% Lactobacillus and 50% Gardnerella, the profile becomes 67% and 33%, and Gardnerella appears to decrease.
  • Uneven sequencing depth: samples differ in the amount of microbial and host DNA they contain, so the number of reads obtained from the microbes changes from sample to sample. As a result, a sample sequenced with 100,000 reads shows rare species that the same sample sequenced with 5,000 reads would miss.
  • High feature dimensionality: a microbial community can contain hundreds of species and many more genes, while a study usually includes far fewer samples. With more features than samples, chance patterns can be mistaken for biological signal. For example, testing 2,000 species at a significance level of 0.05 returns about 100 significant results by chance alone.
Not sure if you need it? Check these first.
  • Sequencing depth: are some samples much lower than the rest?
  • Sparsity: Does my Data Table have a lot of features with zeros?
  • Rare features: how many features occur in only a few samples?
Pre-processing is a trade-off:
Done well: more robust, easier-to-interpret results.
Done poorly: loss of real signal or biased results (for example, by removing truly informative rare features or keeping low-depth samples that distort comparisons).

Pre-processing Data Tables on Cosmos-Hub 2.0

A Data Table describes, in tabular format, the abundance of the features of one ‘omics type in each sample of a cohort. Data tables have a simple structure:
  • Rows are features (taxa, genes, or pathways).
  • Columns are samples.
  • Each cell is a value (count, relative abundance, or presence/absence).
The unit of the values depends on the ‘omics type of the profile. When a profile offers more than one unit, Analysis metric selects the one used for the analysis.

How pre-processing operations transform a Data Table

Pre-processing is a sequence of simple operations on the input Data Table. Each operation takes the table as input and returns a table with the same structure, in which some rows, some columns or the values have changed.