Description

Test sbatch simulation

Design formulae

The following model formulae were used in the dispersion calculations for the different data sets. Note that if a count matrix or data frame was provided in place of a DESeqDataSet for some data set, the corresponding design formula is set to ~1, thus assuming that all samples are to be treated as replicates.

original :  ~ 1 
sim :  ~ 1 

Data set dimensions

These bar plots show the number of samples (columns) and features (rows) in each data set.

Number of samples (columns)

Number of features (rows)

Dispersion/BCV plots

Disperson/BCV plots show the association between the average abundance and the dispersion or “biological coefficient of variation” (sqrt(dispersion)), as calculated by edgeR (Robinson, McCarthy, and Smyth 2010) and DESeq2 (Love, Huber, and Anders 2014). In the edgeR plot, the estimate of the prior degrees of freedom is indicated. If there are more than 100 samples in a data set, the dispersions are calculated using 100 randomly selected samples.

edgeR

The black dots represent the tagwise dispersion estimates, the red line the common dispersion and the blue curve represents the trended dispersion estimates. For further information about the dispersion estimation in edgeR, see Chen, Lun, and Smyth (2014).

Pairwise comparisons - edgeR

The table below contains a range of quantitative statistics and test results evaluating the degree of similarity between each pair of data sets based on the average log CPM and tagwise dispersion. The following statistics and test results are included:

  • NN rejection fraction: this statistic is similar to one used by the kBET R package. First, a subset of R features are selected (where R is chosen to be the smallest of 50 and the total number of features in the two data sets), and for each of these features the k nearest neighbors are found (where k is chosen to be 1% of the total number of features from the two data sets, however at least 5). Then, a chi-square test is used to evaluate whether the composition of data sets from which the k nearest neighbors of each selected features comes differs significantly from the overall composition of features from the two data sets. The NN rejection fraction is the fraction of selected features for which the chi-square test rejects the null hypothesis at a significance level of 5%.
  • Average silhouette width: as for the NN rejection fraction, a subset of R features are selected. For each of these, the (Euclidean) distances to all other features are calculated, and the silhouette width (Rousseeuw 1987) is calculated based on these distances. The final statistic is the average silhouette width for the R features.
  • Average local silhouette width: similar to the average silhouette width, but for each feature, only the k’ closest features from a data set are used to calculate the silhouette widths. Here, k’ for data set i is defined as k * p_i, where k is as above and p_i is the fraction of the total number of features that come from data set i.
  • For the NN rejection fraction and average silhouette widths, permutation p-values can be calculated by permuting the data set labels. These values are only available if the ‘permutationPvalues’ argument to ‘countsimQCReport’ was set to TRUE.

DESeq2

The black dots are the gene-wise dispersion estimates, the red curve the fitted mean-dispersion relationship and the blue circles represent the final dispersion estimates.For further information about the dispersion estimation in DESeq2, see Love, Huber, and Anders (2014).

Pairwise comparisons - DESeq2

The table below contains a range of quantitative statistics and test results evaluating the degree of similarity between each pair of data sets based on the base mean and genewise dispersion. The following statistics and test results are included:

  • NN rejection fraction: this statistic is similar to one used by the kBET R package. First, a subset of R features are selected (where R is chosen to be the smallest of 50 and the total number of features in the two data sets), and for each of these features the k nearest neighbors are found (where k is chosen to be 1% of the total number of features from the two data sets, however at least 5). Then, a chi-square test is used to evaluate whether the composition of data sets from which the k nearest neighbors of each selected features comes differs significantly from the overall composition of features from the two data sets. The NN rejection fraction is the fraction of selected features for which the chi-square test rejects the null hypothesis at a significance level of 5%.
  • Average silhouette width: as for the NN rejection fraction, a subset of R features are selected. For each of these, the (Euclidean) distances to all other features are calculated, and the silhouette width (Rousseeuw 1987) is calculated based on these distances. The final statistic is the average silhouette width for the R features.
  • Average local silhouette width: similar to the average silhouette width, but for each feature, only the k’ closest features from a data set are used to calculate the silhouette widths. Here, k’ for data set i is defined as k * p_i, where k is as above and p_i is the fraction of the total number of features that come from data set i.
  • For the NN rejection fraction and average silhouette widths, permutation p-values can be calculated by permuting the data set labels. These values are only available if the ‘permutationPvalues’ argument to ‘countsimQCReport’ was set to TRUE.

Mean-variance plots

These scatter plots show the relation between the empirical mean and variance of the features. The difference between these mean-variance plots and the mean-dispersion plots above is that the plots in this section do not take the information about the experimental design and sample grouping into account, but simply display the mean and variance of log2(CPM) estimates across all samples, calculated using the cpm function from edgeR (Robinson, McCarthy, and Smyth 2010), with a prior count of 2.

Separate scatter plots

Overlaid scatter plots

Pairwise comparisons

The table below contains a range of quantitative statistics and test results evaluating the degree of similarity between each pair of data sets based on the average and variance of the log CPM. The following statistics and test results are included:

  • NN rejection fraction: this statistic is similar to one used by the kBET R package. First, a subset of R features are selected (where R is chosen to be the smallest of 50 and the total number of features in the two data sets), and for each of these features the k nearest neighbors are found (where k is chosen to be 1% of the total number of features from the two data sets, however at least 5). Then, a chi-square test is used to evaluate whether the composition of data sets from which the k nearest neighbors of each selected features comes differs significantly from the overall composition of features from the two data sets. The NN rejection fraction is the fraction of selected features for which the chi-square test rejects the null hypothesis at a significance level of 5%.
  • Average silhouette width: as for the NN rejection fraction, a subset of R features are selected. For each of these, the (Euclidean) distances to all other features are calculated, and the silhouette width (Rousseeuw 1987) is calculated based on these distances. The final statistic is the average silhouette width for the R features.
  • Average local silhouette width: similar to the average silhouette width, but for each feature, only the k’ closest features from a data set are used to calculate the silhouette widths. Here, k’ for data set i is defined as k * p_i, where k is as above and p_i is the fraction of the total number of features that come from data set i.
  • For the NN rejection fraction and average silhouette widths, permutation p-values can be calculated by permuting the data set labels. These values are only available if the ‘permutationPvalues’ argument to ‘countsimQCReport’ was set to TRUE.

Library sizes

These plots illustrate the distribution of the total read count per sample, i.e., the column sums of the respective data matrices.

Separate histograms

Overlaid histograms

Density plots

Density plots (filled)

Box plots

Violin plots

Empirical cumulative distribution function

Pairwise comparisons

The table below contains a range of quantitative statistics and test results evaluating the degree of similarity between each pair of data sets based on the library size. The following statistics and test results are included:

  • K-S statistic/K-S p-value: the Kolmogorov-Smirnov statistic (Kolmogorov 1933, Smirnov (1948)), i.e., the maximal distance between the two empirical cumulative distribution functions (eCDFs), and the associated p-value.
  • Scaled area between eCDFs: the absolute area between the eCDFs for the two data sets. This is calculated by first subtracting one eCDF from the other and taking the absolute value of the differences, followed by scaling the x-axis so that the difference between the largest and smallest value across all data sets is equal to 1 (here, subtracting 138 and dividing by 2917992), and finally calculating the area under the resulting non-negative curve. This gives a scaled area with values in the range [0, 1], where large values indicate large differences between the library size distributions.
  • Runs statistic/Runs p-value: the statistic and p-value from a one-sided Wald-Wolfowitz runs test (Wald and Wolfowitz 1940). The values from both data sets are first sorted in increasing order and converted into a binary sequence based on whether or not they are derived from the first data set. The runs test is applied to this sequence. The test is one-sided, with the alternative hypothesis being that there is a trend towards values from the same data set occurring next to each other in the sequence.
  • NN rejection fraction: this statistic is similar to one used by the kBET R package. First, a subset of R samples are selected (where R is chosen to be the smallest of 50 and the total number of samples in the two data sets), and for each of these samples the k nearest neighbors are found (where k is chosen to be 1% of the total number of samples from the two data sets, however at least 5). Then, a chi-square test is used to evaluate whether the composition of data sets from which the k nearest neighbors of each selected samples comes differs significantly from the overall composition of samples from the two data sets. The NN rejection fraction is the fraction of selected samples for which the chi-square test rejects the null hypothesis at a significance level of 5%.
  • Average silhouette width: as for the NN rejection fraction, a subset of R samples are selected. For each of these, the (Euclidean) distances to all other samples are calculated, and the silhouette width (Rousseeuw 1987) is calculated based on these distances. The final statistic is the average silhouette width for the R samples.
  • Average local silhouette width: similar to the average silhouette width, but for each sample, only the k’ closest samples from a data set are used to calculate the silhouette widths. Here, k’ for data set i is defined as k * p_i, where k is as above and p_i is the fraction of the total number of samples that come from data set i.
  • For the scaled area between eCDFs, NN rejection fraction and average silhouette widths, permutation p-values can be calculated by permuting the data set labels. These values are only available if the ‘permutationPvalues’ argument to ‘countsimQCReport’ was set to TRUE.

It should be noted that the reported statistics in some cases are highly dependent on the number of underlying observations, and especially with a large number of observations, very small p-values can correspond to small effective differences. Thus, interpretation should ideally be guided by both quantitative and qualitative, visual information.

TMM normalization factors

The plots below show the distribution of the TMM normalization factors (Robinson and Oshlack 2010), intended to adjust for differences in RNA composition, as calculated by edgeR (Robinson, McCarthy, and Smyth 2010).

Separate histograms

Overlaid histograms

Density plots

Density plots (filled)

Box plots

Violin plots

Empirical cumulative distribution function

Pairwise comparisons

The table below contains a range of quantitative statistics and test results evaluating the degree of similarity between each pair of data sets based on the TMM factor. The following statistics and test results are included:

  • K-S statistic/K-S p-value: the Kolmogorov-Smirnov statistic (Kolmogorov 1933, Smirnov (1948)), i.e., the maximal distance between the two empirical cumulative distribution functions (eCDFs), and the associated p-value.
  • Scaled area between eCDFs: the absolute area between the eCDFs for the two data sets. This is calculated by first subtracting one eCDF from the other and taking the absolute value of the differences, followed by scaling the x-axis so that the difference between the largest and smallest value across all data sets is equal to 1 (here, subtracting 0.0300568235545874 and dividing by 32.1178372223398), and finally calculating the area under the resulting non-negative curve. This gives a scaled area with values in the range [0, 1], where large values indicate large differences between the TMM factor distributions.
  • Runs statistic/Runs p-value: the statistic and p-value from a one-sided Wald-Wolfowitz runs test (Wald and Wolfowitz 1940). The values from both data sets are first sorted in increasing order and converted into a binary sequence based on whether or not they are derived from the first data set. The runs test is applied to this sequence. The test is one-sided, with the alternative hypothesis being that there is a trend towards values from the same data set occurring next to each other in the sequence.
  • NN rejection fraction: this statistic is similar to one used by the kBET R package. First, a subset of R samples are selected (where R is chosen to be the smallest of 50 and the total number of samples in the two data sets), and for each of these samples the k nearest neighbors are found (where k is chosen to be 1% of the total number of samples from the two data sets, however at least 5). Then, a chi-square test is used to evaluate whether the composition of data sets from which the k nearest neighbors of each selected samples comes differs significantly from the overall composition of samples from the two data sets. The NN rejection fraction is the fraction of selected samples for which the chi-square test rejects the null hypothesis at a significance level of 5%.
  • Average silhouette width: as for the NN rejection fraction, a subset of R samples are selected. For each of these, the (Euclidean) distances to all other samples are calculated, and the silhouette width (Rousseeuw 1987) is calculated based on these distances. The final statistic is the average silhouette width for the R samples.
  • Average local silhouette width: similar to the average silhouette width, but for each sample, only the k’ closest samples from a data set are used to calculate the silhouette widths. Here, k’ for data set i is defined as k * p_i, where k is as above and p_i is the fraction of the total number of samples that come from data set i.
  • For the scaled area between eCDFs, NN rejection fraction and average silhouette widths, permutation p-values can be calculated by permuting the data set labels. These values are only available if the ‘permutationPvalues’ argument to ‘countsimQCReport’ was set to TRUE.

It should be noted that the reported statistics in some cases are highly dependent on the number of underlying observations, and especially with a large number of observations, very small p-values can correspond to small effective differences. Thus, interpretation should ideally be guided by both quantitative and qualitative, visual information.

Effective library sizes

These plots show the distribution of the “effective library sizes”, defined as the total count per sample multiplied by the corresponding TMM normalization factor.

Separate histograms

Overlaid histograms

Density plots

Density plots (filled)

Box plots

Violin plots

Empirical cumulative distribution function

Pairwise comparisons

The table below contains a range of quantitative statistics and test results evaluating the degree of similarity between each pair of data sets based on the effective library size. The following statistics and test results are included:

  • K-S statistic/K-S p-value: the Kolmogorov-Smirnov statistic (Kolmogorov 1933, Smirnov (1948)), i.e., the maximal distance between the two empirical cumulative distribution functions (eCDFs), and the associated p-value.
  • Scaled area between eCDFs: the absolute area between the eCDFs for the two data sets. This is calculated by first subtracting one eCDF from the other and taking the absolute value of the differences, followed by scaling the x-axis so that the difference between the largest and smallest value across all data sets is equal to 1 (here, subtracting 340.011777138439 and dividing by 738703.188515183), and finally calculating the area under the resulting non-negative curve. This gives a scaled area with values in the range [0, 1], where large values indicate large differences between the effective library size distributions.
  • Runs statistic/Runs p-value: the statistic and p-value from a one-sided Wald-Wolfowitz runs test (Wald and Wolfowitz 1940). The values from both data sets are first sorted in increasing order and converted into a binary sequence based on whether or not they are derived from the first data set. The runs test is applied to this sequence. The test is one-sided, with the alternative hypothesis being that there is a trend towards values from the same data set occurring next to each other in the sequence.
  • NN rejection fraction: this statistic is similar to one used by the kBET R package. First, a subset of R samples are selected (where R is chosen to be the smallest of 50 and the total number of samples in the two data sets), and for each of these samples the k nearest neighbors are found (where k is chosen to be 1% of the total number of samples from the two data sets, however at least 5). Then, a chi-square test is used to evaluate whether the composition of data sets from which the k nearest neighbors of each selected samples comes differs significantly from the overall composition of samples from the two data sets. The NN rejection fraction is the fraction of selected samples for which the chi-square test rejects the null hypothesis at a significance level of 5%.
  • Average silhouette width: as for the NN rejection fraction, a subset of R samples are selected. For each of these, the (Euclidean) distances to all other samples are calculated, and the silhouette width (Rousseeuw 1987) is calculated based on these distances. The final statistic is the average silhouette width for the R samples.
  • Average local silhouette width: similar to the average silhouette width, but for each sample, only the k’ closest samples from a data set are used to calculate the silhouette widths. Here, k’ for data set i is defined as k * p_i, where k is as above and p_i is the fraction of the total number of samples that come from data set i.
  • For the scaled area between eCDFs, NN rejection fraction and average silhouette widths, permutation p-values can be calculated by permuting the data set labels. These values are only available if the ‘permutationPvalues’ argument to ‘countsimQCReport’ was set to TRUE.

It should be noted that the reported statistics in some cases are highly dependent on the number of underlying observations, and especially with a large number of observations, very small p-values can correspond to small effective differences. Thus, interpretation should ideally be guided by both quantitative and qualitative, visual information.

Expression distributions (average log CPM)

The plots in this section show the distribution of average abundance values for the features. The abundances are log CPM values calculated by edgeR.

Separate histograms

Overlaid histograms

Density plots

Density plots (filled)

Box plots

Violin plots

Empirical cumulative distribution function

Pairwise comparisons

The table below contains a range of quantitative statistics and test results evaluating the degree of similarity between each pair of data sets based on the average log CPM. The following statistics and test results are included:

  • K-S statistic/K-S p-value: the Kolmogorov-Smirnov statistic (Kolmogorov 1933, Smirnov (1948)), i.e., the maximal distance between the two empirical cumulative distribution functions (eCDFs), and the associated p-value.
  • Scaled area between eCDFs: the absolute area between the eCDFs for the two data sets. This is calculated by first subtracting one eCDF from the other and taking the absolute value of the differences, followed by scaling the x-axis so that the difference between the largest and smallest value across all data sets is equal to 1 (here, subtracting 6.57430568589276 and dividing by 8.47350744179592), and finally calculating the area under the resulting non-negative curve. This gives a scaled area with values in the range [0, 1], where large values indicate large differences between the average log CPM distributions.
  • Runs statistic/Runs p-value: the statistic and p-value from a one-sided Wald-Wolfowitz runs test (Wald and Wolfowitz 1940). The values from both data sets are first sorted in increasing order and converted into a binary sequence based on whether or not they are derived from the first data set. The runs test is applied to this sequence. The test is one-sided, with the alternative hypothesis being that there is a trend towards values from the same data set occurring next to each other in the sequence.
  • NN rejection fraction: this statistic is similar to one used by the kBET R package. First, a subset of R features are selected (where R is chosen to be the smallest of 50 and the total number of features in the two data sets), and for each of these features the k nearest neighbors are found (where k is chosen to be 1% of the total number of features from the two data sets, however at least 5). Then, a chi-square test is used to evaluate whether the composition of data sets from which the k nearest neighbors of each selected features comes differs significantly from the overall composition of features from the two data sets. The NN rejection fraction is the fraction of selected features for which the chi-square test rejects the null hypothesis at a significance level of 5%.
  • Average silhouette width: as for the NN rejection fraction, a subset of R features are selected. For each of these, the (Euclidean) distances to all other features are calculated, and the silhouette width (Rousseeuw 1987) is calculated based on these distances. The final statistic is the average silhouette width for the R features.
  • Average local silhouette width: similar to the average silhouette width, but for each feature, only the k’ closest features from a data set are used to calculate the silhouette widths. Here, k’ for data set i is defined as k * p_i, where k is as above and p_i is the fraction of the total number of features that come from data set i.
  • For the scaled area between eCDFs, NN rejection fraction and average silhouette widths, permutation p-values can be calculated by permuting the data set labels. These values are only available if the ‘permutationPvalues’ argument to ‘countsimQCReport’ was set to TRUE.

It should be noted that the reported statistics in some cases are highly dependent on the number of underlying observations, and especially with a large number of observations, very small p-values can correspond to small effective differences. Thus, interpretation should ideally be guided by both quantitative and qualitative, visual information.

Fraction zeros per sample

These plots show the distribution of the fraction of zeros observed per sample (column) in the count matrices.

Separate histograms

Overlaid histograms

Density plots

Density plots (filled)

Box plots

Violin plots

Empirical cumulative distribution function

Pairwise comparisons

The table below contains a range of quantitative statistics and test results evaluating the degree of similarity between each pair of data sets based on the fraction zeros. The following statistics and test results are included:

  • K-S statistic/K-S p-value: the Kolmogorov-Smirnov statistic (Kolmogorov 1933, Smirnov (1948)), i.e., the maximal distance between the two empirical cumulative distribution functions (eCDFs), and the associated p-value.
  • Scaled area between eCDFs: the absolute area between the eCDFs for the two data sets. This is calculated by first subtracting one eCDF from the other and taking the absolute value of the differences, followed by scaling the x-axis so that the difference between the largest and smallest value across all data sets is equal to 1 (here, subtracting 0.22244557546726 and dividing by 0.772978059107823), and finally calculating the area under the resulting non-negative curve. This gives a scaled area with values in the range [0, 1], where large values indicate large differences between the fraction zeros distributions.
  • Runs statistic/Runs p-value: the statistic and p-value from a one-sided Wald-Wolfowitz runs test (Wald and Wolfowitz 1940). The values from both data sets are first sorted in increasing order and converted into a binary sequence based on whether or not they are derived from the first data set. The runs test is applied to this sequence. The test is one-sided, with the alternative hypothesis being that there is a trend towards values from the same data set occurring next to each other in the sequence.
  • NN rejection fraction: this statistic is similar to one used by the kBET R package. First, a subset of R samples are selected (where R is chosen to be the smallest of 50 and the total number of samples in the two data sets), and for each of these samples the k nearest neighbors are found (where k is chosen to be 1% of the total number of samples from the two data sets, however at least 5). Then, a chi-square test is used to evaluate whether the composition of data sets from which the k nearest neighbors of each selected samples comes differs significantly from the overall composition of samples from the two data sets. The NN rejection fraction is the fraction of selected samples for which the chi-square test rejects the null hypothesis at a significance level of 5%.
  • Average silhouette width: as for the NN rejection fraction, a subset of R samples are selected. For each of these, the (Euclidean) distances to all other samples are calculated, and the silhouette width (Rousseeuw 1987) is calculated based on these distances. The final statistic is the average silhouette width for the R samples.
  • Average local silhouette width: similar to the average silhouette width, but for each sample, only the k’ closest samples from a data set are used to calculate the silhouette widths. Here, k’ for data set i is defined as k * p_i, where k is as above and p_i is the fraction of the total number of samples that come from data set i.
  • For the scaled area between eCDFs, NN rejection fraction and average silhouette widths, permutation p-values can be calculated by permuting the data set labels. These values are only available if the ‘permutationPvalues’ argument to ‘countsimQCReport’ was set to TRUE.

It should be noted that the reported statistics in some cases are highly dependent on the number of underlying observations, and especially with a large number of observations, very small p-values can correspond to small effective differences. Thus, interpretation should ideally be guided by both quantitative and qualitative, visual information.

Fraction zeros per feature

These plots illustrate the distribution of the fraction of zeros observed per feature (row) in the count matrices.

Separate histograms

Overlaid histograms

Density plots

Density plots (filled)

Box plots

Violin plots

Empirical cumulative distribution function

Pairwise comparisons

The table below contains a range of quantitative statistics and test results evaluating the degree of similarity between each pair of data sets based on the fraction zeros. The following statistics and test results are included:

  • K-S statistic/K-S p-value: the Kolmogorov-Smirnov statistic (Kolmogorov 1933, Smirnov (1948)), i.e., the maximal distance between the two empirical cumulative distribution functions (eCDFs), and the associated p-value.
  • Scaled area between eCDFs: the absolute area between the eCDFs for the two data sets. This is calculated by first subtracting one eCDF from the other and taking the absolute value of the differences, followed by scaling the x-axis so that the difference between the largest and smallest value across all data sets is equal to 1 (here, subtracting 0.00391244057052298 and dividing by 0.994205625990491), and finally calculating the area under the resulting non-negative curve. This gives a scaled area with values in the range [0, 1], where large values indicate large differences between the fraction zeros distributions.
  • Runs statistic/Runs p-value: the statistic and p-value from a one-sided Wald-Wolfowitz runs test (Wald and Wolfowitz 1940). The values from both data sets are first sorted in increasing order and converted into a binary sequence based on whether or not they are derived from the first data set. The runs test is applied to this sequence. The test is one-sided, with the alternative hypothesis being that there is a trend towards values from the same data set occurring next to each other in the sequence.
  • NN rejection fraction: this statistic is similar to one used by the kBET R package. First, a subset of R features are selected (where R is chosen to be the smallest of 50 and the total number of features in the two data sets), and for each of these features the k nearest neighbors are found (where k is chosen to be 1% of the total number of features from the two data sets, however at least 5). Then, a chi-square test is used to evaluate whether the composition of data sets from which the k nearest neighbors of each selected features comes differs significantly from the overall composition of features from the two data sets. The NN rejection fraction is the fraction of selected features for which the chi-square test rejects the null hypothesis at a significance level of 5%.
  • Average silhouette width: as for the NN rejection fraction, a subset of R features are selected. For each of these, the (Euclidean) distances to all other features are calculated, and the silhouette width (Rousseeuw 1987) is calculated based on these distances. The final statistic is the average silhouette width for the R features.
  • Average local silhouette width: similar to the average silhouette width, but for each feature, only the k’ closest features from a data set are used to calculate the silhouette widths. Here, k’ for data set i is defined as k * p_i, where k is as above and p_i is the fraction of the total number of features that come from data set i.
  • For the scaled area between eCDFs, NN rejection fraction and average silhouette widths, permutation p-values can be calculated by permuting the data set labels. These values are only available if the ‘permutationPvalues’ argument to ‘countsimQCReport’ was set to TRUE.

It should be noted that the reported statistics in some cases are highly dependent on the number of underlying observations, and especially with a large number of observations, very small p-values can correspond to small effective differences. Thus, interpretation should ideally be guided by both quantitative and qualitative, visual information.

Sample-sample correlations

The plots below show the distribution of Spearman correlation coefficients for pairs of samples, calculated from the log(CPM) values obtained via the cpm function from edgeR, with a prior.count of 2. If there are more than 25 samples in a data set, the pairwise correlations between 25 randomly selected samples are shown.

Separate histograms

Overlaid histograms

Density plots

Density plots (filled)

Box plots

Violin plots

Empirical cumulative distribution function

Pairwise comparisons

The table below contains a range of quantitative statistics and test results evaluating the degree of similarity between each pair of data sets based on the Spearman correlation. The following statistics and test results are included:

  • K-S statistic/K-S p-value: the Kolmogorov-Smirnov statistic (Kolmogorov 1933, Smirnov (1948)), i.e., the maximal distance between the two empirical cumulative distribution functions (eCDFs), and the associated p-value.
  • Scaled area between eCDFs: the absolute area between the eCDFs for the two data sets. This is calculated by first subtracting one eCDF from the other and taking the absolute value of the differences, followed by scaling the x-axis so that the difference between the largest and smallest value across all data sets is equal to 1 (here, subtracting 0.0254910570821416 and dividing by 0.656568558031055), and finally calculating the area under the resulting non-negative curve. This gives a scaled area with values in the range [0, 1], where large values indicate large differences between the Spearman correlation distributions.
  • Runs statistic/Runs p-value: the statistic and p-value from a one-sided Wald-Wolfowitz runs test (Wald and Wolfowitz 1940). The values from both data sets are first sorted in increasing order and converted into a binary sequence based on whether or not they are derived from the first data set. The runs test is applied to this sequence. The test is one-sided, with the alternative hypothesis being that there is a trend towards values from the same data set occurring next to each other in the sequence.
  • NN rejection fraction: this statistic is similar to one used by the kBET R package. First, a subset of R sample pairs are selected (where R is chosen to be the smallest of 50 and the total number of sample pairs in the two data sets), and for each of these sample pairs the k nearest neighbors are found (where k is chosen to be 1% of the total number of sample pairs from the two data sets, however at least 5). Then, a chi-square test is used to evaluate whether the composition of data sets from which the k nearest neighbors of each selected sample pairs comes differs significantly from the overall composition of sample pairs from the two data sets. The NN rejection fraction is the fraction of selected sample pairs for which the chi-square test rejects the null hypothesis at a significance level of 5%.
  • Average silhouette width: as for the NN rejection fraction, a subset of R sample pairs are selected. For each of these, the (Euclidean) distances to all other sample pairs are calculated, and the silhouette width (Rousseeuw 1987) is calculated based on these distances. The final statistic is the average silhouette width for the R sample pairs.
  • Average local silhouette width: similar to the average silhouette width, but for each sample pair, only the k’ closest sample pairs from a data set are used to calculate the silhouette widths. Here, k’ for data set i is defined as k * p_i, where k is as above and p_i is the fraction of the total number of sample pairs that come from data set i.
  • For the scaled area between eCDFs, NN rejection fraction and average silhouette widths, permutation p-values can be calculated by permuting the data set labels. These values are only available if the ‘permutationPvalues’ argument to ‘countsimQCReport’ was set to TRUE.

It should be noted that the reported statistics in some cases are highly dependent on the number of underlying observations, and especially with a large number of observations, very small p-values can correspond to small effective differences. Thus, interpretation should ideally be guided by both quantitative and qualitative, visual information.

Feature-feature correlations

These plots illustrate the distribution of Spearman correlation coefficients for pairs of features, calculated from the log(CPM) values obtained via the cpm function from edgeR, with a prior.count of 2. Only non-constant features are considered, and if there are more than 25 such features in a data set, the pairwise correlations between 25 randomly selected features are shown.

Separate histograms

Overlaid histograms

Density plots

Density plots (filled)

Box plots

Violin plots

Empirical cumulative distribution function

Pairwise comparisons

The table below contains a range of quantitative statistics and test results evaluating the degree of similarity between each pair of data sets based on the Spearman correlation. The following statistics and test results are included:

  • K-S statistic/K-S p-value: the Kolmogorov-Smirnov statistic (Kolmogorov 1933, Smirnov (1948)), i.e., the maximal distance between the two empirical cumulative distribution functions (eCDFs), and the associated p-value.
  • Scaled area between eCDFs: the absolute area between the eCDFs for the two data sets. This is calculated by first subtracting one eCDF from the other and taking the absolute value of the differences, followed by scaling the x-axis so that the difference between the largest and smallest value across all data sets is equal to 1 (here, subtracting 0.120165492958964 and dividing by 0.826538892729006), and finally calculating the area under the resulting non-negative curve. This gives a scaled area with values in the range [0, 1], where large values indicate large differences between the Spearman correlation distributions.
  • Runs statistic/Runs p-value: the statistic and p-value from a one-sided Wald-Wolfowitz runs test (Wald and Wolfowitz 1940). The values from both data sets are first sorted in increasing order and converted into a binary sequence based on whether or not they are derived from the first data set. The runs test is applied to this sequence. The test is one-sided, with the alternative hypothesis being that there is a trend towards values from the same data set occurring next to each other in the sequence.
  • NN rejection fraction: this statistic is similar to one used by the kBET R package. First, a subset of R feature pairs are selected (where R is chosen to be the smallest of 50 and the total number of feature pairs in the two data sets), and for each of these feature pairs the k nearest neighbors are found (where k is chosen to be 1% of the total number of feature pairs from the two data sets, however at least 5). Then, a chi-square test is used to evaluate whether the composition of data sets from which the k nearest neighbors of each selected feature pairs comes differs significantly from the overall composition of feature pairs from the two data sets. The NN rejection fraction is the fraction of selected feature pairs for which the chi-square test rejects the null hypothesis at a significance level of 5%.
  • Average silhouette width: as for the NN rejection fraction, a subset of R feature pairs are selected. For each of these, the (Euclidean) distances to all other feature pairs are calculated, and the silhouette width (Rousseeuw 1987) is calculated based on these distances. The final statistic is the average silhouette width for the R feature pairs.
  • Average local silhouette width: similar to the average silhouette width, but for each feature pair, only the k’ closest feature pairs from a data set are used to calculate the silhouette widths. Here, k’ for data set i is defined as k * p_i, where k is as above and p_i is the fraction of the total number of feature pairs that come from data set i.
  • For the scaled area between eCDFs, NN rejection fraction and average silhouette widths, permutation p-values can be calculated by permuting the data set labels. These values are only available if the ‘permutationPvalues’ argument to ‘countsimQCReport’ was set to TRUE.

It should be noted that the reported statistics in some cases are highly dependent on the number of underlying observations, and especially with a large number of observations, very small p-values can correspond to small effective differences. Thus, interpretation should ideally be guided by both quantitative and qualitative, visual information.

Library size vs fraction zeros

These scatter plots show the association between the total count (column sums) and the fraction of zeros observed per sample.

Separate scatter plots

Overlaid scatter plots

Pairwise comparisons

The table below contains a range of quantitative statistics and test results evaluating the degree of similarity between each pair of data sets based on the library size and fraction of zeros. The following statistics and test results are included:

  • NN rejection fraction: this statistic is similar to one used by the kBET R package. First, a subset of R samples are selected (where R is chosen to be the smallest of 50 and the total number of samples in the two data sets), and for each of these samples the k nearest neighbors are found (where k is chosen to be 1% of the total number of samples from the two data sets, however at least 5). Then, a chi-square test is used to evaluate whether the composition of data sets from which the k nearest neighbors of each selected samples comes differs significantly from the overall composition of samples from the two data sets. The NN rejection fraction is the fraction of selected samples for which the chi-square test rejects the null hypothesis at a significance level of 5%.
  • Average silhouette width: as for the NN rejection fraction, a subset of R samples are selected. For each of these, the (Euclidean) distances to all other samples are calculated, and the silhouette width (Rousseeuw 1987) is calculated based on these distances. The final statistic is the average silhouette width for the R samples.
  • Average local silhouette width: similar to the average silhouette width, but for each sample, only the k’ closest samples from a data set are used to calculate the silhouette widths. Here, k’ for data set i is defined as k * p_i, where k is as above and p_i is the fraction of the total number of samples that come from data set i.
  • For the NN rejection fraction and average silhouette widths, permutation p-values can be calculated by permuting the data set labels. These values are only available if the ‘permutationPvalues’ argument to ‘countsimQCReport’ was set to TRUE.

Mean expression vs fraction zeros

These scatter plots show the association between the average abundance and the fraction of zeros observed per feature. The abundance is defined as the log(CPM) values as calculated by edgeR.

Separate scatter plots

Overlaid scatter plots

Pairwise comparisons

The table below contains a range of quantitative statistics and test results evaluating the degree of similarity between each pair of data sets based on the average log CPM and fraction of zeros. The following statistics and test results are included:

  • NN rejection fraction: this statistic is similar to one used by the kBET R package. First, a subset of R features are selected (where R is chosen to be the smallest of 50 and the total number of features in the two data sets), and for each of these features the k nearest neighbors are found (where k is chosen to be 1% of the total number of features from the two data sets, however at least 5). Then, a chi-square test is used to evaluate whether the composition of data sets from which the k nearest neighbors of each selected features comes differs significantly from the overall composition of features from the two data sets. The NN rejection fraction is the fraction of selected features for which the chi-square test rejects the null hypothesis at a significance level of 5%.
  • Average silhouette width: as for the NN rejection fraction, a subset of R features are selected. For each of these, the (Euclidean) distances to all other features are calculated, and the silhouette width (Rousseeuw 1987) is calculated based on these distances. The final statistic is the average silhouette width for the R features.
  • Average local silhouette width: similar to the average silhouette width, but for each feature, only the k’ closest features from a data set are used to calculate the silhouette widths. Here, k’ for data set i is defined as k * p_i, where k is as above and p_i is the fraction of the total number of features that come from data set i.
  • For the NN rejection fraction and average silhouette widths, permutation p-values can be calculated by permuting the data set labels. These values are only available if the ‘permutationPvalues’ argument to ‘countsimQCReport’ was set to TRUE.

Session info

## R version 3.6.1 (2019-07-05)
## Platform: x86_64-pc-linux-gnu (64-bit)
## Running under: Ubuntu 16.04.6 LTS
## 
## Matrix products: default
## BLAS:   /home/aluetg/R/lib/R/lib/libRblas.so
## LAPACK: /home/aluetg/R/lib/R/lib/libRlapack.so
## 
## locale:
##  [1] LC_CTYPE=en_US.UTF-8       LC_NUMERIC=C              
##  [3] LC_TIME=en_US.UTF-8        LC_COLLATE=en_US.UTF-8    
##  [5] LC_MONETARY=en_US.UTF-8    LC_MESSAGES=en_US.UTF-8   
##  [7] LC_PAPER=en_US.UTF-8       LC_NAME=C                 
##  [9] LC_ADDRESS=C               LC_TELEPHONE=C            
## [11] LC_MEASUREMENT=en_US.UTF-8 LC_IDENTIFICATION=C       
## 
## attached base packages:
## [1] parallel  stats4    stats     graphics  grDevices utils     datasets 
## [8] methods   base     
## 
## other attached packages:
##  [1] dplyr_0.8.5                 purrr_0.3.3                
##  [3] magrittr_1.5                countsimQC_1.4.0           
##  [5] scater_1.14.6               ggplot2_3.3.0              
##  [7] scran_1.14.6                SingleCellExperiment_1.8.0 
##  [9] SummarizedExperiment_1.16.1 DelayedArray_0.12.2        
## [11] BiocParallel_1.20.1         matrixStats_0.55.0         
## [13] Biobase_2.46.0              GenomicRanges_1.38.0       
## [15] GenomeInfoDb_1.22.0         IRanges_2.20.2             
## [17] S4Vectors_0.24.3            BiocGenerics_0.32.0        
## 
## loaded via a namespace (and not attached):
##   [1] ggbeeswarm_0.6.0         colorspace_1.4-1         htmlTable_1.13.3        
##   [4] XVector_0.26.0           base64enc_0.1-3          BiocNeighbors_1.4.2     
##   [7] rstudioapi_0.11          farver_2.0.3             DT_0.12                 
##  [10] bit64_0.9-7              AnnotationDbi_1.48.0     splines_3.6.1           
##  [13] geneplotter_1.64.0       knitr_1.28               jsonlite_1.6.1          
##  [16] Formula_1.2-3            packrat_0.5.0            annotate_1.64.0         
##  [19] cluster_2.1.0            png_0.1-7                shiny_1.4.0.1           
##  [22] compiler_3.6.1           dqrng_0.2.1              backports_1.1.5         
##  [25] assertthat_0.2.1         Matrix_1.2-18            fastmap_1.0.1           
##  [28] limma_3.42.2             later_1.0.0              BiocSingular_1.2.2      
##  [31] acepack_1.4.1            htmltools_0.4.0          tools_3.6.1             
##  [34] rsvd_1.0.3               igraph_1.2.4.2           gtable_0.3.0            
##  [37] glue_1.3.1               GenomeInfoDbData_1.2.2   Rcpp_1.0.3              
##  [40] vctrs_0.2.4              nlme_3.1-145             crosstalk_1.0.0         
##  [43] DelayedMatrixStats_1.8.0 xfun_0.12                stringr_1.4.0           
##  [46] mime_0.9                 lifecycle_0.2.0          irlba_2.3.3             
##  [49] statmod_1.4.34           XML_3.99-0.3             edgeR_3.28.1            
##  [52] zlibbioc_1.32.0          scales_1.1.0             promises_1.1.0          
##  [55] randtests_1.0            RColorBrewer_1.1-2       yaml_2.2.1              
##  [58] memoise_1.1.0            gridExtra_2.3            rpart_4.1-15            
##  [61] latticeExtra_0.6-29      stringi_1.4.6            RSQLite_2.2.0           
##  [64] genefilter_1.68.0        checkmate_2.0.0          caTools_1.18.0          
##  [67] rlang_0.4.5              pkgconfig_2.0.3          bitops_1.0-6            
##  [70] evaluate_0.14            lattice_0.20-40          htmlwidgets_1.5.1       
##  [73] labeling_0.3             bit_1.1-15.2             tidyselect_1.0.0        
##  [76] DESeq2_1.26.0            R6_2.4.1                 Hmisc_4.3-1             
##  [79] DBI_1.1.0                mgcv_1.8-31              pillar_1.4.3            
##  [82] foreign_0.8-76           withr_2.1.2              survival_3.1-11         
##  [85] RCurl_1.98-1.1           nnet_7.3-13              tibble_2.1.3            
##  [88] crayon_1.3.4             rmarkdown_2.1            viridis_0.5.1           
##  [91] jpeg_0.1-8.1             locfit_1.5-9.1           grid_3.6.1              
##  [94] data.table_1.12.8        blob_1.2.1               digest_0.6.25           
##  [97] xtable_1.8-4             tidyr_1.0.2              httpuv_1.5.2            
## [100] munsell_0.5.0            beeswarm_0.2.3           viridisLite_0.3.0       
## [103] vipor_0.4.5

References

Chen, Yunshun, Aaron TL Lun, and Gordon K Smyth. 2014. “Differential Expression Analysis of Complex RNA-Seq Experiments Using EdgeR.” In Statistical Analysis of Next Generation Sequence Data. Somnath Datta and Daniel S Nettleton (Eds), Springer, New York. https://link.springer.com/chapter/10.1007%2F978-3-319-07212-8_3.

Kolmogorov, Andrey. 1933. “Sulla Determinazione Empirica Di Una Legge Di Distribuzione.” Giornale Dell’Istituto Italiano Degli Attuari 4: 83–91.

Love, Michael I, Wolfgang Huber, and Simon Anders. 2014. “Moderated Estimation of Fold Change and Dispersion for RNA-Seq Data with DESeq2.” Genome Biology 15: 550. https://genomebiology.biomedcentral.com/articles/10.1186/s13059-014-0550-8.

Robinson, Mark D, and Alicia Oshlack. 2010. “A Scaling Normalization Method for Differential Expression Analysis of RNA-Seq Data.” Genome Biology 11: R25. https://genomebiology.biomedcentral.com/articles/10.1186/gb-2010-11-3-r25.

Robinson, Mark D, Davis J McCarthy, and Gordon K Smyth. 2010. “EdgeR-a Bioconductor Package for Differential Expression Analysis of Digital Gene Expression Data.” Bioinformatics 26: 139–40. https://academic.oup.com/bioinformatics/article-lookup/doi/10.1093/bioinformatics/btp616.

Rousseeuw, Peter J. 1987. “Silhouettes a Graphical Aid to the Interpretation and Validation of Cluster Analysis.” Journal of Computational and Applied Mathematics, 53–65. http://www.sciencedirect.com/science/article/pii/0377042787901257.

Smirnov, Nikolai Vasilyevich. 1948. “Table for Estimating the Goodness of Fit of Empirical Distributions.” Annals of Mathematical Statistics 19: 279–81. https://projecteuclid.org/euclid.aoms/1177730256.

Wald, Abraham, and Jacob Wolfowitz. 1940. “On a Test Whether Two Samples Are from the Same Population.” The Annals of Mathematical Statistics 11: 147–62. https://projecteuclid.org/euclid.aoms/1177731909.