BACKGROUND
comparing cases and controls is one of the most widely used methods in genetic and epidemiological research to identify disease risk factors at the population level.
from the study design standpoint, to maximize the power of detecting a true effect it is important to understand the major sources of phenotypic variation, and to minimize sample heterogeneity accordingly.
furthermore, to reduce the number of spurious positive findings due to confounding factors, it is important to match cases and controls on "well-established determinants"  <cit>  that are not themselves the variables of direct interest.
in practice, however, it is often difficult to declare a priori which variables, out of many that are examined, are the established risk factors.
occasionally, the major factors affecting the phenotypic outcome may be truly strong and well known, such as cigarette smoking as a risk factor for lung cancer, or older age for alzheimer's disease.
in most other situations, however, particularly those concerning multifactorial diseases such as cancer and psychiatric disorders, there are usually numerous contributing factors for the observed phenotype, but their relative importance is not always known beforehand.
while many case-control studies automatically include age and gender in sample matching, additional variables that are important for the phenotype need to be chosen on a case-by-case basis, and sometimes only after the data have been collected and analyzed.
in genetic association studies, for example, the ancestral background of human subjects can have a strong confounding effect .
a parallel situation exists for gene expression analyses involving the use of postmortem samples, where tissue ph and near-death physiological stress can exert a major influence on the inter-individual variation of expression patterns  <cit> .
the impact of ph/agonal stress is so strong that it often far outweighs the influence of all other factors, including age and gender, and can obviate the detection of the impact of the illness.
because of this, more and more gene expression studies in recent years take special precaution to match samples by ph and agonal factors, just as a well designed genetic study seeks to balance cases and controls by self-reported racial identity or continental ancestry.
despite the widespread use and general success of these sample matching strategies, the risk of residual confounding remains.
the key ph-sensitive genes or pathways, such as components of mitochondrial electron transport chain and proteasome genes, are highly variable between samples  <cit> , and often appear as the top findings in microarray-based case-control comparisons of brain samples.
for example, while several studies have reported down-regulation of mitochondrial transcripts in schizophrenia  <cit>  and bipolar disorder  <cit> , others have reported up-regulation  <cit> .
the samples used by prabakaran et al.
<cit>  had a slight case-control difference in ph, but many more controls than cases died of cardiac events  <cit> .
further analyses of the same rna samples suggested that most of the findings that implicate mitochondria genes could be explained by effects of medication.
interestingly, the samples used in sun et al.
<cit>  were not balanced in ph, although the clinical condition appeared to be balanced.
these conflicting results suggest that the role of ph-sensitive, stress-related genes in psychiatric disorders is still unresolved.
similarly, in the parallel example of genetic association studies, several recent analyses have highlighted the need for more stringent controls for the very strong genetic confounders  <cit> .
in studies involving highly diverse populations, many human subjects are admixed at the individual level, that is, they carry genetic material derived from several founding populations.
for such individuals, a single self-reported racial or ethnic descriptor such as "african american" or "hispanic" is no longer adequate for representing the proportional contribution from multiple ancestral origins.
it has become more desirable, and in fact feasible, to infer the individual admixture ratios from the observed genetic data  <cit> , and to apply these empirically derived ratios in post hoc sample matching  <cit> .
in effect, what was initially a sample classification problem, in which subjects are categorized into discrete ethnic groups, has been turned into a "grades of membership" problem  <cit> , in which individual samples are scored on one or several continuous variables.
these continuous variables can be used for sample selection, case-control matching, or as a new covariate in regression analyses, stratified analyses, or ordered subset analyses  <cit> .
the empirically derived ancestral ratios may be more effective for mitigating the impact of confounding, because they can be more accurate than self-reported ancestry, as the former are derived from the genetic data per se, and are less susceptible to survey errors or recall bias.
in this study, we applied a similar strategy to an ongoing gene expression study in which we compare postmortem brain tissues between normal controls and subjects who suffered from major depression, bipolar disorder, or schizophrenia.
in a previous report  <cit> , we described a classification-based analysis in which gene expression patterns in most subjects can be assigned to one of two main types: one from a low-ph, highly stressed group of samples, named "type 2", and the other from a normal-ph, low-stress group of samples, named "type 1".
these two prototypes of expression patterns can be distinguished by strong and systematic changes in several biological pathways, including genes involved in energy metabolism and stress response.
since that report, we have increased the scope of our investigation from three brain regions in  <dig> subjects to six regions in up to  <dig> subjects .
in carrying out case-control analyses, we found that even among the supposedly "purified" subset consisting of only the type  <dig> samples, some residual heterogeneity in ph/agonal stress may still be driving the case-control comparison results, largely because of the overwhelming impact of agonal stress.
meanwhile, the ph- and stress-related genes that we and others have characterized continue to appear in the literature as among the top gene expression findings in comparative studies for a variety of diseases and conditions  <cit> .
this experience motivated us to seek finer control of this obscuring variable by characterizing sample heterogeneity in greater detail.
specifically, we refined our previous dichotomous classification scheme to one that evaluates group-membership by quantitative ratings.
a second rationale for pursuing this study came from the recognition that ph values are typically measured in one or two brain regions , whereas disease-related changes in gene expression are expected to occur in numerous brain regions.
there is no a priori reason to assume that altered ph and agonal factors would impact all these brain regions in a uniform manner.
consequently, sample matching based on a parameter derived from a single brain area or the entire brain may not be reliable for all regions examined, whereas gene expression data for individual regions can be used to assess specific regional patterns of agonal stress.
to this end, we developed agonal stress rating , a quantitative system that measures the degree of stress of each rna sample on a continuous scale based on gene expression data.
we examined the relationship between asrs and conventional pre hoc indicators such as ph and clinically derived agonal factor scores , compared the stress ratings across six brain regions, and assessed the performance of different sample matching strategies.
we also developed rigorous data pre-processing methods, compared different options of defining the asrs, evaluated the robustness of asrs in terms of the between-lab and between-platform reproducibility, and explored several related analysis algorithms.
RESULTS
systematic technical variation and data processing strategies
before we begin to characterize biological confounding factors, non-biological sources of variation must be identified.
the microarray data used in this study were collected in multiple experimental batches, representing the mixed use of two types of affymetrix genechips , experiments run at three laboratories , rna samples from six brain regions , and six cohorts of approximately  <dig> subjects each , for up to  <dig> subjects, about half of which were normal controls, the other half were cases of major depression, bipolar disorder, or schizophrenia.
cohort assembly, tissue dissection and rna extraction took place in multiple stages, typically several months apart.
the rna samples were labeled and hybridized one cohort at a time, one region at a time, in two or three laboratories  separately.
as a result of these technical variabilities, the entire dataset contained systematic differences between sites, chip types, and sometimes, cohorts, although the cohort-cohort technical differences are blended with genuine sample-sample differences across cohorts.
this type of technical variation warrants careful scrutiny, and must be adequately controlled to ensure the accuracy of analyzing biological differences.
after array scanning and affymetrix genechip data summary , we examined chip-to-chip similarity in each region by plotting the pairwise correlation matrices as color-coded heatmaps, where red indicates high similarities between pairs of chips, blue indicates low similarity, and the samples are ordered by site and by cohort.
figure 1a showed one such correlation map for  <dig> ancg chips produced by using logged intensities of all  <dig>  refseq gene-based probe sets on the u133a chip.
in this example, as is the case for other brain regions, we analyzed data from two sites in our consortium for six cohorts, representing  <dig> naturally occurring experimental batches.
figure 1a shows that the observed patterns aggregate in rectangular "blocks" of high correlation, indicated in red, corresponding to samples that are highly similar to each other in gene expression patterns.
importantly, the block-block partition coincides with the natural boundaries of experimental batches.
not all experimental batches can be definitively separated from each other; typically the  <dig> batches can be adequately described by 5– <dig> blocks, as sometimes two adjacent cohorts from one site form a single indistinguishable group, mostly due to relatively homogeneous technical conditions shared across these cohorts.
in all, block-like structures are seen in every brain region, and almost always correspond to experimental batches, suggesting that they arose from changes in reagents, hybridization protocols, chip types, or scanning conditions.
at least two other lines of evidence suggest that the "blocks" are derived from technical variation between experimental batches rather than due to genuine biological differences between samples in different cohorts.
first, when we set aside data for all human transcripts, and plot chip-chip correlations by using only the  <dig> affymetrix control probe sets, which target spiked-in e. coli transcripts, the data still exhibit the same block structure as seen with the use of all genes , indicating that technical factors play a major role in delineating the blocks.
secondly, when we re-ran all samples on a custom 711-gene illumina beadarrays in a validation experiment that was done at one site and randomized samples across cohorts and regions, we did not observe the block-like separation between cohorts , suggesting that biological differences between cohorts made a minor contribution, if any at all, to the observed "blocks".
the correlation matrices not only provide a means to visualize sample heterogeneity, but also allowed us to define a most parsimonious set of blocks for each region for the purpose of data normalization.
to adjust for the block effect, we subtracted from each sample's logged expression value the median value of the block, and did so for each block and for every transcript.
for example, for each gene, expression values for all block  <dig> samples would subtract the median value of block  <dig>  and likewise for all other blocks, such that after the centering, the median of each block is at zero, effectively transforming the original data into the deviations from the block medians, in a procedure that is similar to adding a block factor as a categorical variable in robust linear modeling .
the goal of this procedure is to remove a block-wide fixed factor, most of which, as we argued above, came from technical sources.
the benefit of this adjustment, particularly the assumption of a fixed block-specific effect, can be evaluated by an objective criterion: how well the adjusted data increase the technical reproducibility of the same samples that were run at two or more sites.
we found that after removing the block effect by median centering, we improved the between-site similarity for replicate chips run at multiple sites .
for samples that were run on both the u133a and the u133plus_ <dig> chips, removing a fixed between-chip-type effect produced satisfactory agreement between the two chip types .
although the systematic differences between blocks can be adjusted in this way, the assumption of a fixed effect is not expected to hold for all genes in all samples equally well.
other types of variation, including within-block heterogeneity, however, are not readily discernible in the data, and are probably impossible to control.
our analysis showed that a major portion of the between-block differences have been accounted for by a fixed technical effect affecting all samples within the block, for most of the genes studied.
in the example of  <dig> ancg chips, the median proportion of variance explained by the "block" factor, across all  <dig>  genes, is  <dig> % of the total variance.
because the  <dig> % between-block variance has one degree of freedom, while the  <dig> % within-block variance has  <dig> degrees of freedom, the f test showed that more than half of the genes had significant between-block differences.
in this case, 56% of the genes satisfy p <  <dig>   for the block factor.
biological variation across samples
previously we showed that most of the brain samples in our study can be classified into two main types of expression patterns  <cit> : those from individuals who died quickly and had normal tissue ph, and those from individuals who suffered prolonged death, typically with medical complications, and exhibited low tissue ph.
the threshold value between low and normal ph is around  <dig>  in our samples, but it varied among different studies and different tissue collections  <cit> .
figure 2a shows the correlation heatmap for the  <dig> ancg samples obtained by using expression values already adjusted for the block effect as described above.
this is the same plot as in figure 1b, but with the samples re-ordered so that the previously designated type  <dig> samples are grouped to the lower left side of the graph.
while the distinction between the two classes can be clearly seen, there are still samples of intermediate patterns that may correspond to varying degrees of agonal stress that do not readily belong to the two opposing prototypes.
because ph/agonal stress acts as an exceedingly strong confounder in gene expression studies, a dichotomous classification may not be sufficient to ensure that cases and controls are well-stratified, or balanced within each stratus.
in addition, different brain regions may carry different stress outcomes; whereas this aspect of data heterogeneity is not well informed by ph values measured in one brain region, nor by the clinical indicators.
one possible approach for dealing with residual heterogeneity is to subdivide the main classes further, such as into types 1a, 1b, 2a, 2b, etc, effectively classifying samples in multiple tiers to establish nested subsets, within each of which the cases and controls are more homogeneous and better balanced.
figure 2b shows an example of three-type classification; however, even finer subdivisions are clearly possible.
in practice, it is difficult to decide the number of clusters or layers of clusters needed, and the samples often show genuinely graduated differences of expression patterns.
a natural alternative to a finer-grained classification approach, therefore, is to rate samples on one or several continuous scales.
toward this goal, we first carried out a principal component analysis.
we re-ordered the  <dig> ancg sample by their first principal component  scores, and the resulting heatmap  shows a gradual transition from one end of the spectrum to the other.
similarly smooth progressions are also observed for the other five regions .
importantly, the pc <dig> scores are highly correlated with ph , the clinical agonal factors, as well as with the previously determined type 1-type  <dig> designations; whereas pc <dig> and pc <dig> scores have almost no correlation.
for example, in ancg, r is  <dig>   and  <dig>   for ph-pc <dig> and ph-pc <dig>  respectively.
note that with n =  <dig>  r needs only to be approximately  <dig>  to be significantly non-zero at p =  <dig> ).
this result not only confers a biological meaning to pc <dig>  but also suggests that a single continuous variable is likely to be sufficient to capture most of the gradual progression of expression patterns from the low-ph prototype to the normal-ph prototype.
not all genes contributed equally to the placement of individual samples along the gradient of membership.
we selected the 20% strongest type 1-like samples  and the 20% strongest type 2-like samples , and calculated the student's t scores that contrasted the group means between these two canonical groups.
this allowed us to rank genes by their type 1- type  <dig> absolute t scores, with the "top genes" being those that are most strongly affected by ph/agonal stress.
when we re-plot figure 2c by using the 25% strongest ph-sensitive genes , a strong gradient is clearly seen .
the gradient between samples becomes much dampened when the second 25% of ranked genes  is used, and fades away almost entirely with the use of the third and last 25% of ranked genes .
this result indicates that the top 50% of genes are likely to be informative for membership inference, with the top 25% and top 5% of genes carrying increasingly greater discriminating power, as one would expect.
in additional file  <dig> we showed a heatmap of expression levels of the top 25% of transcripts across  <dig> ancg samples.
these genes have been used to calculate the sample-sample correlations shown in figure  <dig>  upper left panel.
the genes are ordered from left to right by their coefficients in the first principal component , whereas the samples are ordered from top to bottom by their first principal component scores.
the actual expression levels are provided in additional file  <dig>  which is a .cdt file that can be opened in java treeview for flexible browsing.
to estimate the number of genes significantly affected by the ph effect, we used the nearest shrunken centroids classifier  <cit>  to calculate the cross-validation errors in a two-class classification analysis, and examined gene panels containing varying numbers of most discriminating genes.
panels having as few as  <dig>  and as many as  <dig>   genes resulted in eight or fewer cross-validation errors out of  <dig> samples, and formed a plateau of error curve , indicating a broad range of the number of informative genes.
similarly, in genetic association studies, some dna polymorphisms are more informative for distinguishing different populations  <cit> .
in our procedure to construct an agonal stress rating for individual samples , we used 25% or 5% of "top genes", and always found that with the 5% top genes the intermediate ratings are more "stretched out" than with 25% of top gene , as one would expect, because the strongest ph-sensitive genes are more powerful in distinguishing subtle differences in intermediate grades of membership.
we ran the principal component analysis for six regions separately and defined the strongest type 1/2-like samples for each region.
when we subsequently compared the strongest type- <dig> against the strongest type- <dig> samples and ranked genes by their t scores, the top 5% or 25% genes are similar across the six regions as their t scores are highly correlated across regions .
on average, a top  10% gene in one region has a 57% chance to be among the top  10% in another region.
we ranked genes by their average t score ranks in five regions , and listed the  <dig> most strongly up-regulated and  <dig> most strongly down-regulated genes in additional file  <dig>  genes in these lists can be used as most informative genes in future, independent studies.
agonal stress ratings
because the pc <dig> scores successfully arrange the samples into a smooth gradient, these scores by themselves could serve as a measure of agonal stress in individual samples.
however, we found that pc <dig> may be strongly influenced by the scale of variance in individual chips and sometimes by a small number of "outlier" samples, whereas our method of using pc <dig> as a crude criteria to pre-select the strongest ~20% type 1- and type 2-like samples is more robust to these outliers.
in addition, the interpretation of the principal component scores requires the notion of decomposition of the observed gene expression patterns into the linear combination of multiple components.
this interpretation is most natural in cases where each sample represents the actual mixing of multiple cell types, each having its own canonical expression patterns.
the meaning of pc scores is also complicated by the process of analyzing log-transformed signal values, while actual transcript levels are "mixed" on the linear scale.
alternative indices, such as the probability of classification  <cit> , or the prediction strength such as the "margin-of-victory" measures adopted in golub et al.
<cit> , are most appropriate when there are multiple genuinely discrete outcomes, for which what is uncertain is the strength of evidence for class assignment.
in our case, gene expression in the brain is most likely affected by agonal stress in a graded  fashion.
although many of the samples belong to the two extreme states–one is minimally affected by stress, the other for samples that have converged to the quasi-steady state of "thoroughly affected"–some tissues in our collection are apparently sampled at an intermediate physiological state, and can best be characterized by the sample's relative distance to the two ends of the spectrum, that is, the distance to the prototypical normal-ph pattern minus the distance to the prototypical low-ph pattern, where "distance" can be the pearson's correlation, euclidean distance, spearman's rank correlation, or a number of other metrics.
the agonal stress rating is thus defined as the difference between each sample's distances to the two prototypical patterns, and can be calculated by using different sets of most informative genes, which in turn can be defined by comparing the most extreme samples .
although asr is formally neither a probability of classification nor a mixing ratio, it is actually quite similar to these other measures as most of them are variants of the linear discriminant function.
a comparison of the median asr values  with tissue ph  reveals two features.
first, there is a general correlation, i.e., low ph samples tend to have low asrs.
secondly, there is considerable local discrepancy, i.e., among the normal ph samples, the asr-ph correlation is weak.
these discrepancies imply that the asr values, which are derived directly from the gene expression data, are sometimes at odds with the measured brain ph.
in the face of such discrepancies, we need to determine which index is a more accurate surrogate for the actual degrees of stress experienced by the individual subjects in specific brain regions, and therefore provides a safer control of the agonal stress confounder.
we examined a test case: from a set of  <dig> ancg samples previously "included" in an intermediate-stage analysis, we selected all of the thirteen control samples with asr >  <dig> , and divided all of the fourteen major depression samples into two groups : one that was matched with the  <dig> controls in ph  but not in asr , another matched to the controls in asr  but not in ph .
we carried out mdd-control comparisons for the two mdd groups separately, and analyzed the top and bottom  <dig>  genes in ease   <cit>  for significantly enriched gene ontology terms.
figure 5b shows that the ph-matched comparison yields the gene families and pathways associated with agonal stress that we and others previously discovered, whereas the asr-matched group significantly reduces the effect.
this result is not surprising, as by the definition of asrs, we effectively have balanced the key stress-related pathways when we match samples by asr.
this test case, however, shows that matching by ph is not always safe for guarding against the agonal stress confounder, whereas the empirically derived asr values provide a more accurate assessment of the regulatory responses to near-death stress in individual samples, and allow a more stringent control.
in a section below we will describe the robustness asrs, particularly the finding that deriving asrs by using only the control samples did not substantially change the result.
between-region differences
after calculating asr for all six regions and for two sites in each region, we obtained twelve series of asr values.
as amy and cb had larger numbers of missing chips , we plotted the eight asr series for the four remaining brain regions in color codes along with ph values and afs  , with the samples sorted by ph , and missing data in white.
this figure has several broadly recognizable features.
first, asr results from the two sites tend to agree, although not always so.
secondly, asrs in most samples tend to be correlated across the four regions, reflecting brain-wide patterns.
thirdly, the asr scores show a coarse correlation with ph and the clinical afs scores, as samples at the bottom of the figure are generally those with both low ph and low asr .
the correlations between ph and asr, across all  <dig> samples, range from  <dig>  to  <dig>  among the twelve asr series .
but these correlations are much smaller when using only the  <dig> ph> <dig>  samples, indicating that much of the correlation was driven by the large differences between the high-ph and the low-ph samples.
finally, some of the subjects who had normal ph yet low asr can be explained by having clinically recorded agonal stress .
however, beyond these large trends, there remain striking between-region differences in many individual subjects.
for example, the first subject from the top, indicated by the first arrow on the right, has low asrs  in ancg, and normal to high asrs in the other regions.
the third and sixth subjects, indicated by the next two arrows, have unusually low asrs in dlpfc and hc, respectively.
these strong region-region differences in asrs are robustly observed  and suggest genuine differences in stress outcome across different parts of the brain.
such differences may arise due to inter-individual variabilities in local structure or function, resulting in region-specific vulnerability to agonal stress.
an additional possibility is that the nature of the illness that caused the death, such as hepatic, renal, or cardiac failures, may have triggered a region-specific brain response.
these results underscore the value of using asrs to carry out per-region sample matching, as ph and clinical indicators are measures for the entire brain.
robustness of asrs
it is difficult to know how much between-region differences arise from variabilities in tissue dissection, but this factor is unlikely to explain most of the differences we observed here, as the effect is seen even for relatively large, easy-to-dissect regions such as dlpfc and cb.
although the nature of the observed regional differences is still not clear, most of such differences are likely due to actual biological differences rather than to technical variability in performing rna labeling and hybridization or to data analysis methods.
there are several reasons for making this conclusion.
first, while regional differences of asrs are often large , asrs varied to a much lesser degree  between sites,  between different numbers of informative genes used,  between different distance measures ,  with another round of normalization after median centering,  following the selection of only the high asr samples as the basis for re-calculating block medians, or  importantly, following the use of only normal controls rather than both cases and controls for ranking genes by t scores.
secondly, we examined the possibility that some regions may actually have a greater type 1-type  <dig> difference than the other regions, and different samples may have different regional differences.
to this end, we calculated additional versions of asr by using  the same ten type  <dig> samples and the same  <dig> type  <dig> samples to determine the informativeness of genes in all six regions;  combined all six regions  in designating the canonical samples on the two extremes, defining most informative genes, and calculating asr across all  <dig> samples .
these alternative versions did not significantly alter the asr patterns across samples and regions, and did not explain most of the observed regional differences.
thirdly, with our 700-gene illumina data, we were able to compare the asrs based on data from two different platforms.
for each sample, we averaged the affymetrix asr values from two sites to obtain the six values for six regions, and calculated their correlation to the corresponding six asr values from the illumina data.
we obtained  <dig> such correlations in  <dig> samples for which we had both the affymetrix and illumina data.
of these  <dig>   <dig> correlations were above  <dig> ,  <dig> were above  <dig> , and  <dig> were above  <dig> , with most of the smaller correlations explained by very low between-region variations, that is, when the six scores are similar to begin with for a given sample, it is more difficult to observe a highly correlated pattern for this sample in a different platform.
discussion
many gene expression analyses have shown that agonal stress at the time of death can significantly alter expression patterns in postmortem tissues  <cit> .
because of this, comparative studies that rely on postmortem material must take every precaution to ensure that cases and controls are properly balanced with regard to this well-established confounder.
what remains unclear, however, is to what extent residual imbalance still accounts for the most significant findings.
the study presented here is motivated by two considerations.
first, a dichotomous classification of good-quality versus bad-quality samples is often inadequate in assuring that cases and controls are well matched among the "good samples".
secondly, clinical variables such as afs and continuous variables such as tissue ph have several practical limitations, both in terms of accuracy and in their inability to assess each brain region separately.
to address these concerns, we developed a rating metric to infer agonal stress based on expression data, and strongly advocated a conservative approach that uses these empirical ratings to select a homogeneous group or to balance cases and controls.
the adoption of continuous ratings instead of the more commonly used categorical assignment is expected to bring several advantages: providing a more reliable measurement of underlying heterogeneity that does not show natural boundaries, retaining important information regarding sub-threshold variability, and allowing flexible integration with other variables.
between-region differences
our results revealed striking between-region differences in stress outcome.
this complexity presents additional challenges to gene expression analyses of the brain, especially if the goal is to not only study each region separately, but also to study biological regulation across brain regions, as well as their disruption in the diseased state.
during our initial analysis, we had hoped that all regions of the same brain would have a similar stress profile, making it possible to use one or more regions as the same-subject control for the other regions.
in this scheme, between-region differences in gene expression, instead of gene expression levels in each region separately, are compared between cases and controls, under the assumption that agonal stress is acting more extensively across the entire brain, whereas expression signatures of psychiatric disorders are restricted in some regions.
this approach is reminiscent of the genetic method of using family controls to remove the impact of population structure.
our analysis, however, revealed considerable heterogeneity between brain regions in stress-related expression patterns, suggesting that this between-region analysis method is still problematic and requires further investigation.
the need for a conservative approach
one of the concerns in adopting this approach is that gene expression changes in response to near-death conditions may overlap with those affected by chronic psychiatric states.
if the agonal stress ratings reflect the blending of both effects, how do we know whether we have under- or over-corrected the main effect of interest?
unfortunately, at the present time we do not know many genes or pathways that are clearly and reproducibly altered by major depression and bipolar disorder; as a result we currently do not have a definitive set of "true positives" to fine-tune the stringency of the sample matching strategy.
to address this type of question would require a sufficiently large collection of samples to directly investigate whether patients of mental disorders are more likely than the healthy controls to have more severe terminal stress, lower tissue ph values, and more pronounced changes in gene expression patterns.
when the sample size is below or near  <dig>  as is currently the norm in expression profiling of human brains, a study is not properly powered to formally answer this question, and the gene expression signature due to mental disorders, if it overlaps with that due to agonal stress, will be easily obscured.
however, despite this uncertainty, it is widely recognized that the effects due to agonal stress usually have a much more potent influence on gene expression patterns than do mental disorders.
in such a situation, the chance of finding false positives due to residual imbalance is quite high.
a continuous, quantitative rating system, like the asr that we developed here, can greatly reduce the number of false positives in such studies by allowing a quantitative assessment of the broadly recognizable outcome of the most prominent confounder.
by applying the asr, it remains possible to detect a true signal for psychiatric disorders as long as it is strong enough or sufficiently independent of the confounding effect, particularly if the disease related changes involve a small number of transcripts whereas the agonal conditions usually affect a large number of genes  <cit> .
in essence, the practice of sample matching by data-derived indices constitutes a higher standard for a "true positive", requiring that its main effect  to rise above its potential colinearity with the major extraneous covariates .
the situation is analogous to the case of a genetic association study of, for example, cardiovascular disorders, where the goal is typically to detect genetic association with the disease while adjusting for the traditional risk factors, such as blood pressure, diabetes, body-mass index, and serum levels of hdl and triglyceride  <cit> .
because these traditional risk factors are also influenced by genetic variation, making such corrections constitutes a more focused goal: to discover genetic contribution to the disease independent of the genetic basis of the other risk factors, even though in the long run it is ideal to be able to study all the contributing factors in conjunction with each other.
by the same token, the near-term goal of our study is to discover gene expression signatures of psychiatric disorders independent of gene expression changes due to confounding factors, especially when these factors  are not likely to be closely related to the biology of mental illness.
conventional versus empirical indicators
in this study, we found that the agonal stress ratings are sometimes at odds with tissue ph values or clinically-recorded medical factors.
these indices, though useful in most situations, have several shortcomings when serving as surrogates for the underlying biological heterogeneity.
first, different brain regions may carry different stress outcomes, while ph values were usually measured in one region.
likewise, the clinical indicators do not inform regional heterogeneity.
secondly, these conventional variables inevitably contain measurement errors or incomplete information.
thirdly, brain ph is both the outcome of prior episodes of stress and the trigger for subsequent physiological responses.
as a result, even if ph is measured in all regions, and even if ph is similar across regions  <cit> , the samples that have similar ph are still not likely to have a uniform stress-induced gene expression profile.
for these reasons, we recommend using asr as a primary criterion in sample selection and sample matching, analogous to using inferred ancestry in genetic association studies  <cit> .
it is also important to point out that the tissue ph measurements and clinical records are still of immense value in sample matching.
they provide biological meaning to the asr values, and allow an integrated strategy that combines these different indicators in sample selection  <cit> .
we believe that future studies need to continue collecting clinical information as extensively as possible, and if feasible, measure ph in multiple brain regions to directly assess regional differences of degree of stress.
assumption of neutrality
an implicit assumption of using inferred ancestry to control population stratification in genetic studies is that most of the genetic markers tested are phenotypically neutral; that is, not associated with the disease under study.
under this assumption, when data have been collected for a large number of loci , the majority of these loci can be used to infer population structure  <cit> .
alternatively, they can be used as genomic control loci to detect over-dispersion of the standard test statistics due to stratification  <cit> .
this assumption of neutrality generally holds when we expect to detect large or moderate signals of association for only a small number of causative genes.
in gene expression analysis, however, it is possible that a considerable proportion of the transcripts are affected both by the extraneous confounders such as agonal stress and by the disease being studied.
as a result, some of the genes used to infer agonal stress may also be associated with the disease, making it difficult to separate the two effects.
however, this apparent difference between genetic and gene expression studies depends on the actual context of the study.
population stratification can be a very strong confounder for traits or diseases that have subtle genetic effects but large population differentiation , or are studied in recently admixed population where chromosomal segments of defined ancestry can be as long as  <dig> cm  <cit> .
in these situations, a substantial fraction of genetic markers may show weak association, while most of such signals may disappear after correcting for inferred individual ancestry or locus-specific ancestry.
for both gene expression and genetic studies, using the data per se to detect sample heterogeneity is a practically useful yet ultimately exploratory method, especially when true positives are not known beforehand.
model considerations and the need for canonical patterns
in inferring individual ancestry from genetic data, it is helpful to know the genetic profile of the putative ancestral populations, for example, the allele frequencies determined from samples that represent the progenitors of the admixed individuals.
without these "pure" canonical profiles, while it is still theoretically possible to simultaneously determine both the canonical ancestral patterns and the mixing ratios of each sampled individual, the results are less reliable and often improperly scaled  <cit> .
similarly, our strategy to derive agonal stress ratings relies on having obtained data for both "normal" tissues and severely stressed tissues.
these opposing extremes serve as the two reference points to measure the grades of membership in between.
hypothetically, in a different study, if none of the samples  are from the severely stressed low-ph samples, the canonical signature of the confounder  would be much less precisely defined.
however, even when the absolute values of asr only scale from "normal" to mildly stressed, the relative ratings among samples can still be used as the empirical basis for sample matching, or as the basis for a variety of post hoc strategies, such as stratified analysis, or incorporating covariates in regression analysis.
we have found that the main differences due to agonal stress can be robustly observed, i.e., are highly similar between study sites and across two microarray platforms.
this means that the canonical patterns that we describe here, featuring prominently energy metabolism genes and stress response pathways, can be transferred to other studies of postmortem tissues even if these studies characterized a narrower range of the confounding effect.
in additional files  <dig> and  <dig> we provide the genes most strongly affected in our dataset; these genes can be used as informative stress markers for pre-evaluating future sample collections, even before microarray experiments.
the parallel example in genetic studies is that one can profile the genetic signature for a few major continent groups  and use this information repeatedly to infer admixture in individuals from a heterogeneous population such as the african americans, sometime by using a small number of most informative genetic markers  <cit> .
we also wish to emphasize that using only the controls to define the two canonical expression patterns did not change the asr ratings in any meaningful way, reflecting the fact that the case-control differences are far subtler than the stress-related differences.
the situation would be much simpler if the mixing ratios are known by other, independent methods, or if the canonical patterns were profiled in independent studies.
such an "expression signature bank" can be established by studying the response to controlled stress treatment in animal models, or by analyzing "pure" classes of brain cells, such as laser-captured defined cell populations.
stuart et al.
<cit>  gave an example where the mixing ratio is known for tumor samples when tissue pathologists reported a priori the fractional composition of different cell types in each sample.
conversely, lu et al.
<cit>  used expression data for synchronized yeast cells in defined phases to infer mixing ratios of asynchronized samples–this is a case where the basic patterns were known, with mixing ratios being the target of inference.
when neither is known, as in our case, the solution cannot be arrived at analytically but can be optimized iteratively.
for example, several methodology studies  <cit>  have implemented variants of the expectation-maximizing  algorithm to simultaneous search for the unknown canonical patterns and the unknown mixing ratios in gene expression data.
similar methods, including ones involving markov chain monte carlo methods, have been developed for inferring individual's genetic ancestry  <cit> .
in our dataset, as the principal pattern is relatively strong, we expect the result to converge quickly and decide to adopt a simple definition of asr.
in more complicated situations, for example, when the second or higher principal components can be interpreted as signatures of other confounders such as age, medication, or cell types, it would be important to apply these more sophisticated algorithms.
CONCLUSIONS
in this study we developed an agonal stress rating  system that evaluates each sample's degree of stress based on gene expression data, and used asrs in post hoc sample matching.
we found that asr-based matching provides tighter control of the agonal effect than by using ph.
we also found that different brain regions exhibited different stress outcomes and that such regional patterns also varied between individuals.
our results once again highlight one of the main challenges in gene expression studies of psychiatric disorders: transcript levels are under the influence of a large number of confounding factors.
agonal stress undoubtedly plays a major role; as a result the stress-related, ph-sensitive genes or pathways are prone to appear as the top findings in case-control comparisons.
we propose to adopt a conservative approach for the genes and pathways that are clearly altered by the confounding factors, even if it is possible that they are also influenced by the disease of interest.
deriving an asr from gene expression data and using it for sample matching is one example of such an approach.
this approach involves using continuous ratings as opposed to categorical assignments, thus represents an early attempt to apply graded classification methods to a sample heterogeneity problem for brain tissues, similar to the application of dimensional models in psychiatric diagnosis.
in practice, we believe that this method can and should be expanded to the characterization of other sources of biological variation, such as medication, age, and cell-type composition of the dissected brain tissues.
drug use by psychiatric patients is likely to affect gene expression, regardless whether the medication was effective in treating the disease or not.
but medication history is one of the most elusive aspects of clinical information to accurately record and quantify.
likewise, an individual's chronological age may vary greatly from the actual physiological age of the tissue under study, while the neuronal-glial ratios of the dissected tissues may also vary from brain region to brain region, from subject to subject.
proper monitoring of these additional sources of phenotypic variation is an important prerequisite for the eventual identification of the true gene expression signature of mental disorders, and in this regard, animal models of either drug treatment or stress, independently applied, in the absence of psychiatric history and genetic heterogeneity, represents a powerful alternative strategy for defining canonical expression patterns and assessing their relative contributions.

 comparing cases and controls is one of the most widely used methods in genetic and epidemiological research to identify disease risk factors at the population level. from the study design standpoint, to maximize the power of detecting a true effect it is important to understand the major sources of phenotypic variation, and to minimize sample heterogeneity accordingly. furthermore, to reduce the number of spurious positive findings due to confounding factors, it is important to match cases and controls on "well-established determinants" that are not themselves the variables of direct interest. in practice, however, it is often difficult to declare a priori which variables, out of many that are examined, are the established risk factors. occasionally, the major factors affecting the phenotypic outcome may be truly strong and well known, such as cigarette smoking as a risk factor for lung cancer, or older age for alzheimer's disease. in most other situations, however, particularly those concerning multifactorial diseases such as cancer and psychiatric disorders, there are usually numerous contributing factors for the observed phenotype, but their relative importance is not always known beforehand. while many case-control studies automatically include age and gender in sample matching, additional variables that are important for the phenotype need to be chosen on a case-by-case basis, and sometimes only after the data have been collected and analyzed. in genetic association studies, for example, the ancestral background of human subjects can have a strong confounding effect. a parallel situation exists for gene expression analyses involving the use of postmortem samples, where tissue ph and near-death physiological stress can exert a major influence on the inter-individual variation of expression patterns. the impact of ph/agonal stress is so strong that it often far outweighs the influence of all other factors, including age and gender, and can obviate the detection of the impact of the illness. because of this, more and more gene expression studies in recent years take special precaution to match samples by ph and agonal factors, just as a well designed genetic study seeks to balance cases and controls by self-reported racial identity or continental ancestry. despite the widespread use and general success of these sample matching strategies, the risk of residual confounding remains. the key ph-sensitive genes or pathways, such as components of mitochondrial electron transport chain and proteasome genes, are highly variable between samples, and often appear as the top findings in microarray-based case-control comparisons of brain samples. for example, while several studies have reported down-regulation of mitochondrial transcripts in schizophrenia and bipolar disorder, others have reported up-regulation. the samples used by prabakaran et al. had a slight case-control difference in ph, but many more controls than cases died of cardiac events. further analyses of the same rna samples suggested that most of the findings that implicate mitochondria genes could be explained by effects of medication. interestingly, the samples used in sun et al. were not balanced in ph, although the clinical condition appeared to be balanced. these conflicting results suggest that the role of ph-sensitive, stress-related genes in psychiatric disorders is still unresolved. similarly, in the parallel example of genetic association studies, several recent analyses have highlighted the need for more stringent controls for the very strong genetic confounders. in studies involving highly diverse populations, many human subjects are admixed at the individual level, that is, they carry genetic material derived from several founding populations. for such individuals, a single self-reported racial or ethnic descriptor such as "african american" or "hispanic" is no longer adequate for representing the proportional contribution from multiple ancestral origins. it has become more desirable, and in fact feasible, to infer the individual admixture ratios from the observed genetic data, and to apply these empirically derived ratios in post hoc sample matching. in effect, what was initially a sample classification problem, in which subjects are categorized into discrete ethnic groups, has been turned into a "grades of membership" problem, in which individual samples are scored on one or several continuous variables. these continuous variables can be used for sample selection, case-control matching, or as a new covariate in regression analyses, stratified analyses, or ordered subset analyses. the empirically derived ancestral ratios may be more effective for mitigating the impact of confounding, because they can be more accurate than self-reported ancestry, as the former are derived from the genetic data per se, and are less susceptible to survey errors or recall bias. in this study, we applied a similar strategy to an ongoing gene expression study in which we compare postmortem brain tissues between normal controls and subjects who suffered from major depression, bipolar disorder, or schizophrenia. in a previous report, we described a classification-based analysis in which gene expression patterns in most subjects can be assigned to one of two main types: one from a low-ph, highly stressed group of samples, named "type 2", and the other from a normal-ph, low-stress group of samples, named "type 1". these two prototypes of expression patterns can be distinguished by strong and systematic changes in several biological pathways, including genes involved in energy metabolism and stress response. since that report, we have increased the scope of our investigation from three brain regions in subjects to six regions in up to subjects. in carrying out case-control analyses, we found that even among the supposedly "purified" subset consisting of only the type samples, some residual heterogeneity in ph/agonal stress may still be driving the case-control comparison results, largely because of the overwhelming impact of agonal stress. meanwhile, the ph- and stress-related genes that we and others have characterized continue to appear in the literature as among the top gene expression findings in comparative studies for a variety of diseases and conditions. this experience motivated us to seek finer control of this obscuring variable by characterizing sample heterogeneity in greater detail. specifically, we refined our previous dichotomous classification scheme to one that evaluates group-membership by quantitative ratings. a second rationale for pursuing this study came from the recognition that ph values are typically measured in one or two brain regions, whereas disease-related changes in gene expression are expected to occur in numerous brain regions. there is no a priori reason to assume that altered ph and agonal factors would impact all these brain regions in a uniform manner. consequently, sample matching based on a parameter derived from a single brain area or the entire brain may not be reliable for all regions examined, whereas gene expression data for individual regions can be used to assess specific regional patterns of agonal stress. to this end, we developed agonal stress rating, a quantitative system that measures the degree of stress of each rna sample on a continuous scale based on gene expression data. we examined the relationship between asrs and conventional pre hoc indicators such as ph and clinically derived agonal factor scores, compared the stress ratings across six brain regions, and assessed the performance of different sample matching strategies. we also developed rigorous data pre-processing methods, compared different options of defining the asrs, evaluated the robustness of asrs in terms of the between-lab and between-platform reproducibility, and explored several related analysis algorithms.  systematic technical variation and data processing strategies before we begin to characterize biological confounding factors, non-biological sources of variation must be identified. the microarray data used in this study were collected in multiple experimental batches, representing the mixed use of two types of affymetrix genechips, experiments run at three laboratories, rna samples from six brain regions, and six cohorts of approximately subjects each, for up to subjects, about half of which were normal controls, the other half were cases of major depression, bipolar disorder, or schizophrenia. cohort assembly, tissue dissection and rna extraction took place in multiple stages, typically several months apart. the rna samples were labeled and hybridized one cohort at a time, one region at a time, in two or three laboratories separately. as a result of these technical variabilities, the entire dataset contained systematic differences between sites, chip types, and sometimes, cohorts, although the cohort-cohort technical differences are blended with genuine sample-sample differences across cohorts. this type of technical variation warrants careful scrutiny, and must be adequately controlled to ensure the accuracy of analyzing biological differences. after array scanning and affymetrix genechip data summary, we examined chip-to-chip similarity in each region by plotting the pairwise correlation matrices as color-coded heatmaps, where red indicates high similarities between pairs of chips, blue indicates low similarity, and the samples are ordered by site and by cohort. figure 1a showed one such correlation map for ancg chips produced by using logged intensities of all refseq gene-based probe sets on the u133a chip. in this example, as is the case for other brain regions, we analyzed data from two sites in our consortium for six cohorts, representing naturally occurring experimental batches. figure 1a shows that the observed patterns aggregate in rectangular "blocks" of high correlation, indicated in red, corresponding to samples that are highly similar to each other in gene expression patterns. importantly, the block-block partition coincides with the natural boundaries of experimental batches. not all experimental batches can be definitively separated from each other; typically the batches can be adequately described by 5– blocks, as sometimes two adjacent cohorts from one site form a single indistinguishable group, mostly due to relatively homogeneous technical conditions shared across these cohorts. in all, block-like structures are seen in every brain region, and almost always correspond to experimental batches, suggesting that they arose from changes in reagents, hybridization protocols, chip types, or scanning conditions. at least two other lines of evidence suggest that the "blocks" are derived from technical variation between experimental batches rather than due to genuine biological differences between samples in different cohorts. first, when we set aside data for all human transcripts, and plot chip-chip correlations by using only the affymetrix control probe sets, which target spiked-in e. coli transcripts, the data still exhibit the same block structure as seen with the use of all genes, indicating that technical factors play a major role in delineating the blocks. secondly, when we re-ran all samples on a custom 711-gene illumina beadarrays in a validation experiment that was done at one site and randomized samples across cohorts and regions, we did not observe the block-like separation between cohorts, suggesting that biological differences between cohorts made a minor contribution, if any at all, to the observed "blocks". the correlation matrices not only provide a means to visualize sample heterogeneity, but also allowed us to define a most parsimonious set of blocks for each region for the purpose of data normalization. to adjust for the block effect, we subtracted from each sample's logged expression value the median value of the block, and did so for each block and for every transcript. for example, for each gene, expression values for all block samples would subtract the median value of block and likewise for all other blocks, such that after the centering, the median of each block is at zero, effectively transforming the original data into the deviations from the block medians, in a procedure that is similar to adding a block factor as a categorical variable in robust linear modeling. the goal of this procedure is to remove a block-wide fixed factor, most of which, as we argued above, came from technical sources. the benefit of this adjustment, particularly the assumption of a fixed block-specific effect, can be evaluated by an objective criterion: how well the adjusted data increase the technical reproducibility of the same samples that were run at two or more sites. we found that after removing the block effect by median centering, we improved the between-site similarity for replicate chips run at multiple sites. for samples that were run on both the u133a and the u133plus_ chips, removing a fixed between-chip-type effect produced satisfactory agreement between the two chip types. although the systematic differences between blocks can be adjusted in this way, the assumption of a fixed effect is not expected to hold for all genes in all samples equally well. other types of variation, including within-block heterogeneity, however, are not readily discernible in the data, and are probably impossible to control. our analysis showed that a major portion of the between-block differences have been accounted for by a fixed technical effect affecting all samples within the block, for most of the genes studied. in the example of ancg chips, the median proportion of variance explained by the "block" factor, across all genes, is % of the total variance. because the % between-block variance has one degree of freedom, while the % within-block variance has degrees of freedom, the f test showed that more than half of the genes had significant between-block differences. in this case, 56% of the genes satisfy p < for the block factor. biological variation across samples previously we showed that most of the brain samples in our study can be classified into two main types of expression patterns: those from individuals who died quickly and had normal tissue ph, and those from individuals who suffered prolonged death, typically with medical complications, and exhibited low tissue ph. the threshold value between low and normal ph is around in our samples, but it varied among different studies and different tissue collections. figure 2a shows the correlation heatmap for the ancg samples obtained by using expression values already adjusted for the block effect as described above. this is the same plot as in figure 1b, but with the samples re-ordered so that the previously designated type samples are grouped to the lower left side of the graph. while the distinction between the two classes can be clearly seen, there are still samples of intermediate patterns that may correspond to varying degrees of agonal stress that do not readily belong to the two opposing prototypes. because ph/agonal stress acts as an exceedingly strong confounder in gene expression studies, a dichotomous classification may not be sufficient to ensure that cases and controls are well-stratified, or balanced within each stratus. in addition, different brain regions may carry different stress outcomes; whereas this aspect of data heterogeneity is not well informed by ph values measured in one brain region, nor by the clinical indicators. one possible approach for dealing with residual heterogeneity is to subdivide the main classes further, such as into types 1a, 1b, 2a, 2b, etc, effectively classifying samples in multiple tiers to establish nested subsets, within each of which the cases and controls are more homogeneous and better balanced. figure 2b shows an example of three-type classification; however, even finer subdivisions are clearly possible. in practice, it is difficult to decide the number of clusters or layers of clusters needed, and the samples often show genuinely graduated differences of expression patterns. a natural alternative to a finer-grained classification approach, therefore, is to rate samples on one or several continuous scales. toward this goal, we first carried out a principal component analysis. we re-ordered the ancg sample by their first principal component scores, and the resulting heatmap shows a gradual transition from one end of the spectrum to the other. similarly smooth progressions are also observed for the other five regions. importantly, the pc scores are highly correlated with ph, the clinical agonal factors, as well as with the previously determined type 1-type designations; whereas pc and pc scores have almost no correlation. for example, in ancg, r is and for ph-pc and ph-pc respectively. note that with n = r needs only to be approximately to be significantly non-zero at p = ). this result not only confers a biological meaning to pc but also suggests that a single continuous variable is likely to be sufficient to capture most of the gradual progression of expression patterns from the low-ph prototype to the normal-ph prototype. not all genes contributed equally to the placement of individual samples along the gradient of membership. we selected the 20% strongest type 1-like samples and the 20% strongest type 2-like samples, and calculated the student's t scores that contrasted the group means between these two canonical groups. this allowed us to rank genes by their type 1- type absolute t scores, with the "top genes" being those that are most strongly affected by ph/agonal stress. when we re-plot figure 2c by using the 25% strongest ph-sensitive genes, a strong gradient is clearly seen. the gradient between samples becomes much dampened when the second 25% of ranked genes is used, and fades away almost entirely with the use of the third and last 25% of ranked genes. this result indicates that the top 50% of genes are likely to be informative for membership inference, with the top 25% and top 5% of genes carrying increasingly greater discriminating power, as one would expect. in additional file we showed a heatmap of expression levels of the top 25% of transcripts across ancg samples. these genes have been used to calculate the sample-sample correlations shown in figure upper left panel. the genes are ordered from left to right by their coefficients in the first principal component, whereas the samples are ordered from top to bottom by their first principal component scores. the actual expression levels are provided in additional file which is a.cdt file that can be opened in java treeview for flexible browsing. to estimate the number of genes significantly affected by the ph effect, we used the nearest shrunken centroids classifier to calculate the cross-validation errors in a two-class classification analysis, and examined gene panels containing varying numbers of most discriminating genes. panels having as few as and as many as genes resulted in eight or fewer cross-validation errors out of samples, and formed a plateau of error curve, indicating a broad range of the number of informative genes. similarly, in genetic association studies, some dna polymorphisms are more informative for distinguishing different populations. in our procedure to construct an agonal stress rating for individual samples, we used 25% or 5% of "top genes", and always found that with the 5% top genes the intermediate ratings are more "stretched out" than with 25% of top gene, as one would expect, because the strongest ph-sensitive genes are more powerful in distinguishing subtle differences in intermediate grades of membership. we ran the principal component analysis for six regions separately and defined the strongest type 1/2-like samples for each region. when we subsequently compared the strongest type- against the strongest type- samples and ranked genes by their t scores, the top 5% or 25% genes are similar across the six regions as their t scores are highly correlated across regions. on average, a top 10% gene in one region has a 57% chance to be among the top 10% in another region. we ranked genes by their average t score ranks in five regions, and listed the most strongly up-regulated and most strongly down-regulated genes in additional file genes in these lists can be used as most informative genes in future, independent studies. agonal stress ratings because the pc scores successfully arrange the samples into a smooth gradient, these scores by themselves could serve as a measure of agonal stress in individual samples. however, we found that pc may be strongly influenced by the scale of variance in individual chips and sometimes by a small number of "outlier" samples, whereas our method of using pc as a crude criteria to pre-select the strongest ~20% type 1- and type 2-like samples is more robust to these outliers. in addition, the interpretation of the principal component scores requires the notion of decomposition of the observed gene expression patterns into the linear combination of multiple components. this interpretation is most natural in cases where each sample represents the actual mixing of multiple cell types, each having its own canonical expression patterns. the meaning of pc scores is also complicated by the process of analyzing log-transformed signal values, while actual transcript levels are "mixed" on the linear scale. alternative indices, such as the probability of classification, or the prediction strength such as the "margin-of-victory" measures adopted in golub et al., are most appropriate when there are multiple genuinely discrete outcomes, for which what is uncertain is the strength of evidence for class assignment. in our case, gene expression in the brain is most likely affected by agonal stress in a graded fashion. although many of the samples belong to the two extreme states–one is minimally affected by stress, the other for samples that have converged to the quasi-steady state of "thoroughly affected"–some tissues in our collection are apparently sampled at an intermediate physiological state, and can best be characterized by the sample's relative distance to the two ends of the spectrum, that is, the distance to the prototypical normal-ph pattern minus the distance to the prototypical low-ph pattern, where "distance" can be the pearson's correlation, euclidean distance, spearman's rank correlation, or a number of other metrics. the agonal stress rating is thus defined as the difference between each sample's distances to the two prototypical patterns, and can be calculated by using different sets of most informative genes, which in turn can be defined by comparing the most extreme samples. although asr is formally neither a probability of classification nor a mixing ratio, it is actually quite similar to these other measures as most of them are variants of the linear discriminant function. a comparison of the median asr values with tissue ph reveals two features. first, there is a general correlation, i.e., low ph samples tend to have low asrs. secondly, there is considerable local discrepancy, i.e., among the normal ph samples, the asr-ph correlation is weak. these discrepancies imply that the asr values, which are derived directly from the gene expression data, are sometimes at odds with the measured brain ph. in the face of such discrepancies, we need to determine which index is a more accurate surrogate for the actual degrees of stress experienced by the individual subjects in specific brain regions, and therefore provides a safer control of the agonal stress confounder. we examined a test case: from a set of ancg samples previously "included" in an intermediate-stage analysis, we selected all of the thirteen control samples with asr >, and divided all of the fourteen major depression samples into two groups: one that was matched with the controls in ph but not in asr, another matched to the controls in asr but not in ph. we carried out mdd-control comparisons for the two mdd groups separately, and analyzed the top and bottom genes in ease for significantly enriched gene ontology terms. figure 5b shows that the ph-matched comparison yields the gene families and pathways associated with agonal stress that we and others previously discovered, whereas the asr-matched group significantly reduces the effect. this result is not surprising, as by the definition of asrs, we effectively have balanced the key stress-related pathways when we match samples by asr. this test case, however, shows that matching by ph is not always safe for guarding against the agonal stress confounder, whereas the empirically derived asr values provide a more accurate assessment of the regulatory responses to near-death stress in individual samples, and allow a more stringent control. in a section below we will describe the robustness asrs, particularly the finding that deriving asrs by using only the control samples did not substantially change the result. between-region differences after calculating asr for all six regions and for two sites in each region, we obtained twelve series of asr values. as amy and cb had larger numbers of missing chips, we plotted the eight asr series for the four remaining brain regions in color codes along with ph values and afs, with the samples sorted by ph, and missing data in white. this figure has several broadly recognizable features. first, asr results from the two sites tend to agree, although not always so. secondly, asrs in most samples tend to be correlated across the four regions, reflecting brain-wide patterns. thirdly, the asr scores show a coarse correlation with ph and the clinical afs scores, as samples at the bottom of the figure are generally those with both low ph and low asr. the correlations between ph and asr, across all samples, range from to among the twelve asr series. but these correlations are much smaller when using only the ph> samples, indicating that much of the correlation was driven by the large differences between the high-ph and the low-ph samples. finally, some of the subjects who had normal ph yet low asr can be explained by having clinically recorded agonal stress. however, beyond these large trends, there remain striking between-region differences in many individual subjects. for example, the first subject from the top, indicated by the first arrow on the right, has low asrs in ancg, and normal to high asrs in the other regions. the third and sixth subjects, indicated by the next two arrows, have unusually low asrs in dlpfc and hc, respectively. these strong region-region differences in asrs are robustly observed and suggest genuine differences in stress outcome across different parts of the brain. such differences may arise due to inter-individual variabilities in local structure or function, resulting in region-specific vulnerability to agonal stress. an additional possibility is that the nature of the illness that caused the death, such as hepatic, renal, or cardiac failures, may have triggered a region-specific brain response. these results underscore the value of using asrs to carry out per-region sample matching, as ph and clinical indicators are measures for the entire brain. robustness of asrs it is difficult to know how much between-region differences arise from variabilities in tissue dissection, but this factor is unlikely to explain most of the differences we observed here, as the effect is seen even for relatively large, easy-to-dissect regions such as dlpfc and cb. although the nature of the observed regional differences is still not clear, most of such differences are likely due to actual biological differences rather than to technical variability in performing rna labeling and hybridization or to data analysis methods. there are several reasons for making this conclusion. first, while regional differences of asrs are often large, asrs varied to a much lesser degree between sites, between different numbers of informative genes used, between different distance measures, with another round of normalization after median centering, following the selection of only the high asr samples as the basis for re-calculating block medians, or importantly, following the use of only normal controls rather than both cases and controls for ranking genes by t scores. secondly, we examined the possibility that some regions may actually have a greater type 1-type difference than the other regions, and different samples may have different regional differences. to this end, we calculated additional versions of asr by using the same ten type samples and the same type samples to determine the informativeness of genes in all six regions; combined all six regions in designating the canonical samples on the two extremes, defining most informative genes, and calculating asr across all samples. these alternative versions did not significantly alter the asr patterns across samples and regions, and did not explain most of the observed regional differences. thirdly, with our 700-gene illumina data, we were able to compare the asrs based on data from two different platforms. for each sample, we averaged the affymetrix asr values from two sites to obtain the six values for six regions, and calculated their correlation to the corresponding six asr values from the illumina data. we obtained such correlations in samples for which we had both the affymetrix and illumina data. of these correlations were above, were above, and were above, with most of the smaller correlations explained by very low between-region variations, that is, when the six scores are similar to begin with for a given sample, it is more difficult to observe a highly correlated pattern for this sample in a different platform. discussion many gene expression analyses have shown that agonal stress at the time of death can significantly alter expression patterns in postmortem tissues. because of this, comparative studies that rely on postmortem material must take every precaution to ensure that cases and controls are properly balanced with regard to this well-established confounder. what remains unclear, however, is to what extent residual imbalance still accounts for the most significant findings. the study presented here is motivated by two considerations. first, a dichotomous classification of good-quality versus bad-quality samples is often inadequate in assuring that cases and controls are well matched among the "good samples". secondly, clinical variables such as afs and continuous variables such as tissue ph have several practical limitations, both in terms of accuracy and in their inability to assess each brain region separately. to address these concerns, we developed a rating metric to infer agonal stress based on expression data, and strongly advocated a conservative approach that uses these empirical ratings to select a homogeneous group or to balance cases and controls. the adoption of continuous ratings instead of the more commonly used categorical assignment is expected to bring several advantages: providing a more reliable measurement of underlying heterogeneity that does not show natural boundaries, retaining important information regarding sub-threshold variability, and allowing flexible integration with other variables. between-region differences our results revealed striking between-region differences in stress outcome. this complexity presents additional challenges to gene expression analyses of the brain, especially if the goal is to not only study each region separately, but also to study biological regulation across brain regions, as well as their disruption in the diseased state. during our initial analysis, we had hoped that all regions of the same brain would have a similar stress profile, making it possible to use one or more regions as the same-subject control for the other regions. in this scheme, between-region differences in gene expression, instead of gene expression levels in each region separately, are compared between cases and controls, under the assumption that agonal stress is acting more extensively across the entire brain, whereas expression signatures of psychiatric disorders are restricted in some regions. this approach is reminiscent of the genetic method of using family controls to remove the impact of population structure. our analysis, however, revealed considerable heterogeneity between brain regions in stress-related expression patterns, suggesting that this between-region analysis method is still problematic and requires further investigation. the need for a conservative approach one of the concerns in adopting this approach is that gene expression changes in response to near-death conditions may overlap with those affected by chronic psychiatric states. if the agonal stress ratings reflect the blending of both effects, how do we know whether we have under- or over-corrected the main effect of interest? unfortunately, at the present time we do not know many genes or pathways that are clearly and reproducibly altered by major depression and bipolar disorder; as a result we currently do not have a definitive set of "true positives" to fine-tune the stringency of the sample matching strategy. to address this type of question would require a sufficiently large collection of samples to directly investigate whether patients of mental disorders are more likely than the healthy controls to have more severe terminal stress, lower tissue ph values, and more pronounced changes in gene expression patterns. when the sample size is below or near as is currently the norm in expression profiling of human brains, a study is not properly powered to formally answer this question, and the gene expression signature due to mental disorders, if it overlaps with that due to agonal stress, will be easily obscured. however, despite this uncertainty, it is widely recognized that the effects due to agonal stress usually have a much more potent influence on gene expression patterns than do mental disorders. in such a situation, the chance of finding false positives due to residual imbalance is quite high. a continuous, quantitative rating system, like the asr that we developed here, can greatly reduce the number of false positives in such studies by allowing a quantitative assessment of the broadly recognizable outcome of the most prominent confounder. by applying the asr, it remains possible to detect a true signal for psychiatric disorders as long as it is strong enough or sufficiently independent of the confounding effect, particularly if the disease related changes involve a small number of transcripts whereas the agonal conditions usually affect a large number of genes. in essence, the practice of sample matching by data-derived indices constitutes a higher standard for a "true positive", requiring that its main effect to rise above its potential colinearity with the major extraneous covariates. the situation is analogous to the case of a genetic association study of, for example, cardiovascular disorders, where the goal is typically to detect genetic association with the disease while adjusting for the traditional risk factors, such as blood pressure, diabetes, body-mass index, and serum levels of hdl and triglyceride. because these traditional risk factors are also influenced by genetic variation, making such corrections constitutes a more focused goal: to discover genetic contribution to the disease independent of the genetic basis of the other risk factors, even though in the long run it is ideal to be able to study all the contributing factors in conjunction with each other. by the same token, the near-term goal of our study is to discover gene expression signatures of psychiatric disorders independent of gene expression changes due to confounding factors, especially when these factors are not likely to be closely related to the biology of mental illness. conventional versus empirical indicators in this study, we found that the agonal stress ratings are sometimes at odds with tissue ph values or clinically-recorded medical factors. these indices, though useful in most situations, have several shortcomings when serving as surrogates for the underlying biological heterogeneity. first, different brain regions may carry different stress outcomes, while ph values were usually measured in one region. likewise, the clinical indicators do not inform regional heterogeneity. secondly, these conventional variables inevitably contain measurement errors or incomplete information. thirdly, brain ph is both the outcome of prior episodes of stress and the trigger for subsequent physiological responses. as a result, even if ph is measured in all regions, and even if ph is similar across regions, the samples that have similar ph are still not likely to have a uniform stress-induced gene expression profile. for these reasons, we recommend using asr as a primary criterion in sample selection and sample matching, analogous to using inferred ancestry in genetic association studies. it is also important to point out that the tissue ph measurements and clinical records are still of immense value in sample matching. they provide biological meaning to the asr values, and allow an integrated strategy that combines these different indicators in sample selection. we believe that future studies need to continue collecting clinical information as extensively as possible, and if feasible, measure ph in multiple brain regions to directly assess regional differences of degree of stress. assumption of neutrality an implicit assumption of using inferred ancestry to control population stratification in genetic studies is that most of the genetic markers tested are phenotypically neutral; that is, not associated with the disease under study. under this assumption, when data have been collected for a large number of loci, the majority of these loci can be used to infer population structure. alternatively, they can be used as genomic control loci to detect over-dispersion of the standard test statistics due to stratification. this assumption of neutrality generally holds when we expect to detect large or moderate signals of association for only a small number of causative genes. in gene expression analysis, however, it is possible that a considerable proportion of the transcripts are affected both by the extraneous confounders such as agonal stress and by the disease being studied. as a result, some of the genes used to infer agonal stress may also be associated with the disease, making it difficult to separate the two effects. however, this apparent difference between genetic and gene expression studies depends on the actual context of the study. population stratification can be a very strong confounder for traits or diseases that have subtle genetic effects but large population differentiation, or are studied in recently admixed population where chromosomal segments of defined ancestry can be as long as cm. in these situations, a substantial fraction of genetic markers may show weak association, while most of such signals may disappear after correcting for inferred individual ancestry or locus-specific ancestry. for both gene expression and genetic studies, using the data per se to detect sample heterogeneity is a practically useful yet ultimately exploratory method, especially when true positives are not known beforehand. model considerations and the need for canonical patterns in inferring individual ancestry from genetic data, it is helpful to know the genetic profile of the putative ancestral populations, for example, the allele frequencies determined from samples that represent the progenitors of the admixed individuals. without these "pure" canonical profiles, while it is still theoretically possible to simultaneously determine both the canonical ancestral patterns and the mixing ratios of each sampled individual, the results are less reliable and often improperly scaled. similarly, our strategy to derive agonal stress ratings relies on having obtained data for both "normal" tissues and severely stressed tissues. these opposing extremes serve as the two reference points to measure the grades of membership in between. hypothetically, in a different study, if none of the samples are from the severely stressed low-ph samples, the canonical signature of the confounder would be much less precisely defined. however, even when the absolute values of asr only scale from "normal" to mildly stressed, the relative ratings among samples can still be used as the empirical basis for sample matching, or as the basis for a variety of post hoc strategies, such as stratified analysis, or incorporating covariates in regression analysis. we have found that the main differences due to agonal stress can be robustly observed, i.e., are highly similar between study sites and across two microarray platforms. this means that the canonical patterns that we describe here, featuring prominently energy metabolism genes and stress response pathways, can be transferred to other studies of postmortem tissues even if these studies characterized a narrower range of the confounding effect. in additional files and we provide the genes most strongly affected in our dataset; these genes can be used as informative stress markers for pre-evaluating future sample collections, even before microarray experiments. the parallel example in genetic studies is that one can profile the genetic signature for a few major continent groups and use this information repeatedly to infer admixture in individuals from a heterogeneous population such as the african americans, sometime by using a small number of most informative genetic markers. we also wish to emphasize that using only the controls to define the two canonical expression patterns did not change the asr ratings in any meaningful way, reflecting the fact that the case-control differences are far subtler than the stress-related differences. the situation would be much simpler if the mixing ratios are known by other, independent methods, or if the canonical patterns were profiled in independent studies. such an "expression signature bank" can be established by studying the response to controlled stress treatment in animal models, or by analyzing "pure" classes of brain cells, such as laser-captured defined cell populations. stuart et al. gave an example where the mixing ratio is known for tumor samples when tissue pathologists reported a priori the fractional composition of different cell types in each sample. conversely, lu et al. used expression data for synchronized yeast cells in defined phases to infer mixing ratios of asynchronized samples–this is a case where the basic patterns were known, with mixing ratios being the target of inference. when neither is known, as in our case, the solution cannot be arrived at analytically but can be optimized iteratively. for example, several methodology studies have implemented variants of the expectation-maximizing algorithm to simultaneous search for the unknown canonical patterns and the unknown mixing ratios in gene expression data. similar methods, including ones involving markov chain monte carlo methods, have been developed for inferring individual's genetic ancestry. in our dataset, as the principal pattern is relatively strong, we expect the result to converge quickly and decide to adopt a simple definition of asr. in more complicated situations, for example, when the second or higher principal components can be interpreted as signatures of other confounders such as age, medication, or cell types, it would be important to apply these more sophisticated algorithms.  in this study we developed an agonal stress rating system that evaluates each sample's degree of stress based on gene expression data, and used asrs in post hoc sample matching. we found that asr-based matching provides tighter control of the agonal effect than by using ph. we also found that different brain regions exhibited different stress outcomes and that such regional patterns also varied between individuals. our results once again highlight one of the main challenges in gene expression studies of psychiatric disorders: transcript levels are under the influence of a large number of confounding factors. agonal stress undoubtedly plays a major role; as a result the stress-related, ph-sensitive genes or pathways are prone to appear as the top findings in case-control comparisons. we propose to adopt a conservative approach for the genes and pathways that are clearly altered by the confounding factors, even if it is possible that they are also influenced by the disease of interest. deriving an asr from gene expression data and using it for sample matching is one example of such an approach. this approach involves using continuous ratings as opposed to categorical assignments, thus represents an early attempt to apply graded classification methods to a sample heterogeneity problem for brain tissues, similar to the application of dimensional models in psychiatric diagnosis. in practice, we believe that this method can and should be expanded to the characterization of other sources of biological variation, such as medication, age, and cell-type composition of the dissected brain tissues. drug use by psychiatric patients is likely to affect gene expression, regardless whether the medication was effective in treating the disease or not. but medication history is one of the most elusive aspects of clinical information to accurately record and quantify. likewise, an individual's chronological age may vary greatly from the actual physiological age of the tissue under study, while the neuronal-glial ratios of the dissected tissues may also vary from brain region to brain region, from subject to subject. proper monitoring of these additional sources of phenotypic variation is an important prerequisite for the eventual identification of the true gene expression signature of mental disorders, and in this regard, animal models of either drug treatment or stress, independently applied, in the absence of psychiatric history and genetic heterogeneity, represents a powerful alternative strategy for defining canonical expression patterns and assessing their relative contributions. 
this agonal effect, if not well controlled, can lead to spurious findings and diminished statistical power in case-control comparisons. while gene expression patterns are generally correlated across different brain regions, we found strong region-region differences in empirical asrs in many subjects that likely reflect inter-individual variabilities in local structure or function, resulting in region-specific vulnerability to agonal stress. we developed an agonal stress rating system that evaluates each sample's degree of stress based on gene expression data, and used asrs in post hoc sample matching or covariate analysis. while some recent studies match samples by tissue ph and clinically recorded agonal conditions, we found that these indicators were sometimes at odds with observed stress-related gene expression patterns, and that matching by these criteria still sometimes results in identifying case-control differences that are primarily driven by residual agonal effects. the agonal stress ratings quantitatively assess each sample's extent of regulatory response to agonal stress, and allow a strong control of this important confounder. variation of agonal stress across different brain regions differs between individuals, revealing a new level of complexity for gene expression studies of brain tissues. gene expression patterns in the brain are strongly influenced by the severity and duration of physiological stress at the time of death. this problem is analogous to the one encountered in genetic association studies, where self-reported race and ethnicity are often imprecise proxies for an individual's actual genetic ancestry.
 gene expression patterns in the brain are strongly influenced by the severity and duration of physiological stress at the time of death. this agonal effect, if not well controlled, can lead to spurious findings and diminished statistical power in case-control comparisons. while some recent studies match samples by tissue ph and clinically recorded agonal conditions, we found that these indicators were sometimes at odds with observed stress-related gene expression patterns, and that matching by these criteria still sometimes results in identifying case-control differences that are primarily driven by residual agonal effects. this problem is analogous to the one encountered in genetic association studies, where self-reported race and ethnicity are often imprecise proxies for an individual's actual genetic ancestry.  we developed an agonal stress rating system that evaluates each sample's degree of stress based on gene expression data, and used asrs in post hoc sample matching or covariate analysis. while gene expression patterns are generally correlated across different brain regions, we found strong region-region differences in empirical asrs in many subjects that likely reflect inter-individual variabilities in local structure or function, resulting in region-specific vulnerability to agonal stress.  variation of agonal stress across different brain regions differs between individuals, revealing a new level of complexity for gene expression studies of brain tissues. the agonal stress ratings quantitatively assess each sample's extent of regulatory response to agonal stress, and allow a strong control of this important confounder. 