BACKGROUND
repositioning of previously approved drugs is a promising methodology because it reduces the cost and duration of the drug development pipeline and reduces the likelihood of adverse events .
high-throughput repositioning efforts are especially appealing given their ability to yield many potential development opportunities .
a major goal in repositioning is the development of in silico tools that reduce the number of potential candidate molecules to be screened while also suggesting unlikely and novel possibilities.
to this end, a number of groups have developed computational approaches that display high degrees of both sensitivity and specificity  <cit> .
many successful computational repositioning methodologies have relied on comparing individual disease rna-level expression profiles to large databases of pre-generated multi-drug exposure profiles or known gene-drug interactions .
unfortunately, the majority of these methodologies are hindered by their need for specific data types and formats, including requirements for detailed genomic or phenotypic annotations  <cit> , expression levels from a single microarray platform  <cit> , and pre-determined databases of drug-gene interactions  <cit> .
these limitations prevent investigators from utilizing newer profiling technologies, such as rna-seq, and from utilizing alternative or proprietary compound exposure profiles.
despite these drawbacks, numerous successes using these techniques, including the highly cited connectivity map , suggest the utility of a pipeline capable of surpassing these hindrances .
to address these limitations, a universally applicable computational repositioning tool should have flexibility in the types of data sets and databases that can be used.
specifically, we envision such a tool having 1) the ability to interrogate any case/control disease study-derived expression profile, 2) the ability to use any compound database, including those with limited numbers of gene-drug interactions, and 3) an extensible, open-source distribution.
here, we propose a generalized tool for computational repositioning that builds on the successes of previous expression-based repositioning tools while allowing greater flexibility for the investigator called ksrepo.
our methodology modifies the kolmogorov-smirnov  enrichment approach used by the broad connectivity map to enable the use of any expression-level disease study with any database containing, at minimum, gene-drug interactions from any source   <cit> .
the only requirement of our methodology is that there is a common identifier system to which the information from both the disease and exposure databases can be converted .
unlike many popular repositioning tools , we provide source code for ksrepo that enables investigators to extend our methodology as new datatypes become available.
we demonstrated our methodology using five independent freely available prostate cancer datasets  downloaded from the gene expression omnibus   <cit>  and the open-source gene-drug interaction database, the comparative toxicogenomics database   <cit> .fig.
<dig>
ksrepo can use any input data types.
a preparation of arbitrary expression data is accomplished by conversion to entrez id using manufacturer or online annotation tools followed by the user’s preferred algorithm for determining differential gene expression.
b preparation of an arbitrary database only required conversion to entrez id, which is often provided by the database directly
methods
geo dataset processing
all geo datasets were accessed through the ncbi geo portal and analyzed using the integrated geo2r tool  <cit> .
as input for geo2r, we classified each sample within a geo series as either normal tissue or tumor tissue.
geo2r provides a list of all probes  ranked according to their degree of differential expression.
we imported all of the results from geo2r into r  <cit>  and converted all gene aliases into entrezgene identifiers using the org.hs.eg.db r package  <cit> .
the prostate cancer datasets used in this study are gse <dig>  gse <dig>  gse <dig>  gse <dig>  and gse <dig> .
the five prostate cancer datasets were chosen on the basis of three criteria:  the expression profiles were derived from primary prostate cancer cells, as opposed to cell lines or short-term cultures,  there were healthy prostate tissue controls included in the study, and  tissue samples were from fresh-frozen biopsies, and not preserved .
ctd database construction
to generate a ksrepo-compatible database, we first downloaded the entirety of the ctd and imported the database into r .
the ctd contains manually curated compound-gene interactions collected from the primary literature by trained experts  <cit> .
we filtered the full database for literature-supported interactions between compounds and human genes or gene products .
following filtering, the resulting database contained interactions between  <dig> compounds and  <dig>  unique human genes.
of these  <dig> compounds,  <dig> are drugs approved by the fda.
a script for converting the downloadable files from ctd to a ksrepo compatible format is available in the ksrepo github repository .
kolmogorov-smirnov enrichment score calculations
our modified method is analogous to an “inverse” version of the connectivity map implementation in that we compare a single instance  to a number of signatures  rather than comparing a single signature to a number of instances.
in addition, we focus on interaction without directionality to accommodate compound exposure databases with no regulatory component or conflicting regulatory information.
in addition, we consider all genes in the ranked instance gene list regardless of significance to ensure overlap between the instance and signatures.
ks enrichment scores for our method are calculated as follows.
let n be the number of genes in the instance and t be the number of genes in a given signature.
order all n genes in the instance by their differential expression.
construct a vector v of the position  of each signature gene in the instance ordered gene list and sort these components in ascending order such that v is the position of gene j, where j ∈ { <dig> …,t}.
calculate the following values:  <dig> a=maxj=1tjt−vjn   <dig> b=maxj=1tvjn−j−1t and set ks = a if a > b. else set ks = −b.
both a and b quantify differences in the expected distribution of gene ranks  and the observed sample of ranks in the signature.
the value a ∈ u and scales inversely with the meansignature rank ), with deviations proportional to the standard deviation of signature rank; the value b is the inverse of a. if a > b, then the mean signature rank is low, corresponding to enrichment, and we assign a as the ks score.
if b > a, we assign -b as the ks score.
in this way, signatures with highly enriched gene sets are assigned highly positive ks scores, while signatures with unenriched or inversely enriched  are assigned ks scores near zero or negative ks scores respectively.
because our ks test statistic has no empirical distribution, we calculated significance by bootstrapping as follows.
construct a vector l of the number of genes in each signature.
for each unique ℓ in l, generate  <dig>  independent resamples of the instance gene list of length ℓ and calculate ks scores for each resample.
for each signature, compare the observed signatureks score to the corresponding resample with the same number of genes.
set the p value of that signature as the proportion of resample ks scores that exceed the signatureks score and fdr adjust to correct for multiple hypothesis testing  <cit> .
ksrepo implementation
we implemented ksrepo testing in r as a series of four functions.
the core testing function, ks_single, performs ks enrichment testing between the ranked instance gene list and one unranked signature gene list .
bootstrapped p-value calculation is accomplished by the functions boot_ks and boot_p.
the final function included in the implementation, repo, is a wrapper function which calls the other three functions and formats the output.
all four functions are available for non-commercial use from github .
in addition, we provide a comprehensive vignette that demonstrates the use of ksrepo using one of the prostate cancer datasets, gse <dig>  described above.fig.
<dig>
ksrepo employs a generalized k-s enrichment test and bootstrapping to determine candidate repositioning targets.
see methods for a detailed description
RESULTS
we implemented ksrepo, an expression-based, generalized tool for computational drug repositioning.
ksrepo avoids the requirements of currently available methods for specific data inputs .
our methodology is capable of utilizing any pair of disease expression dataset and compound exposure database with the simple constraint that they be mappable to a single, common identifier system.
once an investigator has chosen the two inputs, our method straightforwardly expands the methods of lamb and colleagues  <cit>  to allow for varying numbers and types of gene-compound associations in the exposure database.
we then compute k-s enrichment scores for each compound and report bootstrapped and fdr-corrected p-values for ease of interpretation.
to demonstrate ksrepo’s applicability, we applied our method to five independent prostate cancer datasets  from three distinct microarray platforms, and attempted to detect signal from fda-approved prostate cancer therapies from the ctd.
the ctd reports expert curated gene-compound interactions from the primary literature.
unlike currently available methods , in which a full profile is necessary, ksrepo is able to analyze the ctd and databases like it.
we also note that the use of three distinct microarray platforms precludes the use of some methods , but is possible with ksrepo.
we first identified all fda-approved prostate cancer therapies using drugbank  <cit>  and then determined that out of  <dig> small-molecule therapies, seven  were also included in the ctd.
we then applied ksrepo to the five geo prostate cancer datasets and determined the fdr-corrected p-values for each of the seven annotated therapies in the ctd.
ksrepo predicted on average approximately  <dig> compounds  corresponding to a specificity around 5 %, which is similar to reported specificities for other repositioning strategies .
for each of the five prostate cancer datasets we were able to detect significance for between one and three fda-approved therapies at a fdr-corrected p-value less than  <dig> .
in each case, this represented a significant enrichment for approved therapies .
among compounds, significant prostate cancer therapies ranked on average in the  <dig> th percentile and of the seven therapies, five were significant for at least one of the five datasets.
we did not detect significance for two therapies, aminoglutethimide and estropipate; we hypothesize that due to the nature of the microarray datasets we included , it is unlikely that we would detect secondary hormone modulatory treatments, which are typically used in treatment refractory patients with metastases  <cit> .
these results suggest that ksrepo is a generalized methodology for computational drug repositioning.
even after intentionally reducing the information content presented to our methodology by using a database with a modest number of gene interactors by compound , we were still able to recover many of the fda-approved drugs for prostate cancer.
in addition, we have enabled the use of any microarray platform as input, bypassing an impediment to using a popular repositioning tool, the broad connectivity map.
by allowing investigators to choose any expression study and drug exposure database we hope to spur the analysis of as-yet unexplored diseases and databases.
furthermore, because ksrepo is flexible and generalized, we hope to apply it to a variety of future projects, including the incorporation of other exposure databases such as drugbank  <cit>  and pharmgkb  <cit> , as well as new input types such as mrna-seq and epigenomic information.
CONCLUSIONS
here, we have described ksrepo, a generalized, expression-level tool for computational drug repositioning.
our implementation enables investigators to choose any case/control disease study and exposure database to suit their experimental needs.
to validate our method, we applied ksrepo to five distinct prostate cancer datasets and the comparative toxicogenomics database  and ksrepo successfully detected significance for a majority of fda-approved prostate cancer therapies and significantly enriched for these compounds from the ctd.
our methodology is implemented in an open-source github repository for free use.
future work with ksrepo will focus on exploring as-yet under utilized databases and the possibility of incorporating novel expression and genomic information.
availability and requirements
project name: ksrepo
project home page: http://github.com/adam-sam-brown/ksrepo
operating system: platform independent
programming language: r
license: bsd-3
abbreviations
fdafood and drug administration of the united states of america
ctdcomparative toxicology database
k-skolmogorov-smirnov
geogene expression omnibus
fdrfalse discovery rate
competing interests
the authors declare that they have no competing interests.
authors’ contributions
conceived and designed the methods: asb, swk, ik, cjp.
analyzed and interpreted the data: asb, cjp; drafted the manuscript: asb, cjp.
all authors read and approved the final version of the manuscript.

 repositioning of previously approved drugs is a promising methodology because it reduces the cost and duration of the drug development pipeline and reduces the likelihood of adverse events. high-throughput repositioning efforts are especially appealing given their ability to yield many potential development opportunities. a major goal in repositioning is the development of in silico tools that reduce the number of potential candidate molecules to be screened while also suggesting unlikely and novel possibilities. to this end, a number of groups have developed computational approaches that display high degrees of both sensitivity and specificity. many successful computational repositioning methodologies have relied on comparing individual disease rna-level expression profiles to large databases of pre-generated multi-drug exposure profiles or known gene-drug interactions. unfortunately, the majority of these methodologies are hindered by their need for specific data types and formats, including requirements for detailed genomic or phenotypic annotations, expression levels from a single microarray platform, and pre-determined databases of drug-gene interactions. these limitations prevent investigators from utilizing newer profiling technologies, such as rna-seq, and from utilizing alternative or proprietary compound exposure profiles. despite these drawbacks, numerous successes using these techniques, including the highly cited connectivity map, suggest the utility of a pipeline capable of surpassing these hindrances. to address these limitations, a universally applicable computational repositioning tool should have flexibility in the types of data sets and databases that can be used. specifically, we envision such a tool having 1) the ability to interrogate any case/control disease study-derived expression profile, 2) the ability to use any compound database, including those with limited numbers of gene-drug interactions, and 3) an extensible, open-source distribution. here, we propose a generalized tool for computational repositioning that builds on the successes of previous expression-based repositioning tools while allowing greater flexibility for the investigator called ksrepo. our methodology modifies the kolmogorov-smirnov enrichment approach used by the broad connectivity map to enable the use of any expression-level disease study with any database containing, at minimum, gene-drug interactions from any source. the only requirement of our methodology is that there is a common identifier system to which the information from both the disease and exposure databases can be converted. unlike many popular repositioning tools, we provide source code for ksrepo that enables investigators to extend our methodology as new datatypes become available. we demonstrated our methodology using five independent freely available prostate cancer datasets downloaded from the gene expression omnibus and the open-source gene-drug interaction database, the comparative toxicogenomics database.fig. ksrepo can use any input data types. a preparation of arbitrary expression data is accomplished by conversion to entrez id using manufacturer or online annotation tools followed by the user’s preferred algorithm for determining differential gene expression. b preparation of an arbitrary database only required conversion to entrez id, which is often provided by the database directly methods geo dataset processing all geo datasets were accessed through the ncbi geo portal and analyzed using the integrated geo2r tool. as input for geo2r, we classified each sample within a geo series as either normal tissue or tumor tissue. geo2r provides a list of all probes ranked according to their degree of differential expression. we imported all of the results from geo2r into r and converted all gene aliases into entrezgene identifiers using the org.hs.eg.db r package. the prostate cancer datasets used in this study are gse gse gse gse and gse. the five prostate cancer datasets were chosen on the basis of three criteria: the expression profiles were derived from primary prostate cancer cells, as opposed to cell lines or short-term cultures, there were healthy prostate tissue controls included in the study, and tissue samples were from fresh-frozen biopsies, and not preserved. ctd database construction to generate a ksrepo-compatible database, we first downloaded the entirety of the ctd and imported the database into r. the ctd contains manually curated compound-gene interactions collected from the primary literature by trained experts. we filtered the full database for literature-supported interactions between compounds and human genes or gene products. following filtering, the resulting database contained interactions between compounds and unique human genes. of these compounds, are drugs approved by the fda. a script for converting the downloadable files from ctd to a ksrepo compatible format is available in the ksrepo github repository. kolmogorov-smirnov enrichment score calculations our modified method is analogous to an “inverse” version of the connectivity map implementation in that we compare a single instance to a number of signatures rather than comparing a single signature to a number of instances. in addition, we focus on interaction without directionality to accommodate compound exposure databases with no regulatory component or conflicting regulatory information. in addition, we consider all genes in the ranked instance gene list regardless of significance to ensure overlap between the instance and signatures. ks enrichment scores for our method are calculated as follows. let n be the number of genes in the instance and t be the number of genes in a given signature. order all n genes in the instance by their differential expression. construct a vector v of the position of each signature gene in the instance ordered gene list and sort these components in ascending order such that v is the position of gene j, where j ∈ { …,t}. calculate the following values: a=maxj=1tjt−vjn b=maxj=1tvjn−j−1t and set ks = a if a > b. else set ks = −b. both a and b quantify differences in the expected distribution of gene ranks and the observed sample of ranks in the signature. the value a ∈ u and scales inversely with the meansignature rank ), with deviations proportional to the standard deviation of signature rank; the value b is the inverse of a. if a > b, then the mean signature rank is low, corresponding to enrichment, and we assign a as the ks score. if b > a, we assign -b as the ks score. in this way, signatures with highly enriched gene sets are assigned highly positive ks scores, while signatures with unenriched or inversely enriched are assigned ks scores near zero or negative ks scores respectively. because our ks test statistic has no empirical distribution, we calculated significance by bootstrapping as follows. construct a vector l of the number of genes in each signature. for each unique ℓ in l, generate independent resamples of the instance gene list of length ℓ and calculate ks scores for each resample. for each signature, compare the observed signatureks score to the corresponding resample with the same number of genes. set the p value of that signature as the proportion of resample ks scores that exceed the signatureks score and fdr adjust to correct for multiple hypothesis testing. ksrepo implementation we implemented ksrepo testing in r as a series of four functions. the core testing function, ks_single, performs ks enrichment testing between the ranked instance gene list and one unranked signature gene list. bootstrapped p-value calculation is accomplished by the functions boot_ks and boot_p. the final function included in the implementation, repo, is a wrapper function which calls the other three functions and formats the output. all four functions are available for non-commercial use from github. in addition, we provide a comprehensive vignette that demonstrates the use of ksrepo using one of the prostate cancer datasets, gse described above.fig. ksrepo employs a generalized k-s enrichment test and bootstrapping to determine candidate repositioning targets. see methods for a detailed description  we implemented ksrepo, an expression-based, generalized tool for computational drug repositioning. ksrepo avoids the requirements of currently available methods for specific data inputs. our methodology is capable of utilizing any pair of disease expression dataset and compound exposure database with the simple constraint that they be mappable to a single, common identifier system. once an investigator has chosen the two inputs, our method straightforwardly expands the methods of lamb and colleagues to allow for varying numbers and types of gene-compound associations in the exposure database. we then compute k-s enrichment scores for each compound and report bootstrapped and fdr-corrected p-values for ease of interpretation. to demonstrate ksrepo’s applicability, we applied our method to five independent prostate cancer datasets from three distinct microarray platforms, and attempted to detect signal from fda-approved prostate cancer therapies from the ctd. the ctd reports expert curated gene-compound interactions from the primary literature. unlike currently available methods, in which a full profile is necessary, ksrepo is able to analyze the ctd and databases like it. we also note that the use of three distinct microarray platforms precludes the use of some methods, but is possible with ksrepo. we first identified all fda-approved prostate cancer therapies using drugbank and then determined that out of small-molecule therapies, seven were also included in the ctd. we then applied ksrepo to the five geo prostate cancer datasets and determined the fdr-corrected p-values for each of the seven annotated therapies in the ctd. ksrepo predicted on average approximately compounds corresponding to a specificity around 5 %, which is similar to reported specificities for other repositioning strategies. for each of the five prostate cancer datasets we were able to detect significance for between one and three fda-approved therapies at a fdr-corrected p-value less than. in each case, this represented a significant enrichment for approved therapies. among compounds, significant prostate cancer therapies ranked on average in the th percentile and of the seven therapies, five were significant for at least one of the five datasets. we did not detect significance for two therapies, aminoglutethimide and estropipate; we hypothesize that due to the nature of the microarray datasets we included, it is unlikely that we would detect secondary hormone modulatory treatments, which are typically used in treatment refractory patients with metastases. these results suggest that ksrepo is a generalized methodology for computational drug repositioning. even after intentionally reducing the information content presented to our methodology by using a database with a modest number of gene interactors by compound, we were still able to recover many of the fda-approved drugs for prostate cancer. in addition, we have enabled the use of any microarray platform as input, bypassing an impediment to using a popular repositioning tool, the broad connectivity map. by allowing investigators to choose any expression study and drug exposure database we hope to spur the analysis of as-yet unexplored diseases and databases. furthermore, because ksrepo is flexible and generalized, we hope to apply it to a variety of future projects, including the incorporation of other exposure databases such as drugbank and pharmgkb, as well as new input types such as mrna-seq and epigenomic information.  here, we have described ksrepo, a generalized, expression-level tool for computational drug repositioning. our implementation enables investigators to choose any case/control disease study and exposure database to suit their experimental needs. to validate our method, we applied ksrepo to five distinct prostate cancer datasets and the comparative toxicogenomics database and ksrepo successfully detected significance for a majority of fda-approved prostate cancer therapies and significantly enriched for these compounds from the ctd. our methodology is implemented in an open-source github repository for free use. future work with ksrepo will focus on exploring as-yet under utilized databases and the possibility of incorporating novel expression and genomic information. availability and requirements project name: ksrepo project home page: http://github.com/adam-sam-brown/ksrepo operating system: platform independent programming language: r license: bsd-3 abbreviations fdafood and drug administration of the united states of america ctdcomparative toxicology database k-skolmogorov-smirnov geogene expression omnibus fdrfalse discovery rate competing interests the authors declare that they have no competing interests. authors’ contributions conceived and designed the methods: asb, swk, ik, cjp. analyzed and interpreted the data: asb, cjp; drafted the manuscript: asb, cjp. all authors read and approved the final version of the manuscript. 
source code is freely available at http://github.com/adam-sam-brown/ksrepo. ksrepo successfully predicted significance for five frontline prostate cancer therapies, representing a significant enrichment from over ctd compounds, and achieved specificity similar to other repositioning methods. we tested ksrepo’s performance on a set of five prostate cancer datasets using the comparative toxicogenomics database as our database of gene-compound interactions. a number of promising computational techniques have been developed to aid in repositioning, however, the majority of available methodologies require highly specific data inputs that preclude the use of many datasets and databases. we present ksrepo, which enables investigators to use any data inputs for computational drug repositioning. ksrepo eliminates the need for a single microarray platform as input and allows for the use of a variety of drug and chemical exposure databases.
 repositioning approved drug and small molecules in novel therapeutic areas is of key interest to the pharmaceutical industry. a number of promising computational techniques have been developed to aid in repositioning, however, the majority of available methodologies require highly specific data inputs that preclude the use of many datasets and databases. there is a clear unmet need for a generalized methodology that enables the integration of multiple types of both gene expression data and database schema.  ksrepo eliminates the need for a single microarray platform as input and allows for the use of a variety of drug and chemical exposure databases. we tested ksrepo’s performance on a set of five prostate cancer datasets using the comparative toxicogenomics database as our database of gene-compound interactions. ksrepo successfully predicted significance for five frontline prostate cancer therapies, representing a significant enrichment from over ctd compounds, and achieved specificity similar to other repositioning methods.  we present ksrepo, which enables investigators to use any data inputs for computational drug repositioning. ksrepo is implemented in a series of four functions in the r statistical environment under a bsd license. source code is freely available at http://github.com/adam-sam-brown/ksrepo. a vignette is provided to aid users in performing ksrepo analysis. keywords repositioningdrug discoveryprostate cancergene expressionhttp://dx.doi.org/ /100000002national institutes of health t gm007306-39brown adam s. http://dx.doi.org/ /100000066national institute of environmental health sciencesk99es023504http://dx.doi.org/ /100000052nih office of the directoru54hg007963http://dx.doi.org/ /100001797pharmaceutical research and manufacturers of america foundationn/aissue-copyright-statement© the author 2016 