## 3 Results
### Example Queries via SPARQL and RESTful API  
(I): **SPARQL query to list QTLs, associated gene IDs and GO annotations related to an example trait \"fruit shape\" (SP:0000038).**  
In addtion to the manual browsing via a web interface, Figure 3 exemplifies a programmatic way to query trait-gene associations. This query yields QTLs and candidate genes including GO terms (molecular function and biological process only) for the trait \"fruit shape\" (SP:0000038).  
(II): **SPARQL query to list genes/proteins annotated with GO terms related to both \"fruit\" and \"ripening\".**  
SPARQL query in Figure 4 highlights a way to do textual search over the annotations of genes/proteins. With the bag-of-words expression, we query genes and proteins containing GO annotations with the words \"fruit\" and \"ripening\". The resulting output is the list of genes/proteins involved in the biological process called \"fruit ripening\" (GO:0009835).  
Figure 3: Input and output of the SPARQL query to list QTLs, associated gene IDs, and Gene Ontology (GO) annotations for the trait “fruit shape” (SP:0000038).  
* **Comparison of (wild) tomato genome graphs using the RESTful API.**
* pbg-ld can be used to query genomic features across various biological databases. This can be done either by writing a SPARQL query against the endpoint or via the API call /countFeatures of pbg-ld, with the genomic graph as a parameter. For example, pbg-ld can count the genomic features annotated in the _S. Lycoreiscum_ genome according to Ensembl Plants or SGN, and annotations in the _S. penelli_ genome according to SGN. We compared the differences between the genomic features of the tomato graphs in Figure 5. It is evident that there are a total of 33,785 protein coding genes in Ensemble Plants, whereas there are 34,725 protein coding genes in the SGN graph. There are 940 unique genes in the SGN database that are not mentioned in the Ensembl Plants database. Furthermore, the results also highlight that genetic markers are included in SGN but not in Ensembl Plants while the latter database contains RNAs. In addition, pbg-ld can also be used to compare genomic data of different species of the same family. _S. pennellii_ is a wild tomato species that is relatively distant from the domesticated _S. Lycoreiscum_. Because of _S. pennelli_'s extreme stress tolerance, unusual morphology, and a genome sequence 119 Mb larger than _S. Lycoreiscum_, it is an important donor of germplasm for the cultivated tomato. While comparing the genomic features of _S. Lycoreiscum_ vs. _S. pennelli_ in SGN, the number of genomic features in _S. pennellii_ is on average 1.5 times greater than that of _S. Lycoreiscum_ (Figure 5).  
Figure 4: Input and output of the SPARQL query to list genes/proteins annotated with GO terms related to both “fruit” and “ripening”. Full-text search in the SPARQL query is done with the Virtuoso’s bif:contains predicate.  
Figure 5: Bar charts of genomic feature counts for three Solanum genomes (graph IRk): Ensemble _S. lysozyme_ ([[http://plants.ensembl.org/Solanum_lycopersicum](http://plants.ensembl.org/Solanum_lycopersicum)]([http://plants.ensembl.org/Solanum_lycopersicum](http://plants.ensembl.org/Solanum_lycopersicum))); SGN: _S. lysozyme_ ([[http://solgenomics.net/genome/Solanum_lycopersicum](http://solgenomics.net/genome/Solanum_lycopersicum)]([http://solgenomics.net/genome/Solanum_lycopersicum](http://solgenomics.net/genome/Solanum_lycopersicum))); SGN: _S. pemellii_ ([[http://solgenomics.net/genome/Solanum_pennellii](http://solgenomics.net/genome/Solanum_pennellii)]([http://solgenomics.net/genome/Solanum_pennellii](http://solgenomics.net/genome/Solanum_pennellii))). The data were obtained through the pbg-ld Web API/countFeatures endpoint.