Background One important application of microarray experiments is to identify differentially expressed genes. Often, small and negative expression levels were clipped-off to be equal to an arbitrarily chosen cutoff value before a statistical test is carried out. Then, there are two types of data: truncated values and original observations. The truncated values are not just another point on the continuum of possible values and, therefore, it is appropriate to combine two statistical tests in a two-part model rather than using standard statistical methods. A similar situation occurs when DNA methylation data are investigated. In that case, there are null values (undetectable methylation) and observed positive values. For these data, we propose a two-part permutation test.
Background
One important application of microarray experiments is to identify differentially expressed genes. Often, small and negative expression levels were clipped-off to be equal to an arbitrarily chosen cutoff value before a statistical test is carried out. Then, there are two types of data: truncated values and original observations. The truncated values are not just another point on the continuum of possible values and, therefore, it is appropriate to combine two statistical tests in a two-part model rather than using standard statistical methods. A similar situation occurs when DNA methylation data are investigated. In that case, there are null values (undetectable methylation) and observed positive values. For these data, we propose a two-part permutation test.Results The proposed permutation test leads to smaller  p -values in comparison to the original two-part test. We found this for both DNA methylation data and microarray data. With a simulation study we confirmed this result and could show that the two-part permutation test is, on average, more powerful. The new test also reduces, without any loss of power, to a standard test when there are no null or truncated values.
Results
The proposed permutation test leads to smaller  p -values in comparison to the original two-part test. We found this for both DNA methylation data and microarray data. With a simulation study we confirmed this result and could show that the two-part permutation test is, on average, more powerful. The new test also reduces, without any loss of power, to a standard test when there are no null or truncated values.pConclusion The two-part permutation test can be used in routine analyses since it reduces to a standard test when there are positive values only. Further advantages of the new test are that it opens the possibility to use other test statistics to construct the two-part test and that it avoids the use of any asymptotic distribution. The latter advantage is particularly important for the analysis of microarrays since sample sizes are usually small.
Conclusion
The two-part permutation test can be used in routine analyses since it reduces to a standard test when there are positive values only. Further advantages of the new test are that it opens the possibility to use other test statistics to construct the two-part test and that it avoids the use of any asymptotic distribution. The latter advantage is particularly important for the analysis of microarrays since sample sizes are usually small.

Background The addition of a methyl group at the carbon-5 position of cytosine is a modification of DNA called DNA methylation. In mammalian cells, DNA methylation is essential for proper development [ 1 ]. The methylation patterns of tumor cells are altered compared to those of normal cells, moreover, there are also differences between different types of cancer as shown for subtypes of leukemia [ 2 ] and lung cancer [ 3 ]. Thus, DNA methylation analysis promises to become a powerful tool in cancer diagnosis [ 4 ]. DNA methylation data can be obtained using the MethyLight technology [ 5 ]. When the tested region is not or only partially methylated the result is negative (undetectable methylation, null values). In contrast, samples that show methylation will have a value greater than 0 [ 4 ]. Thus, DNA methylation data obtained with MethyLight have a clump of zero observations and a continuous nonzero part. For such a data structure, two-part models as proposed by Lachenbruch [ 6 - 8 ] are applicable. In that approach, the test statistic is the sum of two squared statistics, one comparing the proportions of zeros and one comparing the positive values. For example, one can use the binomial test and the Wilcoxon rank sum test. The asymptotic null distribution of the sum of the squares of the two test statistics is χ 2  with two degrees of freedom (df = 2). In microarray data it is relatively common that small and negative expression levels were clipped-off to be equal to an arbitrarily chosen cutoff value. Recent examples used different cutoff values: 1, 20, and 50, respectively [ 9 - 11 ]. Aside from the fact that negative values make no biological sense, there are, with regard to oligonucleotide arrays from Affymetrix, two primary reasons for truncating the values [ 12 ]. First, spots at the low intensity range are generally more vulnerable to noise, thus, it is thought that the technology produces a poor discrimination at low levels of expression [ 13 ]. Second, the focus is on expression of identified genes and expressed sequence tags. Differences at negative or low values may result from differences in binding to the mismatch probes. Since it is generally not known what binds to the mismatch probes, the differences at negative or low values cannot be attributed to target genes. Due to the truncation there are two different types of data: truncated values and original observations. Since the truncated values are not just another point on the continuum of possible values, it would be inappropriate to use a standard statistical method that would treat all values equally [ 14 ]. The two different types of data should be analyzed separately. Therefore, the two-part model, comparing the proportions of truncated values and the distribution of positive values, is applicable. Note that negative expression levels are not possible when the Affymetrix Microarray Suite (MAS) 5.0 software is used. However, small values are possible and may be truncated. Since, in microarray experiments, the sample sizes, i.e. the numbers of replications, are usually very small [ 15 , 16 ], the use of the asymptotic distribution of Lachenbruch's two-part test statistic may be questionable. Thus, we carried out permutation tests with the two-part statistic. For a permutation test all possible permutations under the null hypothesis are generated. In our situation we permute the group labels for the whole sample, i.e. for truncated values (or the null values in case of methylation data) and original observations. Then, the test statistic is calculated for each permutation. The null hypothesis can then be accepted or rejected using the permutation distribution of the test statistic, the  p -value being the probability of the permutations giving a value of the test statistic as supportive or more supportive of the alternative than the observed value [ 17 , 18 ]. Thus, inference is based upon how extreme the observed test statistic is relative to other values that could have been obtained under the null hypothesis. We found that, in the case of a two-part model, the permutation test is not only a way to avoid the use of an asymptotic distribution, but also is a more powerful test, i.e. a test that produces, on average, smaller  p -values. In addition, the permutation test reduces, without any loss of power, to a single test if no truncated (or null) values were present. Thus, the proposed test is applicable in routine use whether or not truncated (or null) values occur. After the definition of the tests in the following section, we present our findings for DNA methylation data and microarray data. We then confirm the results using simulations. Two-part tests As briefly mentioned above a two-part test statistic is the sum of two squared statistics, one comparing the proportions of truncated values and one comparing the positive values. Let  n 1  and  n 2  be the numbers of independent observations regarding one gene (or one region in case of methylation data, respectively), for two groups to be compared. The observed numbers of truncated values (or null values in case of methylation data) in the two groups are denoted by  m 1  and  m 2 . To compare these numbers  m 1  and  m 2  Lachenbruch [ 6 ] used the statistic where  ,  , and  . Under the null hypothesis the proportions of truncated values are not different between the two groups, and  B 2  is asymptotically χ 2 -distributed with df = 1.  B 2  is always well defined, unless there are only truncated values in both groups or no truncated values at all. For these two extreme cases we set  B 2  = 0. For the second part in Lachenbruch's two-part model one can use different tests, Lachenbruch [ 6 - 8 ] considered the Wilcoxon rank sum test, Student's  t  test, and the Kolmogorov-Smirnov test. The use of the latter test in a two-part model, however, was too liberal, the type I error rate was close to 0.065 (for a significance level of α = 0.05 [ 7 , 8 ]). Both other tests work well. Here, we apply the Wilcoxon test for two reasons. This test was used in the original analyses of the data we use below [ 3 , 11 ]. Nonparametric tests based on ranks are more appropriate for non-normally distributed data such as microarray data [ 19 ]. The standardized rank sum statistic based on the non-truncated (or positive values in case of methylation data) values is defined as where  RS  is the rank sum, i.e. the sum of the ranks in group 1. When there are ties within the non-truncated values the denominator slightly changes [[ 20 ], p. 109]. For the extreme case that there are only truncated values in at least one group we set  W  = 0. The test statistic for the two-part test is  X 2  =  B 2  +  W 2 . Under the null hypothesis of no difference between the groups,  X 2  is asymptotically χ 2 -distributed with df = 2 [ 6 , 7 ]. Alternatively, a permutation test can be performed with the statistic  X 2 . This test, called two-part permutation test here, is a permutation test based on the sum statistic  X 2 . It is carried out by permuting the group labels for the whole sample. Thus, all observations, truncated and non-truncated values (or null and positive values in case of methylation data) are reallocated to the groups. When performing this two-part permutation test the exact permutation distribution of  X 2  is determined. This distribution, computed by generating all possible permutations or, for the  p -values given below in Table  1 , using a simple random sample of 20,000 permutations, is used to compute the  p -value. Since it is a permutation test based on the sum  X 2 , it is neither necessary to determine the permutation distributions of the summands  B 2  and  W 2  nor to calculate the  p -values of the univariate tests related to  B 2  and  W 2 . Application to actual methylation data We use DNA methylation data from 7 regions and 87 lung cancer cell lines, 41 lines are from small cell lung cancer and 46 lines from non-small cell lung cancer [ 3 , 4 ]. The proportion of positive values for the different regions ranges from 39 to 100% for the small cell lung cancer and from 65 to 98% for the non-small cell lung cancer. The data are available at  . Siegmund et al. [ 4 ] transformed the data by standardizing the positive values on the natural-log scale. However, for the tests applied here, this transformation has no influence. Table  1  presents the  p -values of the two tests. For most regions the two-part permutation test gives a smaller  p -value than the original two-part test. The only exception is the region  APC . However, the original two-part test's  p -value for this region is 0.1684 and, for a  p -value of this size, a small change in the value is usually of no importance. Application to actual microarray data Tschentscher et al. [ 11 ] performed an experiment with HG-U95Av2 oligonucleotide arrays in order to compare patients with uveal melanomas with and without monosomy 3. Expression values were calculated by use of the MAS 4.0 software. The data are available at  . The sample size in this microarray experiment is 10 per group. As mentioned above, expression levels below 50 were set to 50. This data truncation occurred in 2,215 (28%) out of 7,902 genes. First, we consider these 2,215 genes. Figure  1  displays the number of genes for the different number of truncated values per gene. Table  2  shows the frequencies of different size groups of the  p -values. Often, the two-part permutation test gives a smaller  p -value than the original two-part test. For instance, for 19 genes the  p -value is ≤ 0.001 when the latter test is applied. The permutation test gives a  p -value ≤ 0.001 for these 19 and for 39 additional genes. As usual, the majority of genes do not show any indication of being differentially expressed. For these genes a slight change in the  p -value is of no importance. Thus, in Table  3 , we consider the genes for which the  p -value of the original two-part test is ≤ 0.1. Out of the 2,215 genes 514 remain. As shown in Table  3  the  p -values of the two-part permutation test are, on average, distinctly smaller than those of the original two-part test. For a large proportion of genes (72% in this data set) there are no truncated values. In that case, the two-part statistic reduces to the sum 0 plus the squared standardized rank sum  W 2 . Of course, one has to define a priori whether the two-part test or the Wilcoxon test will be used to analyze the data. If the original two-sided (asymptotic) Wilcoxon test were chosen and applied, one could compare  W 2  with critical values from a χ 2  distribution with one degree of freedom (df). If the two-part were chosen there is df = 2 and, in case of no truncated values, power is lost compared to the original Wilcoxon test. For instance, the 95% percentile of the χ 2  distribution with df = 1 is 3.84, but it is 5.99 for df = 2. The permutation test using the sum statistic  X 2  does not suffer from this power loss: When there are no truncated values there is, of course, no difference in the proportions of truncated values, and the test statistic  X 2  is, for every permutation, the sum 0 +  W 2 . Thus, the two-part permutation test reduces to the exact two-sided Wilcoxon rank sum test when there are no truncated values. Consequently, this permutation test does not only give smaller  p -values, but it is also applicable in routine use whether or not truncated values are present. Simulation study The two different tests, the original two-part test and the two-part permutation test, were compared in a Monte Carlo simulation study performed using SAS version 8.2, 5,000 simulation runs were generated for each configuration. The sample size of 10 per group was chosen as in the microarray experiment presented above. In some configurations some randomly chosen values were set to 0 according to binomial distributions with the probabilities  p 1  and  p 2 , and the remaining observations were generated according to a lognormal distribution (with median 1 and σ = 1). Then, the values of one group were shifted if applicable. In some other configurations all observations were generated according to the lognormal distribution and, in one group, shifted. Then, values smaller than a cutoff value were truncated. The type I error rates of the two tests are very similar. With e.g.  p 1  =  p 2  = 0.3 and a significance level of α = 0.05 the simulated type I error rates were 0.049 for both the original two-part test and the two-part permutation test. Table  4  displays results for situations with a difference between the two groups. As above, only those comparisons were regarded for which there is some indication of a difference, i.e. a  p -value ≤ 0.1 of the original two-part test. In all considered configurations the median of the difference between the  p -values of the original two-part test and the two-part permutation test is positive. The finding that the  p -values of the permutation test are smaller corresponds to a higher power of this test. The power is given in Table  5 , as shown the power of the two-part permutation test is at least as high as that of the original two-part test. There is only one exception, the latter test is slightly more powerful in one situation, i.e. when the proportion of zeros is higher in group 1 and the positive values are larger in group 1.
Background
The addition of a methyl group at the carbon-5 position of cytosine is a modification of DNA called DNA methylation. In mammalian cells, DNA methylation is essential for proper development [ 1 ]. The methylation patterns of tumor cells are altered compared to those of normal cells, moreover, there are also differences between different types of cancer as shown for subtypes of leukemia [ 2 ] and lung cancer [ 3 ]. Thus, DNA methylation analysis promises to become a powerful tool in cancer diagnosis [ 4 ].DNA methylation data can be obtained using the MethyLight technology [ 5 ]. When the tested region is not or only partially methylated the result is negative (undetectable methylation, null values). In contrast, samples that show methylation will have a value greater than 0 [ 4 ]. Thus, DNA methylation data obtained with MethyLight have a clump of zero observations and a continuous nonzero part. For such a data structure, two-part models as proposed by Lachenbruch [ 6 - 8 ] are applicable. In that approach, the test statistic is the sum of two squared statistics, one comparing the proportions of zeros and one comparing the positive values. For example, one can use the binomial test and the Wilcoxon rank sum test. The asymptotic null distribution of the sum of the squares of the two test statistics is χ 2  with two degrees of freedom (df = 2).In microarray data it is relatively common that small and negative expression levels were clipped-off to be equal to an arbitrarily chosen cutoff value. Recent examples used different cutoff values: 1, 20, and 50, respectively [ 9 - 11 ]. Aside from the fact that negative values make no biological sense, there are, with regard to oligonucleotide arrays from Affymetrix, two primary reasons for truncating the values [ 12 ]. First, spots at the low intensity range are generally more vulnerable to noise, thus, it is thought that the technology produces a poor discrimination at low levels of expression [ 13 ]. Second, the focus is on expression of identified genes and expressed sequence tags. Differences at negative or low values may result from differences in binding to the mismatch probes. Since it is generally not known what binds to the mismatch probes, the differences at negative or low values cannot be attributed to target genes.Due to the truncation there are two different types of data: truncated values and original observations. Since the truncated values are not just another point on the continuum of possible values, it would be inappropriate to use a standard statistical method that would treat all values equally [ 14 ]. The two different types of data should be analyzed separately. Therefore, the two-part model, comparing the proportions of truncated values and the distribution of positive values, is applicable. Note that negative expression levels are not possible when the Affymetrix Microarray Suite (MAS) 5.0 software is used. However, small values are possible and may be truncated.Since, in microarray experiments, the sample sizes, i.e. the numbers of replications, are usually very small [ 15 , 16 ], the use of the asymptotic distribution of Lachenbruch's two-part test statistic may be questionable. Thus, we carried out permutation tests with the two-part statistic. For a permutation test all possible permutations under the null hypothesis are generated. In our situation we permute the group labels for the whole sample, i.e. for truncated values (or the null values in case of methylation data) and original observations. Then, the test statistic is calculated for each permutation. The null hypothesis can then be accepted or rejected using the permutation distribution of the test statistic, the  p -value being the probability of the permutations giving a value of the test statistic as supportive or more supportive of the alternative than the observed value [ 17 , 18 ]. Thus, inference is based upon how extreme the observed test statistic is relative to other values that could have been obtained under the null hypothesis.pWe found that, in the case of a two-part model, the permutation test is not only a way to avoid the use of an asymptotic distribution, but also is a more powerful test, i.e. a test that produces, on average, smaller  p -values. In addition, the permutation test reduces, without any loss of power, to a single test if no truncated (or null) values were present. Thus, the proposed test is applicable in routine use whether or not truncated (or null) values occur. After the definition of the tests in the following section, we present our findings for DNA methylation data and microarray data. We then confirm the results using simulations.pTwo-part tests As briefly mentioned above a two-part test statistic is the sum of two squared statistics, one comparing the proportions of truncated values and one comparing the positive values. Let  n 1  and  n 2  be the numbers of independent observations regarding one gene (or one region in case of methylation data, respectively), for two groups to be compared. The observed numbers of truncated values (or null values in case of methylation data) in the two groups are denoted by  m 1  and  m 2 . To compare these numbers  m 1  and  m 2  Lachenbruch [ 6 ] used the statistic where  ,  , and  . Under the null hypothesis the proportions of truncated values are not different between the two groups, and  B 2  is asymptotically χ 2 -distributed with df = 1.  B 2  is always well defined, unless there are only truncated values in both groups or no truncated values at all. For these two extreme cases we set  B 2  = 0. For the second part in Lachenbruch's two-part model one can use different tests, Lachenbruch [ 6 - 8 ] considered the Wilcoxon rank sum test, Student's  t  test, and the Kolmogorov-Smirnov test. The use of the latter test in a two-part model, however, was too liberal, the type I error rate was close to 0.065 (for a significance level of α = 0.05 [ 7 , 8 ]). Both other tests work well. Here, we apply the Wilcoxon test for two reasons. This test was used in the original analyses of the data we use below [ 3 , 11 ]. Nonparametric tests based on ranks are more appropriate for non-normally distributed data such as microarray data [ 19 ]. The standardized rank sum statistic based on the non-truncated (or positive values in case of methylation data) values is defined as where  RS  is the rank sum, i.e. the sum of the ranks in group 1. When there are ties within the non-truncated values the denominator slightly changes [[ 20 ], p. 109]. For the extreme case that there are only truncated values in at least one group we set  W  = 0. The test statistic for the two-part test is  X 2  =  B 2  +  W 2 . Under the null hypothesis of no difference between the groups,  X 2  is asymptotically χ 2 -distributed with df = 2 [ 6 , 7 ]. Alternatively, a permutation test can be performed with the statistic  X 2 . This test, called two-part permutation test here, is a permutation test based on the sum statistic  X 2 . It is carried out by permuting the group labels for the whole sample. Thus, all observations, truncated and non-truncated values (or null and positive values in case of methylation data) are reallocated to the groups. When performing this two-part permutation test the exact permutation distribution of  X 2  is determined. This distribution, computed by generating all possible permutations or, for the  p -values given below in Table  1 , using a simple random sample of 20,000 permutations, is used to compute the  p -value. Since it is a permutation test based on the sum  X 2 , it is neither necessary to determine the permutation distributions of the summands  B 2  and  W 2  nor to calculate the  p -values of the univariate tests related to  B 2  and  W 2 .
Two-part tests
As briefly mentioned above a two-part test statistic is the sum of two squared statistics, one comparing the proportions of truncated values and one comparing the positive values. Let  n 1  and  n 2  be the numbers of independent observations regarding one gene (or one region in case of methylation data, respectively), for two groups to be compared. The observed numbers of truncated values (or null values in case of methylation data) in the two groups are denoted by  m 1  and  m 2 . To compare these numbers  m 1  and  m 2  Lachenbruch [ 6 ] used the statisticnnmmmmwhere  ,  , and  . Under the null hypothesis the proportions of truncated values are not different between the two groups, and  B 2  is asymptotically χ 2 -distributed with df = 1.  B 2  is always well defined, unless there are only truncated values in both groups or no truncated values at all. For these two extreme cases we set  B 2  = 0.BBBFor the second part in Lachenbruch's two-part model one can use different tests, Lachenbruch [ 6 - 8 ] considered the Wilcoxon rank sum test, Student's  t  test, and the Kolmogorov-Smirnov test. The use of the latter test in a two-part model, however, was too liberal, the type I error rate was close to 0.065 (for a significance level of α = 0.05 [ 7 , 8 ]). Both other tests work well. Here, we apply the Wilcoxon test for two reasons. This test was used in the original analyses of the data we use below [ 3 , 11 ]. Nonparametric tests based on ranks are more appropriate for non-normally distributed data such as microarray data [ 19 ].tThe standardized rank sum statistic based on the non-truncated (or positive values in case of methylation data) values is defined aswhere  RS  is the rank sum, i.e. the sum of the ranks in group 1. When there are ties within the non-truncated values the denominator slightly changes [[ 20 ], p. 109]. For the extreme case that there are only truncated values in at least one group we set  W  = 0.RSWThe test statistic for the two-part test is  X 2  =  B 2  +  W 2 . Under the null hypothesis of no difference between the groups,  X 2  is asymptotically χ 2 -distributed with df = 2 [ 6 , 7 ]. Alternatively, a permutation test can be performed with the statistic  X 2 . This test, called two-part permutation test here, is a permutation test based on the sum statistic  X 2 . It is carried out by permuting the group labels for the whole sample. Thus, all observations, truncated and non-truncated values (or null and positive values in case of methylation data) are reallocated to the groups. When performing this two-part permutation test the exact permutation distribution of  X 2  is determined. This distribution, computed by generating all possible permutations or, for the  p -values given below in Table  1 , using a simple random sample of 20,000 permutations, is used to compute the  p -value. Since it is a permutation test based on the sum  X 2 , it is neither necessary to determine the permutation distributions of the summands  B 2  and  W 2  nor to calculate the  p -values of the univariate tests related to  B 2  and  W 2 .XBWXXXXppXBWpBWApplication to actual methylation data We use DNA methylation data from 7 regions and 87 lung cancer cell lines, 41 lines are from small cell lung cancer and 46 lines from non-small cell lung cancer [ 3 , 4 ]. The proportion of positive values for the different regions ranges from 39 to 100% for the small cell lung cancer and from 65 to 98% for the non-small cell lung cancer. The data are available at  . Siegmund et al. [ 4 ] transformed the data by standardizing the positive values on the natural-log scale. However, for the tests applied here, this transformation has no influence. Table  1  presents the  p -values of the two tests. For most regions the two-part permutation test gives a smaller  p -value than the original two-part test. The only exception is the region  APC . However, the original two-part test's  p -value for this region is 0.1684 and, for a  p -value of this size, a small change in the value is usually of no importance.
Application to actual methylation data
We use DNA methylation data from 7 regions and 87 lung cancer cell lines, 41 lines are from small cell lung cancer and 46 lines from non-small cell lung cancer [ 3 , 4 ]. The proportion of positive values for the different regions ranges from 39 to 100% for the small cell lung cancer and from 65 to 98% for the non-small cell lung cancer. The data are available at  . Siegmund et al. [ 4 ] transformed the data by standardizing the positive values on the natural-log scale. However, for the tests applied here, this transformation has no influence.Table  1  presents the  p -values of the two tests. For most regions the two-part permutation test gives a smaller  p -value than the original two-part test. The only exception is the region  APC . However, the original two-part test's  p -value for this region is 0.1684 and, for a  p -value of this size, a small change in the value is usually of no importance.ppAPCppApplication to actual microarray data Tschentscher et al. [ 11 ] performed an experiment with HG-U95Av2 oligonucleotide arrays in order to compare patients with uveal melanomas with and without monosomy 3. Expression values were calculated by use of the MAS 4.0 software. The data are available at  . The sample size in this microarray experiment is 10 per group. As mentioned above, expression levels below 50 were set to 50. This data truncation occurred in 2,215 (28%) out of 7,902 genes. First, we consider these 2,215 genes. Figure  1  displays the number of genes for the different number of truncated values per gene. Table  2  shows the frequencies of different size groups of the  p -values. Often, the two-part permutation test gives a smaller  p -value than the original two-part test. For instance, for 19 genes the  p -value is ≤ 0.001 when the latter test is applied. The permutation test gives a  p -value ≤ 0.001 for these 19 and for 39 additional genes. As usual, the majority of genes do not show any indication of being differentially expressed. For these genes a slight change in the  p -value is of no importance. Thus, in Table  3 , we consider the genes for which the  p -value of the original two-part test is ≤ 0.1. Out of the 2,215 genes 514 remain. As shown in Table  3  the  p -values of the two-part permutation test are, on average, distinctly smaller than those of the original two-part test. For a large proportion of genes (72% in this data set) there are no truncated values. In that case, the two-part statistic reduces to the sum 0 plus the squared standardized rank sum  W 2 . Of course, one has to define a priori whether the two-part test or the Wilcoxon test will be used to analyze the data. If the original two-sided (asymptotic) Wilcoxon test were chosen and applied, one could compare  W 2  with critical values from a χ 2  distribution with one degree of freedom (df). If the two-part were chosen there is df = 2 and, in case of no truncated values, power is lost compared to the original Wilcoxon test. For instance, the 95% percentile of the χ 2  distribution with df = 1 is 3.84, but it is 5.99 for df = 2. The permutation test using the sum statistic  X 2  does not suffer from this power loss: When there are no truncated values there is, of course, no difference in the proportions of truncated values, and the test statistic  X 2  is, for every permutation, the sum 0 +  W 2 . Thus, the two-part permutation test reduces to the exact two-sided Wilcoxon rank sum test when there are no truncated values. Consequently, this permutation test does not only give smaller  p -values, but it is also applicable in routine use whether or not truncated values are present.
Application to actual microarray data
Tschentscher et al. [ 11 ] performed an experiment with HG-U95Av2 oligonucleotide arrays in order to compare patients with uveal melanomas with and without monosomy 3. Expression values were calculated by use of the MAS 4.0 software. The data are available at  . The sample size in this microarray experiment is 10 per group. As mentioned above, expression levels below 50 were set to 50. This data truncation occurred in 2,215 (28%) out of 7,902 genes. First, we consider these 2,215 genes. Figure  1  displays the number of genes for the different number of truncated values per gene.Table  2  shows the frequencies of different size groups of the  p -values. Often, the two-part permutation test gives a smaller  p -value than the original two-part test. For instance, for 19 genes the  p -value is ≤ 0.001 when the latter test is applied. The permutation test gives a  p -value ≤ 0.001 for these 19 and for 39 additional genes. As usual, the majority of genes do not show any indication of being differentially expressed. For these genes a slight change in the  p -value is of no importance. Thus, in Table  3 , we consider the genes for which the  p -value of the original two-part test is ≤ 0.1. Out of the 2,215 genes 514 remain. As shown in Table  3  the  p -values of the two-part permutation test are, on average, distinctly smaller than those of the original two-part test.pppppppFor a large proportion of genes (72% in this data set) there are no truncated values. In that case, the two-part statistic reduces to the sum 0 plus the squared standardized rank sum  W 2 . Of course, one has to define a priori whether the two-part test or the Wilcoxon test will be used to analyze the data. If the original two-sided (asymptotic) Wilcoxon test were chosen and applied, one could compare  W 2  with critical values from a χ 2  distribution with one degree of freedom (df). If the two-part were chosen there is df = 2 and, in case of no truncated values, power is lost compared to the original Wilcoxon test. For instance, the 95% percentile of the χ 2  distribution with df = 1 is 3.84, but it is 5.99 for df = 2. The permutation test using the sum statistic  X 2  does not suffer from this power loss: When there are no truncated values there is, of course, no difference in the proportions of truncated values, and the test statistic  X 2  is, for every permutation, the sum 0 +  W 2 . Thus, the two-part permutation test reduces to the exact two-sided Wilcoxon rank sum test when there are no truncated values. Consequently, this permutation test does not only give smaller  p -values, but it is also applicable in routine use whether or not truncated values are present.WWXXWpSimulation study The two different tests, the original two-part test and the two-part permutation test, were compared in a Monte Carlo simulation study performed using SAS version 8.2, 5,000 simulation runs were generated for each configuration. The sample size of 10 per group was chosen as in the microarray experiment presented above. In some configurations some randomly chosen values were set to 0 according to binomial distributions with the probabilities  p 1  and  p 2 , and the remaining observations were generated according to a lognormal distribution (with median 1 and σ = 1). Then, the values of one group were shifted if applicable. In some other configurations all observations were generated according to the lognormal distribution and, in one group, shifted. Then, values smaller than a cutoff value were truncated. The type I error rates of the two tests are very similar. With e.g.  p 1  =  p 2  = 0.3 and a significance level of α = 0.05 the simulated type I error rates were 0.049 for both the original two-part test and the two-part permutation test. Table  4  displays results for situations with a difference between the two groups. As above, only those comparisons were regarded for which there is some indication of a difference, i.e. a  p -value ≤ 0.1 of the original two-part test. In all considered configurations the median of the difference between the  p -values of the original two-part test and the two-part permutation test is positive. The finding that the  p -values of the permutation test are smaller corresponds to a higher power of this test. The power is given in Table  5 , as shown the power of the two-part permutation test is at least as high as that of the original two-part test. There is only one exception, the latter test is slightly more powerful in one situation, i.e. when the proportion of zeros is higher in group 1 and the positive values are larger in group 1.
Simulation study
The two different tests, the original two-part test and the two-part permutation test, were compared in a Monte Carlo simulation study performed using SAS version 8.2, 5,000 simulation runs were generated for each configuration. The sample size of 10 per group was chosen as in the microarray experiment presented above. In some configurations some randomly chosen values were set to 0 according to binomial distributions with the probabilities  p 1  and  p 2 , and the remaining observations were generated according to a lognormal distribution (with median 1 and σ = 1). Then, the values of one group were shifted if applicable. In some other configurations all observations were generated according to the lognormal distribution and, in one group, shifted. Then, values smaller than a cutoff value were truncated.ppThe type I error rates of the two tests are very similar. With e.g.  p 1  =  p 2  = 0.3 and a significance level of α = 0.05 the simulated type I error rates were 0.049 for both the original two-part test and the two-part permutation test.ppTable  4  displays results for situations with a difference between the two groups. As above, only those comparisons were regarded for which there is some indication of a difference, i.e. a  p -value ≤ 0.1 of the original two-part test. In all considered configurations the median of the difference between the  p -values of the original two-part test and the two-part permutation test is positive. The finding that the  p -values of the permutation test are smaller corresponds to a higher power of this test. The power is given in Table  5 , as shown the power of the two-part permutation test is at least as high as that of the original two-part test. There is only one exception, the latter test is slightly more powerful in one situation, i.e. when the proportion of zeros is higher in group 1 and the positive values are larger in group 1.pppDiscussion Previous research demonstrated that a two-part test is appropriate and powerful in the presence of a clump of zero observations (i.e. truncated or null values). In this paper we propose a permutation test for such situations with two types of data. Usually, nonparametric tests can be performed based on an asymptotic distribution or based on a permutation null distribution. The two approaches often give similar results, especially when the sample sizes are large. However, in the case of a two-part test one cannot simply replace the asymptotic distributions of  B 2  and  W 2  by the exact permutation distributions. If so, one would compute two exact  p -values although the aim of a two-part test is to receive one  p -value that combines information from both parts. Therefore, the two-part permutation test uses the exact permutation distribution of the sum statistic  X 2 . That this permutation distribution of the sum is generated rather than to simply replace the asymptotic distributions of the summands by their exact permutation distributions may be the reason why the permutation test is more powerful. A disadvantage of a permutation test is that it can be computer-intensive. However, this issue is less relevant now due to faster algorithms [[ 18 ], chap. 13] and the advent of high-speed PCs. Furthermore, one can carry out a permutation test based on a random sample out of the possible permutations, as we did for the DNA methylation data (see Table  1 ). In microarray experiments it is common to investigate thousands of genes simultaneously. The approach presented here for the identification of differentially expressed genes is to consider a univariate testing problem for each gene. A correction for the multiplicity of genes is a subsequent step, that is, like the previous step of normalizing the data, outside the scope of this paper. A common approach to the multiplicity problem is to consider a procedure for testing the genes simultaneously for differential expression with the test on an individual gene being implied in the simultaneous test. For such a procedure different proposals have been made recently. For instance, there are methods based on the  p -values of the tests from individual genes [ 21 - 23 ]. In a similar manner, the multiplicity of regions can be managed in DNA methylation data.
Discussion
Previous research demonstrated that a two-part test is appropriate and powerful in the presence of a clump of zero observations (i.e. truncated or null values). In this paper we propose a permutation test for such situations with two types of data. Usually, nonparametric tests can be performed based on an asymptotic distribution or based on a permutation null distribution. The two approaches often give similar results, especially when the sample sizes are large. However, in the case of a two-part test one cannot simply replace the asymptotic distributions of  B 2  and  W 2  by the exact permutation distributions. If so, one would compute two exact  p -values although the aim of a two-part test is to receive one  p -value that combines information from both parts. Therefore, the two-part permutation test uses the exact permutation distribution of the sum statistic  X 2 . That this permutation distribution of the sum is generated rather than to simply replace the asymptotic distributions of the summands by their exact permutation distributions may be the reason why the permutation test is more powerful.BWppXA disadvantage of a permutation test is that it can be computer-intensive. However, this issue is less relevant now due to faster algorithms [[ 18 ], chap. 13] and the advent of high-speed PCs. Furthermore, one can carry out a permutation test based on a random sample out of the possible permutations, as we did for the DNA methylation data (see Table  1 ).In microarray experiments it is common to investigate thousands of genes simultaneously. The approach presented here for the identification of differentially expressed genes is to consider a univariate testing problem for each gene. A correction for the multiplicity of genes is a subsequent step, that is, like the previous step of normalizing the data, outside the scope of this paper. A common approach to the multiplicity problem is to consider a procedure for testing the genes simultaneously for differential expression with the test on an individual gene being implied in the simultaneous test. For such a procedure different proposals have been made recently. For instance, there are methods based on the  p -values of the tests from individual genes [ 21 - 23 ]. In a similar manner, the multiplicity of regions can be managed in DNA methylation data.pConclusion Aside from the shown improvement in power, the proposed two-part permutation test has three important advantages. First, it avoids the use of any asymptotic distribution and, therefore, can safely be applied in case of small sample sizes that are common in microarray experiments. Second, it reduces without any loss of power to the exact Wilcoxon test if there were no truncated (or zero) values. Thus, it can be used in routine analyses. Third, the permutation test opens the possibility to use other tests to construct the two-part test. Thus, tests with unknown or non-standard null distributions can be used. For instance, one could replace the Wilcoxon test by the Baumgartner-Weiß-Schindler test [ 24 ] that was recently recommended for the analysis of gene expression data [ 19 ].
Conclusion
Aside from the shown improvement in power, the proposed two-part permutation test has three important advantages. First, it avoids the use of any asymptotic distribution and, therefore, can safely be applied in case of small sample sizes that are common in microarray experiments. Second, it reduces without any loss of power to the exact Wilcoxon test if there were no truncated (or zero) values. Thus, it can be used in routine analyses. Third, the permutation test opens the possibility to use other tests to construct the two-part test. Thus, tests with unknown or non-standard null distributions can be used. For instance, one could replace the Wilcoxon test by the Baumgartner-Weiß-Schindler test [ 24 ] that was recently recommended for the analysis of gene expression data [ 19 ].Authors' contributions MN performed the statistical analyses and drafted the manuscript. TB prepared the microarray data. TB and KHJ participated in the design of the simulation study and helped to draft the manuscript. All authors read and approved the final manuscript.
Authors' contributions
MN performed the statistical analyses and drafted the manuscript. TB prepared the microarray data. TB and KHJ participated in the design of the simulation study and helped to draft the manuscript. All authors read and approved the final manuscript.


Background Microarray-based comparative genome hybridization experiments generate data that can be mapped onto the genome. These data are interpreted more easily when represented graphically in a genomic context.
Background
Microarray-based comparative genome hybridization experiments generate data that can be mapped onto the genome. These data are interpreted more easily when represented graphically in a genomic context.Results We have developed Caryoscope, which is an open source Java application for visualizing microarray data from array comparative genome hybridization experiments in a genomic context. Caryoscope can read General Feature Format files (GFF files), as well as comma- and tab-delimited files, that define the genomic positions of the microarray reporters for which data are obtained. The microarray data can be browsed using an interactive, zoomable interface, which helps users identify regions of chromosomal deletion or amplification. The graphical representation of the data can be exported in a number of graphic formats, including publication-quality formats such as PostScript.
Results
We have developed Caryoscope, which is an open source Java application for visualizing microarray data from array comparative genome hybridization experiments in a genomic context. Caryoscope can read General Feature Format files (GFF files), as well as comma- and tab-delimited files, that define the genomic positions of the microarray reporters for which data are obtained. The microarray data can be browsed using an interactive, zoomable interface, which helps users identify regions of chromosomal deletion or amplification. The graphical representation of the data can be exported in a number of graphic formats, including publication-quality formats such as PostScript.Conclusion Caryoscope is a useful tool that can aid in the visualization, exploration and interpretation of microarray data in a genomic context.
Conclusion
Caryoscope is a useful tool that can aid in the visualization, exploration and interpretation of microarray data in a genomic context.

Background The application of high-throughput technologies (such as DNA microarrays) to biomedical experimentation generates large quantities of data that can be difficult to browse and interpret in the absence of a graphical representation. Eisen  et al.  have previously displayed clustered microarray data using a false color representation that greatly aids in the intuitive interpretation of the data ([ 1 ]). However, when these data are from array comparative genome hybridization (arrayCGH) experiments ( e.g. , see [ 2 ]), the genomic locations of the reporters (the molecules in each spot on a microarray) that were used to generate the data are important for interpretation. A relative increase or decrease in the ratios for a group of reporters that report on adjacent genomic locations may indicate amplification or deletion of that genomic region, respectively. Additionally, even the analysis of expression data in the context of genomic position can also identify regions of amplification or deletion, or even cases of aneuploidy ([ 3 , 4 ]). In addition to being able to view and browse arrayCGH data, it is also important that the data be readily connected to annotation sources, such that a user can easily determine the identity and attributes of the gene represented by a reporter that was present on a microarray, which for instance may show evidence of amplification or deletion. For example, in arrayCGH experiments using tumor cells as the DNA source, there is an obvious value in rapidly determining whether a deleted region contains a tumor suppressor gene. Finally, researchers frequently need to create figures, for publications, communication with co-workers, supplemental websites, or presentations. Thus researchers should be able to produce the visual representation of their data in a variety of graphic formats. Caryoscope was originally implemented as a Web form, generating either a bitmap or a clickable PDF output. When this became an important day-to-day tool for our users ([ 5 - 9 ]), we created an improved, interactive version, consisting of a standalone application for analyzing arrayCGH data and an open architecture of re-usable classes that may be embedded by other developers in their own applications. In this paper, we focus on Caryoscope as an application. Some other software packages were developed while this work was in progress, and can perform some of these functions. For instance, Genome2D ([ 10 ]) is designed to display bacterial transcriptome data on linear chromosome maps, while SeeCGH ([ 11 ]) was designed for viewing arrayCGH data (only for 2-channel arrays). However, both of these programs are designed to run solely on the Windows operating system, whereas Caryoscope is a Java application that can be used on Macintosh OS X, Linux and various UNIX operating systems, as well as Windows. Greshock  et al.  ([ 12 ]) have built similar functionality, called CGHAnalyzer, on TIGR's Multiple Experiment Viewer (MeV) platform, but with a different (circular) whole-genome view. Furthermore, Caryoscope can be run in a command line mode, making it easy to embed within a CGI or a processing pipeline.
Background
The application of high-throughput technologies (such as DNA microarrays) to biomedical experimentation generates large quantities of data that can be difficult to browse and interpret in the absence of a graphical representation. Eisen  et al.  have previously displayed clustered microarray data using a false color representation that greatly aids in the intuitive interpretation of the data ([ 1 ]). However, when these data are from array comparative genome hybridization (arrayCGH) experiments ( e.g. , see [ 2 ]), the genomic locations of the reporters (the molecules in each spot on a microarray) that were used to generate the data are important for interpretation. A relative increase or decrease in the ratios for a group of reporters that report on adjacent genomic locations may indicate amplification or deletion of that genomic region, respectively. Additionally, even the analysis of expression data in the context of genomic position can also identify regions of amplification or deletion, or even cases of aneuploidy ([ 3 , 4 ]).et al.e.g.In addition to being able to view and browse arrayCGH data, it is also important that the data be readily connected to annotation sources, such that a user can easily determine the identity and attributes of the gene represented by a reporter that was present on a microarray, which for instance may show evidence of amplification or deletion. For example, in arrayCGH experiments using tumor cells as the DNA source, there is an obvious value in rapidly determining whether a deleted region contains a tumor suppressor gene.Finally, researchers frequently need to create figures, for publications, communication with co-workers, supplemental websites, or presentations. Thus researchers should be able to produce the visual representation of their data in a variety of graphic formats.Caryoscope was originally implemented as a Web form, generating either a bitmap or a clickable PDF output. When this became an important day-to-day tool for our users ([ 5 - 9 ]), we created an improved, interactive version, consisting of a standalone application for analyzing arrayCGH data and an open architecture of re-usable classes that may be embedded by other developers in their own applications. In this paper, we focus on Caryoscope as an application.Some other software packages were developed while this work was in progress, and can perform some of these functions. For instance, Genome2D ([ 10 ]) is designed to display bacterial transcriptome data on linear chromosome maps, while SeeCGH ([ 11 ]) was designed for viewing arrayCGH data (only for 2-channel arrays). However, both of these programs are designed to run solely on the Windows operating system, whereas Caryoscope is a Java application that can be used on Macintosh OS X, Linux and various UNIX operating systems, as well as Windows. Greshock  et al.  ([ 12 ]) have built similar functionality, called CGHAnalyzer, on TIGR's Multiple Experiment Viewer (MeV) platform, but with a different (circular) whole-genome view. Furthermore, Caryoscope can be run in a command line mode, making it easy to embed within a CGI or a processing pipeline.et al.Implementation We implemented Caryoscope in Java ([ 13 ]) and deployed it as a Java Web Start ([ 14 ]) application, so a user may run it directly from our website ([ 15 ]) by clicking on a link. One can also install Caryoscope directly on a computer, but we recommend launching via the website in order to obtain the most current version of the software. Caryoscope accepts data as text input files in simple formats so as to maximize interoperability with other systems.
Implementation
We implemented Caryoscope in Java ([ 13 ]) and deployed it as a Java Web Start ([ 14 ]) application, so a user may run it directly from our website ([ 15 ]) by clicking on a link. One can also install Caryoscope directly on a computer, but we recommend launching via the website in order to obtain the most current version of the software.Caryoscope accepts data as text input files in simple formats so as to maximize interoperability with other systems.Results Application features As input, Caryoscope accepts a single file in either the General Feature Format (GFF, [ 16 ]) or a tab-delimited (TXT) or comma-delimited (CSV) spreadsheet-compatible format. This file describes the chromosomes to be displayed, and a set of loci on the chromosomes annotated by a number of associated microarray datasets and other descriptive information. The structure of a Caryoscope input file is illustrated in Figure  1 . Once the user opens a file, Caryoscope automatically displays one of the datasets contained therein (Figure  2 ). Caryoscope displays each feature as a rectangle on the chromosome axis; the size of the rectangle on the horizontal axis, perpendicular to the chromosome, represents the magnitude of the associated data value, while the size of the rectangle in the vertical direction, along the chromosome axis, represents the size of the represented feature, based on its genomic coordinates. Pursuant to convention, the default display of Caryoscope represents positive values in red bars, which are drawn to the right of the chromosome, and negative values in green bars (though these colors can be changed), which are drawn to the left of the chromosome. Thus, based on color, size, and location, researchers can easily intuit the meaning of the graphical representation of their data. Caryoscope provides several modes in which the user may view the data; these are controlled by the  View modes  toolbar (Figure  2 ). In the various panning and zooming modes, the user may change the view of the data to drill down to specific regions of interest. In  Navigate  mode, the user sees tooltips (small informational pop-up windows) that appear immediately when mousing over the features, and can navigate to related URLs by clicking on each feature. Typically, users at Stanford University (our primary source of testers and users) link GenBank accessions, associated with the cDNA clones that are on their microarrays, to SOURCE Gene Pages ([ 17 ]). The zooming paradigm in Caryoscope is somewhat novel in that it permits independent control of the zoom scales in the X and Y directions (Figure  3 ). It allows users to select the best scaling to see detail along the chromosome axis, and the data values perpendicular to the chromosome axis, for their specific data. The  Reset viewpoint  button on the  View modes  toolbar (Figure  2 ) allows the user to return quickly to the default scaling. The behavior of Caryoscope in  Navigate  mode is shown in Figure  4 . The tooltip and URL text are computed for each feature by substituting the value of its annotations into the  Feature tooltip expression  and  Feature URL expression  settings, as illustrated in the figure. These features allow users to have immediate access to information about each feature as they browse the data. The user can enable two built-in computations on the data values: a user can compute the logarithm of the values (to any base specified by the user), and a user can compute a moving average of the values. Both these computations can be controlled from the  Settings  dialog (see Figure  2b ). Users can perform other computations outside Caryoscope; this is facilitated by the fact that we support common spreadsheet-compatible file formats (TXT and CSV). To prepare diagrams, the user can export the Caryoscope display to a variety of graphics formats via the  Export  dialog. Specifically, Caryoscope supports vector ( e.g. , PostScript and PDF) output for scalable publication-quality results, and raster ( e.g. , JPEG and PNG) output for ease of viewing, posting on supplemental websites, and inclusion in presentations. A user may export graphics from Caryoscope via the command line mode, without having to invoke the interactive user interface. For example, to export a view of a dataset as a PDF file, the user could invoke Caryoscope as follows:        java -jar caryoscope-run.jar            -inputFile 3395-2004-04-04.csv            -visibleDataset RAT2_MEAN            -outputFile 3395.pdf            -outputFormat pdf All settings may be modified via the command line. The  -listFormats  option provides a list of available graphics output formats, and the  -help  option prints a brief summary of the options. A comparison of the features of Caryoscope with other, similar software is presented in Table  1 . Obtaining Caryoscope In addition to immediately executable copies, the complete source code for Caryoscope is available without limitations from our website ([ 15 ]), and is covered by a very liberal Open Source ([ 18 ]) license (the MIT License, [ 19 ]). All external components used by Caryoscope are also Open Source. We update Caryoscope frequently (approximately once every three weeks) and post news items on the website. We also send e-mail announcements to people who have requested them.
Results
Application features As input, Caryoscope accepts a single file in either the General Feature Format (GFF, [ 16 ]) or a tab-delimited (TXT) or comma-delimited (CSV) spreadsheet-compatible format. This file describes the chromosomes to be displayed, and a set of loci on the chromosomes annotated by a number of associated microarray datasets and other descriptive information. The structure of a Caryoscope input file is illustrated in Figure  1 . Once the user opens a file, Caryoscope automatically displays one of the datasets contained therein (Figure  2 ). Caryoscope displays each feature as a rectangle on the chromosome axis; the size of the rectangle on the horizontal axis, perpendicular to the chromosome, represents the magnitude of the associated data value, while the size of the rectangle in the vertical direction, along the chromosome axis, represents the size of the represented feature, based on its genomic coordinates. Pursuant to convention, the default display of Caryoscope represents positive values in red bars, which are drawn to the right of the chromosome, and negative values in green bars (though these colors can be changed), which are drawn to the left of the chromosome. Thus, based on color, size, and location, researchers can easily intuit the meaning of the graphical representation of their data. Caryoscope provides several modes in which the user may view the data; these are controlled by the  View modes  toolbar (Figure  2 ). In the various panning and zooming modes, the user may change the view of the data to drill down to specific regions of interest. In  Navigate  mode, the user sees tooltips (small informational pop-up windows) that appear immediately when mousing over the features, and can navigate to related URLs by clicking on each feature. Typically, users at Stanford University (our primary source of testers and users) link GenBank accessions, associated with the cDNA clones that are on their microarrays, to SOURCE Gene Pages ([ 17 ]). The zooming paradigm in Caryoscope is somewhat novel in that it permits independent control of the zoom scales in the X and Y directions (Figure  3 ). It allows users to select the best scaling to see detail along the chromosome axis, and the data values perpendicular to the chromosome axis, for their specific data. The  Reset viewpoint  button on the  View modes  toolbar (Figure  2 ) allows the user to return quickly to the default scaling. The behavior of Caryoscope in  Navigate  mode is shown in Figure  4 . The tooltip and URL text are computed for each feature by substituting the value of its annotations into the  Feature tooltip expression  and  Feature URL expression  settings, as illustrated in the figure. These features allow users to have immediate access to information about each feature as they browse the data. The user can enable two built-in computations on the data values: a user can compute the logarithm of the values (to any base specified by the user), and a user can compute a moving average of the values. Both these computations can be controlled from the  Settings  dialog (see Figure  2b ). Users can perform other computations outside Caryoscope; this is facilitated by the fact that we support common spreadsheet-compatible file formats (TXT and CSV). To prepare diagrams, the user can export the Caryoscope display to a variety of graphics formats via the  Export  dialog. Specifically, Caryoscope supports vector ( e.g. , PostScript and PDF) output for scalable publication-quality results, and raster ( e.g. , JPEG and PNG) output for ease of viewing, posting on supplemental websites, and inclusion in presentations. A user may export graphics from Caryoscope via the command line mode, without having to invoke the interactive user interface. For example, to export a view of a dataset as a PDF file, the user could invoke Caryoscope as follows:        java -jar caryoscope-run.jar            -inputFile 3395-2004-04-04.csv            -visibleDataset RAT2_MEAN            -outputFile 3395.pdf            -outputFormat pdf All settings may be modified via the command line. The  -listFormats  option provides a list of available graphics output formats, and the  -help  option prints a brief summary of the options. A comparison of the features of Caryoscope with other, similar software is presented in Table  1 .
Application features
As input, Caryoscope accepts a single file in either the General Feature Format (GFF, [ 16 ]) or a tab-delimited (TXT) or comma-delimited (CSV) spreadsheet-compatible format. This file describes the chromosomes to be displayed, and a set of loci on the chromosomes annotated by a number of associated microarray datasets and other descriptive information. The structure of a Caryoscope input file is illustrated in Figure  1 .Once the user opens a file, Caryoscope automatically displays one of the datasets contained therein (Figure  2 ). Caryoscope displays each feature as a rectangle on the chromosome axis; the size of the rectangle on the horizontal axis, perpendicular to the chromosome, represents the magnitude of the associated data value, while the size of the rectangle in the vertical direction, along the chromosome axis, represents the size of the represented feature, based on its genomic coordinates. Pursuant to convention, the default display of Caryoscope represents positive values in red bars, which are drawn to the right of the chromosome, and negative values in green bars (though these colors can be changed), which are drawn to the left of the chromosome. Thus, based on color, size, and location, researchers can easily intuit the meaning of the graphical representation of their data.Caryoscope provides several modes in which the user may view the data; these are controlled by the  View modes  toolbar (Figure  2 ). In the various panning and zooming modes, the user may change the view of the data to drill down to specific regions of interest. In  Navigate  mode, the user sees tooltips (small informational pop-up windows) that appear immediately when mousing over the features, and can navigate to related URLs by clicking on each feature. Typically, users at Stanford University (our primary source of testers and users) link GenBank accessions, associated with the cDNA clones that are on their microarrays, to SOURCE Gene Pages ([ 17 ]).View modesNavigateThe zooming paradigm in Caryoscope is somewhat novel in that it permits independent control of the zoom scales in the X and Y directions (Figure  3 ). It allows users to select the best scaling to see detail along the chromosome axis, and the data values perpendicular to the chromosome axis, for their specific data. The  Reset viewpoint  button on the  View modes  toolbar (Figure  2 ) allows the user to return quickly to the default scaling.Reset viewpointView modesThe behavior of Caryoscope in  Navigate  mode is shown in Figure  4 . The tooltip and URL text are computed for each feature by substituting the value of its annotations into the  Feature tooltip expression  and  Feature URL expression  settings, as illustrated in the figure. These features allow users to have immediate access to information about each feature as they browse the data.NavigateFeature tooltip expressionFeature URL expressionThe user can enable two built-in computations on the data values: a user can compute the logarithm of the values (to any base specified by the user), and a user can compute a moving average of the values. Both these computations can be controlled from the  Settings  dialog (see Figure  2b ). Users can perform other computations outside Caryoscope; this is facilitated by the fact that we support common spreadsheet-compatible file formats (TXT and CSV).SettingsTo prepare diagrams, the user can export the Caryoscope display to a variety of graphics formats via the  Export  dialog. Specifically, Caryoscope supports vector ( e.g. , PostScript and PDF) output for scalable publication-quality results, and raster ( e.g. , JPEG and PNG) output for ease of viewing, posting on supplemental websites, and inclusion in presentations.Exporte.g.e.g.A user may export graphics from Caryoscope via the command line mode, without having to invoke the interactive user interface. For example, to export a view of a dataset as a PDF file, the user could invoke Caryoscope as follows:java -jar caryoscope-run.jar-inputFile 3395-2004-04-04.csv-visibleDataset RAT2_MEAN-outputFile 3395.pdf-outputFormat pdfAll settings may be modified via the command line. The  -listFormats  option provides a list of available graphics output formats, and the  -help  option prints a brief summary of the options.A comparison of the features of Caryoscope with other, similar software is presented in Table  1 .Obtaining Caryoscope In addition to immediately executable copies, the complete source code for Caryoscope is available without limitations from our website ([ 15 ]), and is covered by a very liberal Open Source ([ 18 ]) license (the MIT License, [ 19 ]). All external components used by Caryoscope are also Open Source. We update Caryoscope frequently (approximately once every three weeks) and post news items on the website. We also send e-mail announcements to people who have requested them.
Obtaining Caryoscope
In addition to immediately executable copies, the complete source code for Caryoscope is available without limitations from our website ([ 15 ]), and is covered by a very liberal Open Source ([ 18 ]) license (the MIT License, [ 19 ]). All external components used by Caryoscope are also Open Source.We update Caryoscope frequently (approximately once every three weeks) and post news items on the website. We also send e-mail announcements to people who have requested them.Discussion Biological context Caryoscope is useful for viewing both arrayCGH and expression data in the context of genomic position. It helps a biologist gain insight by providing a high-level view of a large amount of data at once, where patterns can be perceived at a glance. A biologist studying amplifications or deletions in tumor cells may create and export graphics representing arrayCGH and expression data for the same cells using Caryoscope, and visually compare the two side-by-side. For instance, co-located regions that are amplified at the DNA level and over-expressed at the RNA level would provide excellent confirmation of the results. Using the zooming and panning features of Caryoscope, the biologist could focus on specific regions of interest. To identify regions of aneuploidy, the biologist can again simply examine the data visually. In this case, however, one would look for a large-scale pattern. One might specify a  Minimum feature width  of, say, 2 pixels (Figure  5c ), to ensure that any deletion or amplification, no matter how small in genomic coordinates, is easily visible. Rather than zooming in on specific regions, a researcher would tend to compare overall views of the entire genome. If it seems like practically all of one chromosome is amplified or deleted, the biologist would have strong evidence for aneuploidy. In a gene expression study, a biologist may suspect that some expression patterns are correlated with genomic position. Caryoscope allows one to view expression data, either for the whole genome or on a region of interest, to help confirm or refute a hypothesis. Finally, in all this work, the biologist may want to have quick and easy access to information about the genomic features displayed. As long as the information needed is available from the annotations that were saved in the input data file (or available at a URL that can be built based on the annotations), one can use the  Feature URL expression  and  Feature tooltip expression  (Figure  4 ) settings to provide immediate mouse-over feedback with this information – almost as if the application were customized for a specific field of interest. Software context We intend Caryoscope to be a bench-top visualization tool that biologists can use immediately to get day-to-day work done, with a very low "cost of entry" for getting started. This led us to a number of design choices. Caryoscope can be launched from our web site without a prior installation step. Since it is Open Source, anyone, including any for-profit organization, can use it without restrictions and without having to obtain a license or register for access. The input file formats and output graphical formats we chose are all in common usage. In particular, the TXT and CSV input formats can be generated using any popular spreadsheet or database software, or even with a plain text editor, without having to do any programming. Finally, we built Caryoscope to be content-neutral, with no hard-coded specificity to any research field. Thus, users of Caryoscope may control how annotations are treated as numerical data, and can "program" data-driven interactive behavior of the display ( i.e. , the tooltips and hyperlinks). Future work From the outset of this project, our biggest challenge has been how to accurately represent the huge amounts of data in a typical gene expression or arrayCGH experiment using the limited number of pixels available on the screen or on a printed page. If we skew our display algorithms too much towards producing a "sharp", high-contrast plot, we risk obscuring detail in the data and leading biologists to the wrong conclusions. On the other hand, since the size of the data elements, properly scaled from genomic coordinates to the display device, can be far less than the size of one pixel, we need a supportable way to "summarize" the data within each pixel and represent that summary as a single value: the color (including the brightness) of that pixel. Modern computer graphics systems use a technique called "anti-aliasing" ([ 20 ] and Figure  5a ) to render sub-pixel details with the illusion of smoothness. The Java subsystems we use in Caryoscope do this automatically and, in the current version of the software, we simply rely on them (Figure  5b ). However, the anti-aliasing in Java is designed to display visually appealing text, lines and arcs, but not to ensure the most accurate possible on-screen rendering of scientific data. Specifically, at low magnification, the data almost disappear unless we force a minimum pixel size for each locus (Figure  5c ). We will develop our display methods further to ensure that we can provide an easy-to-read display while retaining the subtle variations in the data. Following the spirit of medical diagnostic imaging (DICOM, [ 21 ]), whereby incorrect details in a few pixels could lead to an incorrect conclusion, we must ensure that our displays, which are used for important research decisions, are never misleading. One solution, suggested by [ 12 ], is to display the data elements, not aligned to the position of the loci along the chromosome, but rather in strict sequential order with a fixed width. While this solves the anti-aliasing problems, it does eliminate consistent chromosomal positions and alignments of the data. Furthermore, it causes the appearance of the display to be dependent on the specific choice of clones – which can be another source of subtle variation when comparing multiple datasets. Another idea is to display dots, rather than horizontal bars, so that the "spread" of the data is more visible even if data points are super-imposed. We will investigate this for a future release of Caryoscope. We are particularly concerned about the use of Caryoscope (or similar) graphics in vector formats (such as PostScript, PDF and SVG) that are subsequently rendered on diverse display devices and printers. Since we have no control over the rendering at the destination, it is likely that the same vector output could look very different on different devices. Once we have studied this problem in more detail, we intend to provide practical usage guidelines for researchers. Our experience with the application, and how it is used, leads us to believe that the current zooming paradigm should be revisited. While the model of a continuously zoomable 2D space provides users with the features they need, it can lead to displays whereby the data in specific regions of adjacent chromosomes are juxtaposed, even though their being next to each other is not intrinsically meaningful (see Figure  6 ). (An exception to this might occur in telomere amplification, or perhaps special behavior around the centromeres. In this case, the ability to align the chromosomes at either end, or at the centromeres, would be helpful.) In the future, we will modify our display so that the user can turn "on" or "off" the display of the available chromosomes. Within that display, and with the help of our users, we will review the role of the X-axis scaling: perhaps it should change the scaling of the data, or perhaps it does not belong in Caryoscope-like applications at all. A common user request is to display two or more arrayCGH and/or expression datasets side by side, either to determine regions of recurrent deletion or amplification, or to discern visually the impact that changes in chromosome copy number may have on transcript levels ( e.g. , see [ 5 ]). Another frequent request is to show the cytoband information for each chromosome. We intend to add these features as part of our future development, in the course of which we would perhaps redefine, or extend, the manner in which our input data are defined ( i.e. , we would accept the definition of the chromosome names, lengths and cytobands in a separate file that would be re-used by different datasets). Summary Caryoscope currently provides a flexible method to visualize, explore and create images of microarray data in a genomic context. With such a tool, microarray researchers will be able to answer questions about how genome copy number or genome position plays a role in biological processes or human diseases.
Discussion
Biological context Caryoscope is useful for viewing both arrayCGH and expression data in the context of genomic position. It helps a biologist gain insight by providing a high-level view of a large amount of data at once, where patterns can be perceived at a glance. A biologist studying amplifications or deletions in tumor cells may create and export graphics representing arrayCGH and expression data for the same cells using Caryoscope, and visually compare the two side-by-side. For instance, co-located regions that are amplified at the DNA level and over-expressed at the RNA level would provide excellent confirmation of the results. Using the zooming and panning features of Caryoscope, the biologist could focus on specific regions of interest. To identify regions of aneuploidy, the biologist can again simply examine the data visually. In this case, however, one would look for a large-scale pattern. One might specify a  Minimum feature width  of, say, 2 pixels (Figure  5c ), to ensure that any deletion or amplification, no matter how small in genomic coordinates, is easily visible. Rather than zooming in on specific regions, a researcher would tend to compare overall views of the entire genome. If it seems like practically all of one chromosome is amplified or deleted, the biologist would have strong evidence for aneuploidy. In a gene expression study, a biologist may suspect that some expression patterns are correlated with genomic position. Caryoscope allows one to view expression data, either for the whole genome or on a region of interest, to help confirm or refute a hypothesis. Finally, in all this work, the biologist may want to have quick and easy access to information about the genomic features displayed. As long as the information needed is available from the annotations that were saved in the input data file (or available at a URL that can be built based on the annotations), one can use the  Feature URL expression  and  Feature tooltip expression  (Figure  4 ) settings to provide immediate mouse-over feedback with this information – almost as if the application were customized for a specific field of interest.
Biological context
Caryoscope is useful for viewing both arrayCGH and expression data in the context of genomic position. It helps a biologist gain insight by providing a high-level view of a large amount of data at once, where patterns can be perceived at a glance.A biologist studying amplifications or deletions in tumor cells may create and export graphics representing arrayCGH and expression data for the same cells using Caryoscope, and visually compare the two side-by-side. For instance, co-located regions that are amplified at the DNA level and over-expressed at the RNA level would provide excellent confirmation of the results. Using the zooming and panning features of Caryoscope, the biologist could focus on specific regions of interest.To identify regions of aneuploidy, the biologist can again simply examine the data visually. In this case, however, one would look for a large-scale pattern. One might specify a  Minimum feature width  of, say, 2 pixels (Figure  5c ), to ensure that any deletion or amplification, no matter how small in genomic coordinates, is easily visible. Rather than zooming in on specific regions, a researcher would tend to compare overall views of the entire genome. If it seems like practically all of one chromosome is amplified or deleted, the biologist would have strong evidence for aneuploidy.Minimum feature widthIn a gene expression study, a biologist may suspect that some expression patterns are correlated with genomic position. Caryoscope allows one to view expression data, either for the whole genome or on a region of interest, to help confirm or refute a hypothesis.Finally, in all this work, the biologist may want to have quick and easy access to information about the genomic features displayed. As long as the information needed is available from the annotations that were saved in the input data file (or available at a URL that can be built based on the annotations), one can use the  Feature URL expression  and  Feature tooltip expression  (Figure  4 ) settings to provide immediate mouse-over feedback with this information – almost as if the application were customized for a specific field of interest.Feature URL expressionFeature tooltip expressionSoftware context We intend Caryoscope to be a bench-top visualization tool that biologists can use immediately to get day-to-day work done, with a very low "cost of entry" for getting started. This led us to a number of design choices. Caryoscope can be launched from our web site without a prior installation step. Since it is Open Source, anyone, including any for-profit organization, can use it without restrictions and without having to obtain a license or register for access. The input file formats and output graphical formats we chose are all in common usage. In particular, the TXT and CSV input formats can be generated using any popular spreadsheet or database software, or even with a plain text editor, without having to do any programming. Finally, we built Caryoscope to be content-neutral, with no hard-coded specificity to any research field. Thus, users of Caryoscope may control how annotations are treated as numerical data, and can "program" data-driven interactive behavior of the display ( i.e. , the tooltips and hyperlinks).
Software context
We intend Caryoscope to be a bench-top visualization tool that biologists can use immediately to get day-to-day work done, with a very low "cost of entry" for getting started. This led us to a number of design choices.Caryoscope can be launched from our web site without a prior installation step. Since it is Open Source, anyone, including any for-profit organization, can use it without restrictions and without having to obtain a license or register for access.The input file formats and output graphical formats we chose are all in common usage. In particular, the TXT and CSV input formats can be generated using any popular spreadsheet or database software, or even with a plain text editor, without having to do any programming.Finally, we built Caryoscope to be content-neutral, with no hard-coded specificity to any research field. Thus, users of Caryoscope may control how annotations are treated as numerical data, and can "program" data-driven interactive behavior of the display ( i.e. , the tooltips and hyperlinks).i.e.Future work From the outset of this project, our biggest challenge has been how to accurately represent the huge amounts of data in a typical gene expression or arrayCGH experiment using the limited number of pixels available on the screen or on a printed page. If we skew our display algorithms too much towards producing a "sharp", high-contrast plot, we risk obscuring detail in the data and leading biologists to the wrong conclusions. On the other hand, since the size of the data elements, properly scaled from genomic coordinates to the display device, can be far less than the size of one pixel, we need a supportable way to "summarize" the data within each pixel and represent that summary as a single value: the color (including the brightness) of that pixel. Modern computer graphics systems use a technique called "anti-aliasing" ([ 20 ] and Figure  5a ) to render sub-pixel details with the illusion of smoothness. The Java subsystems we use in Caryoscope do this automatically and, in the current version of the software, we simply rely on them (Figure  5b ). However, the anti-aliasing in Java is designed to display visually appealing text, lines and arcs, but not to ensure the most accurate possible on-screen rendering of scientific data. Specifically, at low magnification, the data almost disappear unless we force a minimum pixel size for each locus (Figure  5c ). We will develop our display methods further to ensure that we can provide an easy-to-read display while retaining the subtle variations in the data. Following the spirit of medical diagnostic imaging (DICOM, [ 21 ]), whereby incorrect details in a few pixels could lead to an incorrect conclusion, we must ensure that our displays, which are used for important research decisions, are never misleading. One solution, suggested by [ 12 ], is to display the data elements, not aligned to the position of the loci along the chromosome, but rather in strict sequential order with a fixed width. While this solves the anti-aliasing problems, it does eliminate consistent chromosomal positions and alignments of the data. Furthermore, it causes the appearance of the display to be dependent on the specific choice of clones – which can be another source of subtle variation when comparing multiple datasets. Another idea is to display dots, rather than horizontal bars, so that the "spread" of the data is more visible even if data points are super-imposed. We will investigate this for a future release of Caryoscope. We are particularly concerned about the use of Caryoscope (or similar) graphics in vector formats (such as PostScript, PDF and SVG) that are subsequently rendered on diverse display devices and printers. Since we have no control over the rendering at the destination, it is likely that the same vector output could look very different on different devices. Once we have studied this problem in more detail, we intend to provide practical usage guidelines for researchers. Our experience with the application, and how it is used, leads us to believe that the current zooming paradigm should be revisited. While the model of a continuously zoomable 2D space provides users with the features they need, it can lead to displays whereby the data in specific regions of adjacent chromosomes are juxtaposed, even though their being next to each other is not intrinsically meaningful (see Figure  6 ). (An exception to this might occur in telomere amplification, or perhaps special behavior around the centromeres. In this case, the ability to align the chromosomes at either end, or at the centromeres, would be helpful.) In the future, we will modify our display so that the user can turn "on" or "off" the display of the available chromosomes. Within that display, and with the help of our users, we will review the role of the X-axis scaling: perhaps it should change the scaling of the data, or perhaps it does not belong in Caryoscope-like applications at all. A common user request is to display two or more arrayCGH and/or expression datasets side by side, either to determine regions of recurrent deletion or amplification, or to discern visually the impact that changes in chromosome copy number may have on transcript levels ( e.g. , see [ 5 ]). Another frequent request is to show the cytoband information for each chromosome. We intend to add these features as part of our future development, in the course of which we would perhaps redefine, or extend, the manner in which our input data are defined ( i.e. , we would accept the definition of the chromosome names, lengths and cytobands in a separate file that would be re-used by different datasets).
Future work
From the outset of this project, our biggest challenge has been how to accurately represent the huge amounts of data in a typical gene expression or arrayCGH experiment using the limited number of pixels available on the screen or on a printed page. If we skew our display algorithms too much towards producing a "sharp", high-contrast plot, we risk obscuring detail in the data and leading biologists to the wrong conclusions. On the other hand, since the size of the data elements, properly scaled from genomic coordinates to the display device, can be far less than the size of one pixel, we need a supportable way to "summarize" the data within each pixel and represent that summary as a single value: the color (including the brightness) of that pixel.Modern computer graphics systems use a technique called "anti-aliasing" ([ 20 ] and Figure  5a ) to render sub-pixel details with the illusion of smoothness. The Java subsystems we use in Caryoscope do this automatically and, in the current version of the software, we simply rely on them (Figure  5b ). However, the anti-aliasing in Java is designed to display visually appealing text, lines and arcs, but not to ensure the most accurate possible on-screen rendering of scientific data. Specifically, at low magnification, the data almost disappear unless we force a minimum pixel size for each locus (Figure  5c ).We will develop our display methods further to ensure that we can provide an easy-to-read display while retaining the subtle variations in the data. Following the spirit of medical diagnostic imaging (DICOM, [ 21 ]), whereby incorrect details in a few pixels could lead to an incorrect conclusion, we must ensure that our displays, which are used for important research decisions, are never misleading.One solution, suggested by [ 12 ], is to display the data elements, not aligned to the position of the loci along the chromosome, but rather in strict sequential order with a fixed width. While this solves the anti-aliasing problems, it does eliminate consistent chromosomal positions and alignments of the data. Furthermore, it causes the appearance of the display to be dependent on the specific choice of clones – which can be another source of subtle variation when comparing multiple datasets. Another idea is to display dots, rather than horizontal bars, so that the "spread" of the data is more visible even if data points are super-imposed. We will investigate this for a future release of Caryoscope.We are particularly concerned about the use of Caryoscope (or similar) graphics in vector formats (such as PostScript, PDF and SVG) that are subsequently rendered on diverse display devices and printers. Since we have no control over the rendering at the destination, it is likely that the same vector output could look very different on different devices. Once we have studied this problem in more detail, we intend to provide practical usage guidelines for researchers.Our experience with the application, and how it is used, leads us to believe that the current zooming paradigm should be revisited. While the model of a continuously zoomable 2D space provides users with the features they need, it can lead to displays whereby the data in specific regions of adjacent chromosomes are juxtaposed, even though their being next to each other is not intrinsically meaningful (see Figure  6 ). (An exception to this might occur in telomere amplification, or perhaps special behavior around the centromeres. In this case, the ability to align the chromosomes at either end, or at the centromeres, would be helpful.)In the future, we will modify our display so that the user can turn "on" or "off" the display of the available chromosomes. Within that display, and with the help of our users, we will review the role of the X-axis scaling: perhaps it should change the scaling of the data, or perhaps it does not belong in Caryoscope-like applications at all.A common user request is to display two or more arrayCGH and/or expression datasets side by side, either to determine regions of recurrent deletion or amplification, or to discern visually the impact that changes in chromosome copy number may have on transcript levels ( e.g. , see [ 5 ]). Another frequent request is to show the cytoband information for each chromosome. We intend to add these features as part of our future development, in the course of which we would perhaps redefine, or extend, the manner in which our input data are defined ( i.e. , we would accept the definition of the chromosome names, lengths and cytobands in a separate file that would be re-used by different datasets).e.g.i.e.Summary Caryoscope currently provides a flexible method to visualize, explore and create images of microarray data in a genomic context. With such a tool, microarray researchers will be able to answer questions about how genome copy number or genome position plays a role in biological processes or human diseases.
Summary
Caryoscope currently provides a flexible method to visualize, explore and create images of microarray data in a genomic context. With such a tool, microarray researchers will be able to answer questions about how genome copy number or genome position plays a role in biological processes or human diseases.Conclusions Caryoscope is a useful, flexible Java application for the visualization of microarray data in a genomic context. It is available as Open Source under the permissive MIT License, allowing anyone to use or modify it.
Conclusions
Caryoscope is a useful, flexible Java application for the visualization of microarray data in a genomic context. It is available as Open Source under the permissive MIT License, allowing anyone to use or modify it.Availability and requirements Project name:  Caryoscope Project home page:  Operating system(s):  Platform independent Programming language:  Java Other requirements:  Java 1.4 or higher License:  MIT License Any restrictions to use by non-academics:  None
Availability and requirements
Project name:  CaryoscopeProject name:Project home page:Project home page:Operating system(s):  Platform independentOperating system(s):Programming language:  JavaProgramming language:Other requirements:  Java 1.4 or higherOther requirements:License:  MIT LicenseLicense:Any restrictions to use by non-academics:  NoneAny restrictions to use by non-academics:Authors' contributions IABA compiled the functional requirements for the Java version of Caryoscope and designed and implemented the software. CAR conceived and wrote the original Perl version of Caryoscope. THB aided and participated in the design of the study, dealt with user support and worked with users to get feedback and suggestions for further development. CAB aided and participated in the design and evaluation of the study and provided feedback and suggestions for future development. GS supervised and participated in the design of the study. All authors read and approved the final version of the manuscript.
Authors' contributions
IABA compiled the functional requirements for the Java version of Caryoscope and designed and implemented the software. CAR conceived and wrote the original Perl version of Caryoscope. THB aided and participated in the design of the study, dealt with user support and worked with users to get feedback and suggestions for further development. CAB aided and participated in the design and evaluation of the study and provided feedback and suggestions for future development. GS supervised and participated in the design of the study. All authors read and approved the final version of the manuscript.