BACKGROUND
in the functional genomic era, measuring gene functional similarity is a fundamental task because it is the foundation of much essential research such as gene clustering , protein-protein interaction prediction , gene function prediction  and disease gene prioritisation .
comparing functional similarity between genes provides more information for understanding the biological roles and functions of genes, although sometimes it may be less objective compared with sequence and structure similarity  <cit> .
gene ontology  is a standardised and controlled vocabulary of terms that comprises three orthogonal ontologies: cellular component , molecular function  and biological process .
these three ontologies are structured as three directed acyclic graphs , which are also called go graphs sometimes.
semantic similarity applied to the go annotations of gene products provides a measure of their functional similarity.
therefore, functional similarity between genes can be inferred from the semantic relationships of go terms.
in this article, ‘functional similarity’ refers to the similarity between genes or gene products, and ‘semantic similarity’ refers to the similarity between two go terms.
in recent years, many gene functional similarity calculation measures  have been proposed and widely used in biology research.
they are mainly divided into two categories: pairwise approaches and group-wise approaches, both of which must rely on go graphs  <cit> .
pairwise methods measure the gene functional similarity via two steps.
the first step computes the semantic similarities of go term pairs using term comparison techniques.
the second step measures gene functional similarity between genes using the results of semantic similarity scores from the first step.
maximum rule, average rule and best-match average rule  are three kinds of strategies widely used in the second step.
the characteristics of the three rules have been discussed in detail  <cit> .
in contrast, group-wise methods measure gene functional similarity by comparing the terms that annotate the genes in groups.
overall, there are three types of approaches for measuring the functional similarities of genes: set, graph and vector  <cit> .
however, the common issue of current functional similarity calculation methods is time consumption, especially when they measure similarity on a whole genomic scale.
there are two main reasons for the low computational efficiency, which becomes very prominent.
one is that more and more go terms are added into the go graphs because of the daily evolution of the go database.
the other is that the number of annotated genes in the gene ontology annotation  database has greatly increased.
although some online tools  have achieved great success on a variety of applications such as constructing gene semantic similarity networks  <cit>  and disease gene prioritisation , few of them pay attention to the problem of computational efficiency.
thus, improving the computational efficiency of functional similarity methods has become a challenging problem.
in the remainder of this section, we review seven typical methods that use the proposed strategy and some other methods.
these methods include those of resnik  <cit> , lin  <cit> , jiang and conrath   <cit> , pekar and staab   <cit>  and wang et al.
<cit> , which are pairwise approaches, and simui  <cit>  and simgic  <cit> , which are group-wise approaches.
it should be noted that we emphasise the analysis of semantic similarity between terms for pairwise approaches and highlight functional similarity between genes for group-wise approaches.
the methods of resnik, lin and jiang belong to node-based approaches, which rely on comparing the properties of terms in the go graph.
one concept commonly used in these approaches is information content , which gives a measure of how specific and informative a term is.
the ic of a term t can be quantified as the negative log likelihood:  <dig> ict=−log is the probability of occurrence of t in a specific corpus  being normally estimated by its frequency of annotation  <cit> .
according to eq.
, terms that are more genetic will have a larger p  and hence a smaller ic value.
when applying this traditional measure, one important problem is that the specificity of a term is fully dependent on the number of genes taken in a given annotation corpus  <cit> .
the detail definition of p  can be represented by eq.
.
<dig> pt=annotationt+∑d∈descendenttannotationd∑c∈descendentrootannotationc
here, annotation  is the number of genes annotated by term t, and descendent  is a term set that contains descendants of t in the go graph.
resnik  <cit>  elaborated that edges do not represent the same uniform distance in the go graph because the terms at the same level do not have the same specificity.
some terms in the go graph have more children even though they belong to the same level.
therefore, an ic value of the term t in the go graph can be used as a metric to measure the relationship between terms.
resnik defined the similarity between two terms t
<dig> and t
<dig> as the ic value of the lowest common ancestor term , which was given as follows:  <dig> simresnikt1t2=iclcat1t <dig>
according to eq.
, the similarity between two terms only depends on the ic value of their lca.
sometimes, lca is also called the most informative common ancestor.
lin  <cit>  pointed out one serious drawback of the resnik method, which is that two different pairs of terms that locate on different levels in the go graph will have the same lca, so they have the same similarity value.
apparently, this is not a reasonable result that meets the human perspective.
therefore, both lin and jiang invented two other measures, which are formulated as eqs.
and , respectively:  <dig> simlint1t2=2∗iclcat1t2ict1+ict <dig>
<dig> simjct1t2=1−ict1+ict2−2×ictlca
as is pointed out by wang  <cit> , the methods of both lin and jiang have the problem of “shallow annotation”, i.e.
if two genes are well annotated near the root of the ontology, their semantic similarity will always be measured very highly , and their semantic distance will always be computed close to nil, thus providing a misleading result.
in contrast, edge-based approaches are also popular in measuring semantic similarity between go terms.
pekar  <cit>  proposed a measure based on the length of the longest path between the lowest common ancestor of two terms and the root, and on the length of the longest path between each term and their common ancestor.
this is given by the following expression:  <dig> simpst1t2=δtarootδtaroot+δt1root+δt2root
where δ denotes the longest distance between term t
<dig> and term t
<dig> in the go graph, and t
a is the lca of t
<dig> and t
<dig>  three distances are used in eq.
, and thus the functional similarity computed by this method is more reasonable than that of resnik’s results.
in addition, cheng et al.
<cit>  proposed a maximum common ancestor depth measure and weighted each edge to reflect its depth.
wu et al.
<cit>  introduced the distance to the nearest leaf node of a term and the distance to the lca to take the specificity of terms into account.
wang  <cit>  developed a hybrid method in which the edge was assigned a fixed weight named the semantic contribution factor  according to the type of relationship in the go database.
a go term a is represented as a dag dag
a = , a sub-graph of go where t
a is the set of all ancestors for term a, and e
a is the set of corresponding links.
the contribution of any term t to the semantics of a term a is defined as the s-value of the term t related to term a, which can be represented by  <dig> sat=1ift=asat=maxwe∗sat′t′∈chilrenoftift≠a
where  is the semantic contribution factor for edge e∈ea linking term t with its child term t′  <cit> .
then, we calculate the semantic value of the go term a, sv, which is represented as:  <dig> sva=∑t∈tasat
given dag
a =  and dag
b =  for go terms a and b, respectively, the semantic similarity between them, s
go, is defined as:  <dig> sgoab=∑t∈ta∩tbsat+sbtsva+svb
where s
a is the s-value of go term t related to term a, and s
b is the s-value of go term t related to term b. there are two main disadvantages of wang’s method.
one is that the semantic contribution factor  is fixed according the linking types of go terms, and the other is that the semantic contribution only depends on the maximum products of all of the paths linking the two terms.
according to eqs.
and , computing the sv and sv is difficult because they have to traverse their corresponding dgas of term a and b, respectively.
as for group-wise approaches, pesquita et al.
<cit>  pointed out that purely set-based approaches are not common because few measures consider only direct annotations, whereas graph-based approaches are suitable for computing the similarity with the help of graph matching.
indeed, simui and simgic are two typical group-wise methods that measure gene functional similarity from the graph-based perspective.
to compute gene functional similarity, these methods usually make use of tversky’s ratio model or its variants.
genes g
<dig> and g
<dig> are annotated with term sets a
g1 = {t
<dig>  t
<dig>  ⋯ t
m} and a
g2 = {t
<dig>  t
<dig>  ⋯ t
n}, respectively.
therefore, simui calculates similarity as the number of go terms shared by two genes divided by the number of go terms they have together.
the functional similarity between g
<dig> and g
<dig> is  <dig> simuig1g2=ag1∩ag2ag1∪ag <dig>
according to  <cit> , simgic is an expansion of simui that sums the ic value of annotation terms.
for two genes g
<dig> and g
<dig>  simgic is given by  <dig> simgicg1g2=∑ti∈ag1∩ag2icti∑tj∈ag1∪ag2ictj
although simui does not consider the specificity of the term in the go graph, simgic takes the ic value of a term as its specificity.
as pointed out by teng et al.
<cit> , simgic ignores the shared ic value of two terms in the go graph and may also result in misjudgements of gene functional similarity.
teng et al.
<cit>  proposed a new method called sora  to overcome the limitations of simgic.
however, obtaining a and a from the go graph directly for group-wise methods is also difficult and time consuming.
the rest of this paper is organised as follows.
in the methods section, we begin by analysing the problems leading to high time consumption of each method.
in the following subsections, we describe how to speed the gene functional similarity calculation methods based on hash tables.
then, taking wang’s method as an example, we show how to establish the hash table and measure the functional similarity with the table.
finally, complexity analysis is presented for each method.
in the results section, we present the experimental results, including the running times to establish hash tables and measure the semantic similarity between go terms and the functional similarity between genes.
we also compare the developed speeding gene functional similarity calculation tool  with other online tools.
in the discussion section, we discuss the implications and limitations of our method, and finally, we draw our conclusions in the conclusions section.
methods
in this section, we first analyze what factors affect computational efficiency and establish a hash table to speed the gene functional similarity calculation for each method.
then we take wang’s method as an example to show how to speed the computing process using the proposed strategy.
finally, we present a complexity analysis for each method adopting our proposed strategy.
analysing the problems leading to time consumption for each method
methods that measure gene functional similarity must traverse the go graph repeatedly to obtain the information they need.
however, traversing the go graph is time consuming because the topological structure of the go graph is complex due to multiple inheritances of go.
in addition, the problem of low computational efficiency tends to be more prominent, especially when gene functional similarity needs to be measured on the genomic scale.
to speed the gene functional similarity calculation, we should analyse the calculation process of each method and then determine the key information that affects the computational efficiency.
it is need to calculate key information that lead to traversing the go graph repeatedly for these methods.
the key information for each method is listed in table  <dig>  ic denotes the ic value of term t; lca denotes the lowest common ancestor of terms t
<dig> and t
2; dep denotes the deepest depth of term t in the go graph; sv denotes the semantic value of term t; and a denotes the term set containing all of the terms that annotate gene g.table  <dig> key information affecting computational efficiency for each method
for pairwise approaches, we focus on the semantic similarity between t
<dig> and t
<dig>  for group-wise approaches, the functional similarity between gene g
<dig> and g
<dig> requires special attention
for example, with the resnik method, determining the lca of terms t
<dig> and t
<dig> from the go graph requires traversing of the dags of t
<dig> and t
<dig>  respectively.
the method also has to calculate the ic of each term in the dags to obtain the ic of lca.
therefore, the key information that affects computational efficiency in the resnik method is lca and ic).
the key information for the other methods is also listed in table  <dig>
speeding the gene functional similarity calculation for each method
as we know, traversing the go graph repeatedly is the main reason for the reduced computational efficiency of each method.
therefore, if we can avoid traversing the go graph repeatedly, the computational efficiency for each method will improve greatly.
hence, we can convert the storage form of information from the go graph into a hash table.
then, these methods could measure the functional similarity based on the hash tables instead of traversing the go graph, eventually reaching the goal of improving computational efficiency.
as a result, we propose a novel two-step computing strategy:  establish hash tables to store essential information that is obtained from the go graph and  measure gene functional similarity based on the hash tables.
the flowchart of our proposed strategy is shown in fig.
<dig>  for ease of description, two definitions are given below.fig.
<dig> the flowchart of the proposed strategy
definition  <dig>  direct information: information that occurs in corresponding equations for each method.
for example, the ic values of lca, ic and ic are direct information for eq.
.
definition  <dig>  essential information: information that will be stored in the corresponding hash tables.
for example, the ancestors of term t
<dig>  t
<dig> and their corresponding ic values are essential information for eq.
.
it is important to note that the essential information should have the ability to substitute the go graph.
this is critical for the proposed strategy.
therefore, before using our proposed strategy, each method must first analyse the direct information and extract the essential information from the original go graph.
the direct information and essential information of pairwise approaches for measuring semantic similarity between t
<dig> and t
<dig> are shown in table  <dig>  t denotes the ancestor set of term t including t itself.
s
a is the s-value of go term t related to term a. the direct information and essential information of group approaches for measuring functional similarity between genes g
<dig> and g
<dig> are also shown in table  <dig>  a denotes a term set containing all of the terms that annotate gene g. in the next subsection, we take the wang method as an example to show how to establish the hash table for each method.table  <dig> direct information and essential information for each method
t2), t ∈ t
t1 ∩ t
t2
st1t,t∈tt1st2t,t∈tt2
∑ict,t∈agi∩agj∑ict,t∈agi∪agj
ict <dig> t1∈agiict <dig> t2∈agj
finally, why do we select the hash table as the data structure to store the essential information extracted from the go graph?
a hash table is a commonly used data structure that satisfies the requirement for quick searches.
its search efficiency is very high, and its structure is also convenient to program and implement.
what’s more, with the help of the hash tables, there is no need to repeatedly traverse the go graph to obtain direct information.
each method can obtain essential information from the hash table and calculate the direct information by making use of the essential information.
as a result, the computational efficiency increases dramatically.
speeding the calculation of functional similarity for the wang method
in this subsection, we take wang’s method as an example to show how to speed the functional similarity calculation.
the main idea is illustrated in fig.
<dig>  the proposed strategy comprises two main steps.fig.
<dig> the main idea of the proposed strategy adopted for the wang method.
a depicts a dag for go term intracellular membrane-bound organelle:  <dig>  b depicts the hash table established from .
each row in  is called a record.
for each record, the key of the record is the id of the go term, and the value of the record is a link list that contains all of the s-values of the key.
for each term in , there is a corresponding record in .
we can obtain the essential information from the hash table directly instead of from the dag in .
the proposed strategy converts the storage form of information from the go graph into hash tables to speed the calculation process
step one: establish a hash table for the wang method
according to eq.
, measuring the semantic similarity between two terms a and b is only based on three parts: sv, sv and the numerator of eq.
.
with further analysis, we fortunately find that the values of sv and sv are only dependent on the s-values for all terms in daga and the s-values for all terms in dagb, respectively.
besides, the numerator of eq.
can also be calculated quickly based on the s-values of terms a and b.
from the analysis above, s
a, t ∈ t and s
b, t ∈ t are essential information for eq.
.
to adopt the proposed strategy for calculating eq.
, we can compute all of the s-values of a and b in their corresponding dags and then store the results into a hash table.
the s-values for go: <dig> are listed in table  <dig>  the hash table is established based on fig.
2a.table  <dig> s-values for go terms in the dag for intracellular membrane-bound organelle: 0043231
step two: measure the gene functional similarity based on the hash table
once the hash table is established, measuring the semantic similarity is based on the hash table instead of the go graph.
in other words, because the hash table contains all of the essential information that eq.
needs, the wang method can obtain the information needed directly from the hash table.
after obtaining the semantic similarity between go pairs, it can use the bma rule to further measure the functional similarity between two genes.
in fig.
2a represents a dag for the go term intracellular membrane-bound organelle:  <dig>  and  represents the hash table established on the basis of .
the semantic contribution factors for the ‘is-a’ and ‘part-of’ relations are  <dig>  and  <dig> , respectively.
we use eq.
to calculate all of the s-values for term go: <dig> and list the results in table  <dig>  the storage form for term go: <dig> is listed in the last row of fig.
2b.
for the other terms in fig.
2a, the handling process is similar to term go: <dig>  the results are also listed in fig.
2b.
it is noteworthy that the order of records shown in fig.
2b may differ from the actual order because of the special storage features of hash tables.
example: measuring the semantic similarity for the wang method
we take two terms go: <dig>  named a, and go: <dig>  named b, as an example to measure the semantic similarity based on the hash table.
the relationship between a and b can be obtained from fig.
2a.
the semantic similarity of the two terms a and b is calculated in three steps based on the hash table as follows: sva= <dig> + <dig> + <dig> = <dig>
svb= <dig> + <dig> + <dig> = <dig>
∑t∈ta∩tbsat+sbt=sa0005575+sb0005575= <dig> + <dig> = <dig>
therefore, the semantic similarity between terms a and b is: sgoab=∑t∈ta∩tbsat+sbtsva+svb= <dig> .44+ <dig> = <dig>
because the s-values of terms a and b can be obtained directly from the hash table represented in fig.
2b, there is no need to search the dags of terms a and b. therefore, the computational efficiency of measuring the semantic similarity has sharply improved.
the proposed strategy has achieved the desired result.
to obtain the corresponding hash table from the go graph for the wang method, we design an algorithm for establishing the hash table, namely eht.
the algorithm is described in fig.
<dig>  to simplify the description of the algorithm, we briefly explain the notations used in the algorithm.
an adjacency matrix m represents one of three go graphs mf, bp and cc.
rht represents the hash table that stores the essential information extracted from the go graph.
ddec represents a set that contains all of the direct descendants of term t, and danc represents a set that contains all of the direct ancestors of term t.fig.
<dig> the algorithm for establishing a hash table from the go graph for the wang method
complexity analysis
without loss of generality, suppose there are m pairs of genes that require computation of their functional similarities.
each gene has been annotated by an average k go terms.
there are n go terms in the go graph totally.
each pairwise approach uses the bma rule to measure gene functional similarity.
the time complexity for the seven methods is listed in table  <dig> table  <dig> time complexity for measuring gene functional similarity of each method
in step one, we can find that the time complexity for each method has no relationship with m. the time complexity for establishing the hash table is relatively low.
in step two, once the hash tables are established, the efficiency of measurement of the gene functional similarity will be improved.
it is noteworthy that the total time complexity for each gene functional similarity method equals the time complexity of step two as long as the go graph remains unchanged.
to further differentiate sgfsc from other tools in terms of time complexity, we also list the time complexity when our proposed strategy is not adopted.
from the table  <dig>  we can find that, if m ≫ n, sgfsc has a higher computational efficiency comparing with other methods that don’t adopt the proposed strategy.
regarding space complexity, the proposed strategy occupies some memory space to store the hash tables.
suppose the storage space of a go term is l, then the space complexity for storing the hash table is o. the actual amount of memory required to store the hash table is about 5 mb, which has been verified through experimentation.
there is no doubt that it will be quicker to store and read the hash table on a laptop computer.
RESULTS
in this section, we provide the running time to establish the hash table from the go graph first.
then by using the proposed strategy, the time needed to measure the semantic similarity between term pairs is listed in table  <dig>  the results of measuring gene functional similarities on the whole genomic scale for model organisms are listed in table  <dig>  the results of comparisons with other tools are listed in tables  <dig> and  <dig> table  <dig> time in seconds required to establish the hash table for each method on bp, cc and mf ontologies
102
running time to establish hash tables for each method
the key goal of the strategy is to extract the essential information from the go graph and then establish a hash table to replace the go graph.
therefore, we provide the running times to establish the hash table for each method in table  <dig> table  <dig> running time in seconds for each tool to measure gene functional similarity
102
from the results, we can find that sgfsc can establish the hash table within a few minutes.
for example, the running times for the resnik method on bp, cc and mf ontologies are 441 s, 264 s and 379 s, respectively.
the running times of the other methods are close to those of the resnik method, indicating that the computational efficiency of the proposed strategy for establishing the hash table is high.
sgfsc is efficient in updating the content of the hash tables.
therefore, sgfsc is well adapted to the daily evolution of the go database, which may change with the deletion of obsolete terms and the addition of new terms.
it should be noted that the hash tables for the resnik, lin and jiang methods are the same.
the experiments were conducted on windows with an i5-2600 k cpu @  <dig>  ghz with 16 gb memory.
running time to measure semantic similarity for each method
for pairwise approaches, measuring the functional similarity between genes is mainly dependent on the sematic similarity between term pairs.
therefore, the computational efficiency of sematic similarity plays a key role in the pairwise methods.
we randomly select  <dig> term pairs that are related to all of the terms in the corresponding go graphs for the bp, mf and cc ontologies.
the computing time for each method on bp, mf and cc graphs is listed in table  <dig>  for example, the running times for the wang method on bp, cc and mf ontologies are  <dig>  s,  <dig>  s and  <dig>  s, respectively.
because the bp ontology has the most terms, its running time is longer than that of the mf and cc ontologies.
the results show that sgfsc can complete the calculation within a few seconds.
in addition, the bar plots of running time for each method are presented in fig.
<dig>  we can clearly find that the computation time is within 10s.fig.
<dig> bar plots of running time in measuring semantic similarity between term pairs
running time to measure gene functional similarity for each method
to give a comprehensive comparison of the computational efficiency of each method, we select annotation data of five organisms representing human, arabidopsis, yeast, rat and oryza.
in table  <dig>  the number of annotated genes, number of average annotations for each gene, number of gene pairs and the running time in seconds for seven typical methods are presented for the corresponding ontologies of bp, cc and mf of five organisms.
the experiments select annotation data for five model organisms: human, arabidopsis, yeast, rat and oryza.
the uniprot-goa data for each species were downloaded from http://geneontology.org/page/download-annotations in august  <dig>  number of gene pairs refers to the number of gene pairs that will be measured for gene functional similarity using sgfsc.
we obtain the gene pairs by combining all of the annotated genes in the goa database.
the experiments were conducted on linux with an e5- <dig> cpu @ <dig>  ghz and 64 gb memory.
for each organism, sgfsc computes the respective functional similarity on bp, cc and mf ontologies.
for the whole genomic scale of human, the experimental results show that the computing time for each method is no more than 11 h. for the other organisms, the computing time is shorter  because the number of gene pairs and the number of average annotations of genes are relatively smaller.
for example, the number of annotated genes for the human in bp ontology is  <dig>  whereas that for yeast is  <dig>  therefore, the running time for the two organisms is greatly different.
however, the running times of sgfsc for all selected organisms are within an acceptable range.
therefore, sgfsc shows its outstanding advantage for measuring functional similarity on the genomic scale.
even more, it has the ability to measure the similarity of a combination of all annotated genes in the goa database for the model organisms.
the proposed strategy thus can effectively solve the problem of large-scale computing of gene functional similarity.
to represent the experimental results more intuitive, we add two bar plots which are depicted using figs.
<dig> and  <dig>  figure  <dig> is the bar plots for running time using wang method on selected organisms.
wang method can finish the gene functional similarity calculation on the genome scale for all selected organism in a relatively short time.
figure  <dig> shows the running time for each selected method on human genome scale.
results also indicates that all these methods can complete the calculation in an acceptable period of time.fig.
<dig> bar plots for running time in measuring gene functional similarity using wang method on each organism
fig.
<dig> bar plots for running time for each method in measuring functional similarity on human genomic scale
comparison with other tools
to compare the computational efficiency of sgfsc with other tools, we select two tools: gfsat  <cit>  and gosemsim  <cit> .
these two tools can be conveniently installed on a laptop, and therefore, we can accurately measure running times.
it is difficult to accurately measure the running times of other tools because they can only be used online.
therefore, we decided to compare running time of these two tools only.
we use the running time to compute the similarities of a large number of term pairs and gene pairs to evaluate the computational efficiency of these three tools.
in the experiment, we use sgfsc, gfsat and gosemsim to compute the similarities of three sets of term pairs and gene pairs, respectively.
the numbers of term pairs and gene pairs in these sets are both  <dig>   <dig> and  <dig>  respectively.
the experiments were conducted on windows with an i5-2600 k cpu @  <dig>  ghz and 16 gb memory.
the go data in table  <dig> were downloaded in august  <dig>  and the term pairs were randomly generated from the mf ontology.
the wang method was used for each tool.
the goa data in table  <dig> of arabidopsis was downloaded in august  <dig>  we selected the well-annotated genes and then generated gene pairs for testing.
the wang method was also used for each tool.
‘x’ in tables  <dig> and  <dig> indicates that the process took >12 h.
the running time of each tool to measure the semantic similarity results is listed in table  <dig>  the running times of gfsat and gosemsim to measure the semantic similarity of  <dig> term pairs were 6387 s and 3634 s, respectively, whereas that for sgfsc took only 2 s. furthermore, the running times of both gfsat and gosemsim to calculate  <dig> term pairs were greater than 12 h, whereas that for sgfsc was only  <dig>  s.
the running time of each tool to measure gene functional similarity is listed in table  <dig>  similar to the findings for semantic similarity, sgfsc performed considerably better than the other two tools on the similarity calculation of gene pairs.
the running time of sgfsc was 29 s for  <dig> gene pairs, whereas gfsat and gosemsim required 36154 s and 13056 s, respectively.
as the results clearly show, in comparison with the other two tools, sgfsc has a considerable speed advantage especially when calculating a large number of gene pairs.
besides, we add one merged bar plots figure for tables  <dig> and  <dig>  figure 7a and b show the running time of measuring semantic similarity on  <dig> and  <dig> term pair datasets.
figure 7c and d depict the running time of measuring gene functional similarity on  <dig> and  <dig> gene pair datasets respectively.
all of the four subfigures clearly show the advantages of sgfsc in the computation time.
therefore, our proposed strategy achieves the desired results in speeding up the gene functional similarity calculation.fig.
<dig> bar plots for running time on different datasets using sgfsc, gfsat and gosemsim
discussion
first, we emphasise that the aim of the proposed two-step strategy is only to speed up the methods used to measure gene functional similarity because these methods tend to be time consuming if they are not implemented with a proper data structure.
the problem may be extremely prominent especially when gene functional similarity needs to be measured on the genome scale for some applications.
therefore, the proposed strategy for speeding up the functional similarity calculation is quite meaningful.
second, the proposed two-step strategy adopts hash tables as the data structure to store essential information to avoid traversing the go graph.
furthermore, the hash table is used only to satisfy the requirement of a quick search.
hence, the computational efficiency of these methods improves significantly.
we particularly highlight that the computational efficiency for these methods varies widely according to different data structures and implementation strategies.
therefore, it is critical to choose an appropriate implementation strategy to increase the computational efficiency of these methods.
third, we also implemented an online tool, sgfsc, for adoption of the two-step strategy.
the sgfsc could speed the functional similarity calculation methods on the whole genomic scale.
however, there are some other issues need to note.
precision
sgfsc extracts the essential information for each method from the go graph and then establish hash tables, which have a special structure to store the information.
therefore, the precision of the final computing result is not lost with sgfsc because the function of the hash tables is only to store intermediate results to avoid repeatedly traversing the go graph for each method.
correctness
sgfsc was implemented with seven typical methods.
it is not difficult to understand that sgfsc only achieves the computation speeds with these methods when our proposed two-step strategy is used.
the computing process of the original methods is unchanged.
therefore, the computing results of sgfsc are identical to those of other tools if the same versions of the go and goa databases are used.
as a result, the computing results are absolutely correct.
space
because sgfsc adopts a two-step computing strategy, it first needs to read the hash table into memory.
therefore, it occupies some additional memory space compared with other tools that do not adopt the proposed strategy.
experimentation showed that the memory space for storing the hash table is about 5 mb.
the continuing development of computer hardware technology has made this a simple problem to solve.
the core idea of the strategy comes from making the best use of memory space to reduce the computing time, which is widely used in computer science.
application
sgfsc offers powerful computational capability to compute gene functional similarity on a genomic scale.
we have provided a friendly online tool for the convenient use of sgfsc.
in addation, our proposed strategy also offers good versatility for use in other research.
for example, in the area of natural language process research, because the size of the wordnet is large, computing the ic value of a concept is also time consuming.
therefore, researchers measuring the semantic similarity between concepts could adopt our proposed two-step strategy to improve computational efficiency.
drawback
to speed up the gene functional similarity calculation, sgfsc first has to read the corresponding information hash table into memory, which will take a few seconds.
therefore, the computational efficiency of sgfsc is lower than that of other tools if the number of gene pairs requiring measurement of functional similarity is small.
therefore, the outstanding advantage of sgfsc is in its measurement of gene functional similarity for a large number of gene pairs.
CONCLUSIONS
first, a novel two-step computing strategy is proposed to speed up gene functional similarity calculation.
these methods measure gene functional similarity based on hash tables.
therefore, the time complexity is obviously decreased because there is no need to traverse the go graph repeatedly, which primarily affects the computational efficiency.
second, we have implemented an online tool called sgfsc that is bundled with seven typical gene functional similarity calculation methods and is freely available at http://nclab.hit.edu.cn/sgfsc.
the computational efficiency of sgfsc offers a significant improvement in computing time.
our experiments show that sgfsc has a great advantage in measuring gene functional similarity on the whole genomic scale.
third, the key point in our proposed strategy is the transformative idea that the information required can be obtained directly from the hash tables instead of the original go graph.
the proposed strategy converts the storage form of information from a go graph into a hash table structure that can meet the requirements of a quick query.
as a result, the proposed strategy achieved a desired result.
the proposed strategy may also be applied to other areas of bioinformatics to improve computational efficiency.
none.
funding
m. guo is supported by the national natural science foundation of china .
c. wang is supported by the natural science foundation of china  and x. liu is supported by the natural science foundation of china .
availability of data and material
the dataset supporting the conclusions of this article were downloaded from the relevant public databases.ontology data: we downloaded the gene ontology data from the gene ontology database  containing  <dig>  ontology terms subdivided into  <dig>  cellular components,  <dig>  biological process and  <dig>  molecular function terms.
go annotation data: we downloaded gene annotations for go terms from the gene ontology database for s. cerevisiae and h. sapiens .
home page: http://nclab.hit.edu.cn/sgfsc
authors’ contributions
zt proposed the idea, implemented the experiments and drafted the manuscript.
mg initiated the idea, conceived the whole process and finalised the paper.
zt, cw and xl helped with data analysis and revised the manuscript.
all authors have read and approved the final manuscript.
competing interests
the authors declare that they have no competing interests.
consent for publication
not applicable.
ethics approval and consent to participate
the human go annotations are publicly available to all researchers and are free of academic usage fees.
there are no ethics issues.
no human participants or individual clinical data are involved with this study.

 in the functional genomic era, measuring gene functional similarity is a fundamental task because it is the foundation of much essential research such as gene clustering, protein-protein interaction prediction, gene function prediction and disease gene prioritisation. comparing functional similarity between genes provides more information for understanding the biological roles and functions of genes, although sometimes it may be less objective compared with sequence and structure similarity. gene ontology is a standardised and controlled vocabulary of terms that comprises three orthogonal ontologies: cellular component, molecular function and biological process. these three ontologies are structured as three directed acyclic graphs, which are also called go graphs sometimes. semantic similarity applied to the go annotations of gene products provides a measure of their functional similarity. therefore, functional similarity between genes can be inferred from the semantic relationships of go terms. in this article, ‘functional similarity’ refers to the similarity between genes or gene products, and ‘semantic similarity’ refers to the similarity between two go terms. in recent years, many gene functional similarity calculation measures have been proposed and widely used in biology research. they are mainly divided into two categories: pairwise approaches and group-wise approaches, both of which must rely on go graphs. pairwise methods measure the gene functional similarity via two steps. the first step computes the semantic similarities of go term pairs using term comparison techniques. the second step measures gene functional similarity between genes using the results of semantic similarity scores from the first step. maximum rule, average rule and best-match average rule are three kinds of strategies widely used in the second step. the characteristics of the three rules have been discussed in detail. in contrast, group-wise methods measure gene functional similarity by comparing the terms that annotate the genes in groups. overall, there are three types of approaches for measuring the functional similarities of genes: set, graph and vector. however, the common issue of current functional similarity calculation methods is time consumption, especially when they measure similarity on a whole genomic scale. there are two main reasons for the low computational efficiency, which becomes very prominent. one is that more and more go terms are added into the go graphs because of the daily evolution of the go database. the other is that the number of annotated genes in the gene ontology annotation database has greatly increased. although some online tools have achieved great success on a variety of applications such as constructing gene semantic similarity networks and disease gene prioritisation, few of them pay attention to the problem of computational efficiency. thus, improving the computational efficiency of functional similarity methods has become a challenging problem. in the remainder of this section, we review seven typical methods that use the proposed strategy and some other methods. these methods include those of resnik, lin, jiang and conrath, pekar and staab and wang et al., which are pairwise approaches, and simui and simgic, which are group-wise approaches. it should be noted that we emphasise the analysis of semantic similarity between terms for pairwise approaches and highlight functional similarity between genes for group-wise approaches. the methods of resnik, lin and jiang belong to node-based approaches, which rely on comparing the properties of terms in the go graph. one concept commonly used in these approaches is information content, which gives a measure of how specific and informative a term is. the ic of a term t can be quantified as the negative log likelihood: ict=−log is the probability of occurrence of t in a specific corpus being normally estimated by its frequency of annotation. according to eq., terms that are more genetic will have a larger p and hence a smaller ic value. when applying this traditional measure, one important problem is that the specificity of a term is fully dependent on the number of genes taken in a given annotation corpus. the detail definition of p can be represented by eq.. pt=annotationt+∑d∈descendenttannotationd∑c∈descendentrootannotationc here, annotation is the number of genes annotated by term t, and descendent is a term set that contains descendants of t in the go graph. resnik elaborated that edges do not represent the same uniform distance in the go graph because the terms at the same level do not have the same specificity. some terms in the go graph have more children even though they belong to the same level. therefore, an ic value of the term t in the go graph can be used as a metric to measure the relationship between terms. resnik defined the similarity between two terms t and t as the ic value of the lowest common ancestor term, which was given as follows: simresnikt1t2=iclcat1t according to eq., the similarity between two terms only depends on the ic value of their lca. sometimes, lca is also called the most informative common ancestor. lin pointed out one serious drawback of the resnik method, which is that two different pairs of terms that locate on different levels in the go graph will have the same lca, so they have the same similarity value. apparently, this is not a reasonable result that meets the human perspective. therefore, both lin and jiang invented two other measures, which are formulated as eqs. and, respectively: simlint1t2=2∗iclcat1t2ict1+ict simjct1t2=1−ict1+ict2−2×ictlca as is pointed out by wang, the methods of both lin and jiang have the problem of “shallow annotation”, i.e. if two genes are well annotated near the root of the ontology, their semantic similarity will always be measured very highly, and their semantic distance will always be computed close to nil, thus providing a misleading result. in contrast, edge-based approaches are also popular in measuring semantic similarity between go terms. pekar proposed a measure based on the length of the longest path between the lowest common ancestor of two terms and the root, and on the length of the longest path between each term and their common ancestor. this is given by the following expression: simpst1t2=δtarootδtaroot+δt1root+δt2root where δ denotes the longest distance between term t and term t in the go graph, and t a is the lca of t and t three distances are used in eq., and thus the functional similarity computed by this method is more reasonable than that of resnik’s results. in addition, cheng et al. proposed a maximum common ancestor depth measure and weighted each edge to reflect its depth. wu et al. introduced the distance to the nearest leaf node of a term and the distance to the lca to take the specificity of terms into account. wang developed a hybrid method in which the edge was assigned a fixed weight named the semantic contribution factor according to the type of relationship in the go database. a go term a is represented as a dag dag a =, a sub-graph of go where t a is the set of all ancestors for term a, and e a is the set of corresponding links. the contribution of any term t to the semantics of a term a is defined as the s-value of the term t related to term a, which can be represented by sat=1ift=asat=maxwe∗sat′t′∈chilrenoftift≠a where is the semantic contribution factor for edge e∈ea linking term t with its child term t′. then, we calculate the semantic value of the go term a, sv, which is represented as: sva=∑t∈tasat given dag a =  and dag b =  for go terms a and b, respectively, the semantic similarity between them, s go, is defined as: sgoab=∑t∈ta∩tbsat+sbtsva+svb where s a is the s-value of go term t related to term a, and s b is the s-value of go term t related to term b. there are two main disadvantages of wang’s method. one is that the semantic contribution factor is fixed according the linking types of go terms, and the other is that the semantic contribution only depends on the maximum products of all of the paths linking the two terms. according to eqs. and, computing the sv and sv is difficult because they have to traverse their corresponding dgas of term a and b, respectively. as for group-wise approaches, pesquita et al. pointed out that purely set-based approaches are not common because few measures consider only direct annotations, whereas graph-based approaches are suitable for computing the similarity with the help of graph matching. indeed, simui and simgic are two typical group-wise methods that measure gene functional similarity from the graph-based perspective. to compute gene functional similarity, these methods usually make use of tversky’s ratio model or its variants. genes g and g are annotated with term sets a g1 = {t  t  ⋯ t m} and a g2 = {t  t  ⋯ t n}, respectively. therefore, simui calculates similarity as the number of go terms shared by two genes divided by the number of go terms they have together. the functional similarity between g and g is simuig1g2=ag1∩ag2ag1∪ag according to, simgic is an expansion of simui that sums the ic value of annotation terms. for two genes g and g simgic is given by simgicg1g2=∑ti∈ag1∩ag2icti∑tj∈ag1∪ag2ictj although simui does not consider the specificity of the term in the go graph, simgic takes the ic value of a term as its specificity. as pointed out by teng et al., simgic ignores the shared ic value of two terms in the go graph and may also result in misjudgements of gene functional similarity. teng et al. proposed a new method called sora to overcome the limitations of simgic. however, obtaining a and a from the go graph directly for group-wise methods is also difficult and time consuming. the rest of this paper is organised as follows. in the methods section, we begin by analysing the problems leading to high time consumption of each method. in the following subsections, we describe how to speed the gene functional similarity calculation methods based on hash tables. then, taking wang’s method as an example, we show how to establish the hash table and measure the functional similarity with the table. finally, complexity analysis is presented for each method. in the results section, we present the experimental results, including the running times to establish hash tables and measure the semantic similarity between go terms and the functional similarity between genes. we also compare the developed speeding gene functional similarity calculation tool with other online tools. in the discussion section, we discuss the implications and limitations of our method, and finally, we draw our conclusions in the conclusions section. methods in this section, we first analyze what factors affect computational efficiency and establish a hash table to speed the gene functional similarity calculation for each method. then we take wang’s method as an example to show how to speed the computing process using the proposed strategy. finally, we present a complexity analysis for each method adopting our proposed strategy. analysing the problems leading to time consumption for each method methods that measure gene functional similarity must traverse the go graph repeatedly to obtain the information they need. however, traversing the go graph is time consuming because the topological structure of the go graph is complex due to multiple inheritances of go. in addition, the problem of low computational efficiency tends to be more prominent, especially when gene functional similarity needs to be measured on the genomic scale. to speed the gene functional similarity calculation, we should analyse the calculation process of each method and then determine the key information that affects the computational efficiency. it is need to calculate key information that lead to traversing the go graph repeatedly for these methods. the key information for each method is listed in table  ic denotes the ic value of term t; lca denotes the lowest common ancestor of terms t and t 2; dep denotes the deepest depth of term t in the go graph; sv denotes the semantic value of term t; and a denotes the term set containing all of the terms that annotate gene g.table key information affecting computational efficiency for each method for pairwise approaches, we focus on the semantic similarity between t and t for group-wise approaches, the functional similarity between gene g and g requires special attention for example, with the resnik method, determining the lca of terms t and t from the go graph requires traversing of the dags of t and t respectively. the method also has to calculate the ic of each term in the dags to obtain the ic of lca. therefore, the key information that affects computational efficiency in the resnik method is lca and ic). the key information for the other methods is also listed in table  speeding the gene functional similarity calculation for each method as we know, traversing the go graph repeatedly is the main reason for the reduced computational efficiency of each method. therefore, if we can avoid traversing the go graph repeatedly, the computational efficiency for each method will improve greatly. hence, we can convert the storage form of information from the go graph into a hash table. then, these methods could measure the functional similarity based on the hash tables instead of traversing the go graph, eventually reaching the goal of improving computational efficiency. as a result, we propose a novel two-step computing strategy: establish hash tables to store essential information that is obtained from the go graph and measure gene functional similarity based on the hash tables. the flowchart of our proposed strategy is shown in fig.  for ease of description, two definitions are given below.fig. the flowchart of the proposed strategy definition direct information: information that occurs in corresponding equations for each method. for example, the ic values of lca, ic and ic are direct information for eq.. definition essential information: information that will be stored in the corresponding hash tables. for example, the ancestors of term t t and their corresponding ic values are essential information for eq.. it is important to note that the essential information should have the ability to substitute the go graph. this is critical for the proposed strategy. therefore, before using our proposed strategy, each method must first analyse the direct information and extract the essential information from the original go graph. the direct information and essential information of pairwise approaches for measuring semantic similarity between t and t are shown in table  t denotes the ancestor set of term t including t itself. s a is the s-value of go term t related to term a. the direct information and essential information of group approaches for measuring functional similarity between genes g and g are also shown in table  a denotes a term set containing all of the terms that annotate gene g. in the next subsection, we take the wang method as an example to show how to establish the hash table for each method.table direct information and essential information for each method t2), t ∈ t t1 ∩ t t2 st1t,t∈tt1st2t,t∈tt2 ∑ict,t∈agi∩agj∑ict,t∈agi∪agj ict t1∈agiict t2∈agj finally, why do we select the hash table as the data structure to store the essential information extracted from the go graph? a hash table is a commonly used data structure that satisfies the requirement for quick searches. its search efficiency is very high, and its structure is also convenient to program and implement. what’s more, with the help of the hash tables, there is no need to repeatedly traverse the go graph to obtain direct information. each method can obtain essential information from the hash table and calculate the direct information by making use of the essential information. as a result, the computational efficiency increases dramatically. speeding the calculation of functional similarity for the wang method in this subsection, we take wang’s method as an example to show how to speed the functional similarity calculation. the main idea is illustrated in fig.  the proposed strategy comprises two main steps.fig. the main idea of the proposed strategy adopted for the wang method. a depicts a dag for go term intracellular membrane-bound organelle: b depicts the hash table established from. each row in is called a record. for each record, the key of the record is the id of the go term, and the value of the record is a link list that contains all of the s-values of the key. for each term in, there is a corresponding record in. we can obtain the essential information from the hash table directly instead of from the dag in. the proposed strategy converts the storage form of information from the go graph into hash tables to speed the calculation process step one: establish a hash table for the wang method according to eq., measuring the semantic similarity between two terms a and b is only based on three parts: sv, sv and the numerator of eq.. with further analysis, we fortunately find that the values of sv and sv are only dependent on the s-values for all terms in daga and the s-values for all terms in dagb, respectively. besides, the numerator of eq. can also be calculated quickly based on the s-values of terms a and b. from the analysis above, s a, t ∈ t and s b, t ∈ t are essential information for eq.. to adopt the proposed strategy for calculating eq., we can compute all of the s-values of a and b in their corresponding dags and then store the results into a hash table. the s-values for go: are listed in table  the hash table is established based on fig. 2a.table s-values for go terms in the dag for intracellular membrane-bound organelle: 0043231 step two: measure the gene functional similarity based on the hash table once the hash table is established, measuring the semantic similarity is based on the hash table instead of the go graph. in other words, because the hash table contains all of the essential information that eq. needs, the wang method can obtain the information needed directly from the hash table. after obtaining the semantic similarity between go pairs, it can use the bma rule to further measure the functional similarity between two genes. in fig. 2a represents a dag for the go term intracellular membrane-bound organelle: and represents the hash table established on the basis of. the semantic contribution factors for the ‘is-a’ and ‘part-of’ relations are and, respectively. we use eq. to calculate all of the s-values for term go: and list the results in table  the storage form for term go: is listed in the last row of fig. 2b. for the other terms in fig. 2a, the handling process is similar to term go: the results are also listed in fig. 2b. it is noteworthy that the order of records shown in fig. 2b may differ from the actual order because of the special storage features of hash tables. example: measuring the semantic similarity for the wang method we take two terms go: named a, and go: named b, as an example to measure the semantic similarity based on the hash table. the relationship between a and b can be obtained from fig. 2a. the semantic similarity of the two terms a and b is calculated in three steps based on the hash table as follows: sva= + + = svb= + + = ∑t∈ta∩tbsat+sbt=sa0005575+sb0005575= + = therefore, the semantic similarity between terms a and b is: sgoab=∑t∈ta∩tbsat+sbtsva+svb=.44+ = because the s-values of terms a and b can be obtained directly from the hash table represented in fig. 2b, there is no need to search the dags of terms a and b. therefore, the computational efficiency of measuring the semantic similarity has sharply improved. the proposed strategy has achieved the desired result. to obtain the corresponding hash table from the go graph for the wang method, we design an algorithm for establishing the hash table, namely eht. the algorithm is described in fig.  to simplify the description of the algorithm, we briefly explain the notations used in the algorithm. an adjacency matrix m represents one of three go graphs mf, bp and cc. rht represents the hash table that stores the essential information extracted from the go graph. ddec represents a set that contains all of the direct descendants of term t, and danc represents a set that contains all of the direct ancestors of term t.fig. the algorithm for establishing a hash table from the go graph for the wang method complexity analysis without loss of generality, suppose there are m pairs of genes that require computation of their functional similarities. each gene has been annotated by an average k go terms. there are n go terms in the go graph totally. each pairwise approach uses the bma rule to measure gene functional similarity. the time complexity for the seven methods is listed in table  table time complexity for measuring gene functional similarity of each method in step one, we can find that the time complexity for each method has no relationship with m. the time complexity for establishing the hash table is relatively low. in step two, once the hash tables are established, the efficiency of measurement of the gene functional similarity will be improved. it is noteworthy that the total time complexity for each gene functional similarity method equals the time complexity of step two as long as the go graph remains unchanged. to further differentiate sgfsc from other tools in terms of time complexity, we also list the time complexity when our proposed strategy is not adopted. from the table  we can find that, if m ≫ n, sgfsc has a higher computational efficiency comparing with other methods that don’t adopt the proposed strategy. regarding space complexity, the proposed strategy occupies some memory space to store the hash tables. suppose the storage space of a go term is l, then the space complexity for storing the hash table is o. the actual amount of memory required to store the hash table is about 5 mb, which has been verified through experimentation. there is no doubt that it will be quicker to store and read the hash table on a laptop computer.  in this section, we provide the running time to establish the hash table from the go graph first. then by using the proposed strategy, the time needed to measure the semantic similarity between term pairs is listed in table  the results of measuring gene functional similarities on the whole genomic scale for model organisms are listed in table  the results of comparisons with other tools are listed in tables  and table time in seconds required to establish the hash table for each method on bp, cc and mf ontologies 102 running time to establish hash tables for each method the key goal of the strategy is to extract the essential information from the go graph and then establish a hash table to replace the go graph. therefore, we provide the running times to establish the hash table for each method in table  table running time in seconds for each tool to measure gene functional similarity 102 from the results, we can find that sgfsc can establish the hash table within a few minutes. for example, the running times for the resnik method on bp, cc and mf ontologies are 441 s, 264 s and 379 s, respectively. the running times of the other methods are close to those of the resnik method, indicating that the computational efficiency of the proposed strategy for establishing the hash table is high. sgfsc is efficient in updating the content of the hash tables. therefore, sgfsc is well adapted to the daily evolution of the go database, which may change with the deletion of obsolete terms and the addition of new terms. it should be noted that the hash tables for the resnik, lin and jiang methods are the same. the experiments were conducted on windows with an i5-2600 k cpu @  ghz with 16 gb memory. running time to measure semantic similarity for each method for pairwise approaches, measuring the functional similarity between genes is mainly dependent on the sematic similarity between term pairs. therefore, the computational efficiency of sematic similarity plays a key role in the pairwise methods. we randomly select term pairs that are related to all of the terms in the corresponding go graphs for the bp, mf and cc ontologies. the computing time for each method on bp, mf and cc graphs is listed in table  for example, the running times for the wang method on bp, cc and mf ontologies are  s,  s and  s, respectively. because the bp ontology has the most terms, its running time is longer than that of the mf and cc ontologies. the results show that sgfsc can complete the calculation within a few seconds. in addition, the bar plots of running time for each method are presented in fig.  we can clearly find that the computation time is within 10s.fig. bar plots of running time in measuring semantic similarity between term pairs running time to measure gene functional similarity for each method to give a comprehensive comparison of the computational efficiency of each method, we select annotation data of five organisms representing human, arabidopsis, yeast, rat and oryza. in table  the number of annotated genes, number of average annotations for each gene, number of gene pairs and the running time in seconds for seven typical methods are presented for the corresponding ontologies of bp, cc and mf of five organisms. the experiments select annotation data for five model organisms: human, arabidopsis, yeast, rat and oryza. the uniprot-goa data for each species were downloaded from http://geneontology.org/page/download-annotations in august number of gene pairs refers to the number of gene pairs that will be measured for gene functional similarity using sgfsc. we obtain the gene pairs by combining all of the annotated genes in the goa database. the experiments were conducted on linux with an e5- cpu @  ghz and 64 gb memory. for each organism, sgfsc computes the respective functional similarity on bp, cc and mf ontologies. for the whole genomic scale of human, the experimental results show that the computing time for each method is no more than 11 h. for the other organisms, the computing time is shorter because the number of gene pairs and the number of average annotations of genes are relatively smaller. for example, the number of annotated genes for the human in bp ontology is whereas that for yeast is therefore, the running time for the two organisms is greatly different. however, the running times of sgfsc for all selected organisms are within an acceptable range. therefore, sgfsc shows its outstanding advantage for measuring functional similarity on the genomic scale. even more, it has the ability to measure the similarity of a combination of all annotated genes in the goa database for the model organisms. the proposed strategy thus can effectively solve the problem of large-scale computing of gene functional similarity. to represent the experimental results more intuitive, we add two bar plots which are depicted using figs.  and figure  is the bar plots for running time using wang method on selected organisms. wang method can finish the gene functional similarity calculation on the genome scale for all selected organism in a relatively short time. figure  shows the running time for each selected method on human genome scale. results also indicates that all these methods can complete the calculation in an acceptable period of time.fig. bar plots for running time in measuring gene functional similarity using wang method on each organism fig. bar plots for running time for each method in measuring functional similarity on human genomic scale comparison with other tools to compare the computational efficiency of sgfsc with other tools, we select two tools: gfsat and gosemsim. these two tools can be conveniently installed on a laptop, and therefore, we can accurately measure running times. it is difficult to accurately measure the running times of other tools because they can only be used online. therefore, we decided to compare running time of these two tools only. we use the running time to compute the similarities of a large number of term pairs and gene pairs to evaluate the computational efficiency of these three tools. in the experiment, we use sgfsc, gfsat and gosemsim to compute the similarities of three sets of term pairs and gene pairs, respectively. the numbers of term pairs and gene pairs in these sets are both and respectively. the experiments were conducted on windows with an i5-2600 k cpu @  ghz and 16 gb memory. the go data in table were downloaded in august and the term pairs were randomly generated from the mf ontology. the wang method was used for each tool. the goa data in table of arabidopsis was downloaded in august we selected the well-annotated genes and then generated gene pairs for testing. the wang method was also used for each tool. ‘x’ in tables and indicates that the process took >12 h. the running time of each tool to measure the semantic similarity results is listed in table  the running times of gfsat and gosemsim to measure the semantic similarity of term pairs were 6387 s and 3634 s, respectively, whereas that for sgfsc took only 2 s. furthermore, the running times of both gfsat and gosemsim to calculate term pairs were greater than 12 h, whereas that for sgfsc was only  s. the running time of each tool to measure gene functional similarity is listed in table  similar to the findings for semantic similarity, sgfsc performed considerably better than the other two tools on the similarity calculation of gene pairs. the running time of sgfsc was 29 s for gene pairs, whereas gfsat and gosemsim required 36154 s and 13056 s, respectively. as the results clearly show, in comparison with the other two tools, sgfsc has a considerable speed advantage especially when calculating a large number of gene pairs. besides, we add one merged bar plots figure for tables  and figure 7a and b show the running time of measuring semantic similarity on and term pair datasets. figure 7c and d depict the running time of measuring gene functional similarity on and gene pair datasets respectively. all of the four subfigures clearly show the advantages of sgfsc in the computation time. therefore, our proposed strategy achieves the desired results in speeding up the gene functional similarity calculation.fig. bar plots for running time on different datasets using sgfsc, gfsat and gosemsim discussion first, we emphasise that the aim of the proposed two-step strategy is only to speed up the methods used to measure gene functional similarity because these methods tend to be time consuming if they are not implemented with a proper data structure. the problem may be extremely prominent especially when gene functional similarity needs to be measured on the genome scale for some applications. therefore, the proposed strategy for speeding up the functional similarity calculation is quite meaningful. second, the proposed two-step strategy adopts hash tables as the data structure to store essential information to avoid traversing the go graph. furthermore, the hash table is used only to satisfy the requirement of a quick search. hence, the computational efficiency of these methods improves significantly. we particularly highlight that the computational efficiency for these methods varies widely according to different data structures and implementation strategies. therefore, it is critical to choose an appropriate implementation strategy to increase the computational efficiency of these methods. third, we also implemented an online tool, sgfsc, for adoption of the two-step strategy. the sgfsc could speed the functional similarity calculation methods on the whole genomic scale. however, there are some other issues need to note. precision sgfsc extracts the essential information for each method from the go graph and then establish hash tables, which have a special structure to store the information. therefore, the precision of the final computing result is not lost with sgfsc because the function of the hash tables is only to store intermediate results to avoid repeatedly traversing the go graph for each method. correctness sgfsc was implemented with seven typical methods. it is not difficult to understand that sgfsc only achieves the computation speeds with these methods when our proposed two-step strategy is used. the computing process of the original methods is unchanged. therefore, the computing results of sgfsc are identical to those of other tools if the same versions of the go and goa databases are used. as a result, the computing results are absolutely correct. space because sgfsc adopts a two-step computing strategy, it first needs to read the hash table into memory. therefore, it occupies some additional memory space compared with other tools that do not adopt the proposed strategy. experimentation showed that the memory space for storing the hash table is about 5 mb. the continuing development of computer hardware technology has made this a simple problem to solve. the core idea of the strategy comes from making the best use of memory space to reduce the computing time, which is widely used in computer science. application sgfsc offers powerful computational capability to compute gene functional similarity on a genomic scale. we have provided a friendly online tool for the convenient use of sgfsc. in addation, our proposed strategy also offers good versatility for use in other research. for example, in the area of natural language process research, because the size of the wordnet is large, computing the ic value of a concept is also time consuming. therefore, researchers measuring the semantic similarity between concepts could adopt our proposed two-step strategy to improve computational efficiency. drawback to speed up the gene functional similarity calculation, sgfsc first has to read the corresponding information hash table into memory, which will take a few seconds. therefore, the computational efficiency of sgfsc is lower than that of other tools if the number of gene pairs requiring measurement of functional similarity is small. therefore, the outstanding advantage of sgfsc is in its measurement of gene functional similarity for a large number of gene pairs.  first, a novel two-step computing strategy is proposed to speed up gene functional similarity calculation. these methods measure gene functional similarity based on hash tables. therefore, the time complexity is obviously decreased because there is no need to traverse the go graph repeatedly, which primarily affects the computational efficiency. second, we have implemented an online tool called sgfsc that is bundled with seven typical gene functional similarity calculation methods and is freely available at http://nclab.hit.edu.cn/sgfsc. the computational efficiency of sgfsc offers a significant improvement in computing time. our experiments show that sgfsc has a great advantage in measuring gene functional similarity on the whole genomic scale. third, the key point in our proposed strategy is the transformative idea that the information required can be obtained directly from the hash tables instead of the original go graph. the proposed strategy converts the storage form of information from a go graph into a hash table structure that can meet the requirements of a quick query. as a result, the proposed strategy achieved a desired result. the proposed strategy may also be applied to other areas of bioinformatics to improve computational efficiency. none. funding m. guo is supported by the national natural science foundation of china. c. wang is supported by the natural science foundation of china and x. liu is supported by the natural science foundation of china. availability of data and material the dataset supporting the conclusions of this article were downloaded from the relevant public databases.ontology data: we downloaded the gene ontology data from the gene ontology database containing ontology terms subdivided into cellular components, biological process and molecular function terms. go annotation data: we downloaded gene annotations for go terms from the gene ontology database for s. cerevisiae and h. sapiens. home page: http://nclab.hit.edu.cn/sgfsc authors’ contributions zt proposed the idea, implemented the experiments and drafted the manuscript. mg initiated the idea, conceived the whole process and finalised the paper. zt, cw and xl helped with data analysis and revised the manuscript. all authors have read and approved the final manuscript. competing interests the authors declare that they have no competing interests. consent for publication not applicable. ethics approval and consent to participate the human go annotations are publicly available to all researchers and are free of academic usage fees. there are no ethics issues. no human participants or individual clinical data are involved with this study.
to speed current gene functional similarity calculation methods, a novel two-step computing strategy is proposed: establish a hash table for each method to store essential information obtained from the gene ontology graph and measure gene functional similarity based on the corresponding hash table. the proposed strategy is successful in speeding current gene functional similarity calculation methods. therefore, the efficient measurement of gene functional similarity remains a challenging problem. however, a common problem with these methods is their time consumption, especially when measuring the gene functional similarities of a large number of gene pairs. gene ontologyhash tablegene functional similarityhttp://dx.doi.org/ /501100001809national natural science foundation of china6127134661571163615320146140213291335112wang chunyu guo maozu liu xiaoyan issue-copyright-statement© the author 2016 these methods are mainly divided into two categories: pairwise approaches and group-wise approaches. in recent years, many measures of gene functional similarity have been proposed and widely used in all kinds of essential research. there is no need to traverse the go graph repeatedly for each method with the help of the hash table. the problem of computational efficiency for pairwise approaches is even more prominent because they are dependent on the combination of semantic similarity. the analysis of time complexity shows that the computational efficiency of these methods is significantly improved. further experiments show the great advantage of sgfsc in measuring gene functional similarity on the whole genomic scale. we also implement a novel speeding gene functional similarity calculation tool, namely sgfsc, which is bundled with seven typical measures using our proposed strategy.
 in recent years, many measures of gene functional similarity have been proposed and widely used in all kinds of essential research. these methods are mainly divided into two categories: pairwise approaches and group-wise approaches. however, a common problem with these methods is their time consumption, especially when measuring the gene functional similarities of a large number of gene pairs. the problem of computational efficiency for pairwise approaches is even more prominent because they are dependent on the combination of semantic similarity. therefore, the efficient measurement of gene functional similarity remains a challenging problem.  to speed current gene functional similarity calculation methods, a novel two-step computing strategy is proposed: establish a hash table for each method to store essential information obtained from the gene ontology graph and measure gene functional similarity based on the corresponding hash table. there is no need to traverse the go graph repeatedly for each method with the help of the hash table. the analysis of time complexity shows that the computational efficiency of these methods is significantly improved. we also implement a novel speeding gene functional similarity calculation tool, namely sgfsc, which is bundled with seven typical measures using our proposed strategy. further experiments show the great advantage of sgfsc in measuring gene functional similarity on the whole genomic scale.  the proposed strategy is successful in speeding current gene functional similarity calculation methods. sgfsc is an efficient tool that is freely available at http://nclab.hit.edu.cn/sgfsc. the source code of sgfsc can be downloaded from http://pan.baidu.com/s/1dffmvpz. keywords gene ontologyhash tablegene functional similarityhttp://dx.doi.org/ /501100001809national natural science foundation of china6127134661571163615320146140213291335112wang chunyu guo maozu liu xiaoyan issue-copyright-statement© the author 2016 