dataesr/scientific-paragraphs-categorization huggingface dataset:
The addition of modest amounts of ULM images to the training data set (equivalent to up to 12% of WEB images) allowed a decrease in the number of FNs to 21% (Figure  4 ). This improvement in the dugong detection capacity was likely due to the incorporation of contextual elements specific to the Poé Lagoon, such as distinct light and habitat features. The addition of ULM images also increased the variability around precision because FPs were detected on unseen elements of the background (e. g. , sun glint on the water). Overall, these results suggest that CNNs trained with various sources of social media images can successfully detect species in new locations where conditions potentially differ from those of the training data set. This ability of CNNs to shift domains (i. e. , their transferability) is particularly valued in ecological applications of deep learning  (Schneider et al.
Implications for rare megafauna monitoring Together, deep learning and social media provide a potential breakthrough for video-based monitoring of rare megafauna populations. First, social media can provide many times more images than aerial surveys in a study area (here, 1303 WEB v. 161 ULM images) in different contexts, boosting the size and diversity of training data sets. Our findings show that incorporating local field images in the training data set is still required to decrease FNs and that time needs to be devoted to annotate some of these field images to improve overall detection accuracy. Second, social media offer the possibility to gather images from many more locations than would be achieved with conventional surveys, expanding the environments in which the species may be found (e.
ACKNOWLEDGMENTS We are indebted to all data owners for allowing us to reuse their dugongs' videos posted on social media websites. Data owners include  Nautica Environmental Associates LLC (O. Farrell drone pilot) for dugong footage in the Gulf of Arabia , and  Burapha University  and the National Science and  Technology Development Agency for dugong footage in Thailand. We are grateful to L. D. , L. R. , G. Q. , and  M. T. for their help with social media search, visualization of ULM videos, and annotation of images. We thank  Air Paradise  for their collaboration in col-lecting ULM video sequences in New Caledonia. This project received funding from the  European Union 's  Horizon 2020 research and innovation program  under the  Marie Skłodowska-Curie grant agreement 845178  (MEGAFAUNA).
Database Number of videos Mean duration (minutes: seconds) Total duration (hours: minutes: seconds) Number of images Number of images with ≥1 dugong Mean (SD) image width (pixels) Mean (SD) image height (pixels) Mean (SD) bounding box width (pixels) Mean (SD) bounding box height (pixels) WEB 22 1: 7 0: 24: 38 1512 1303 1938 (443) 1119 (225) 155 (112) 144 (112) ULM 57 11: 45 10: 52: 23 42464 161 2704 (0) 1520 (0) 40 (16) 39 (17) *Details in Appendix S1.
Introduction Systems biology is a research area aimed at obtaining a better understanding of biological interactions at several levels. The associated activities require combining multiple databases to integrate information, and computational modeling  (1)  addresses the complexity of this integration process. Graph-based modeling approaches are particularly suitable for elucidating biological systems because they structure information in an organized (possibly causal) way to represent the relation between complex components such as genes, proteins and protein complexes. For instance, graph structures represent inhibition of activation in gene regulatory networks (GRNs) or protein stimulation in signaling networks (SNs). These networks can be easily transferred to computational models, which can perform complex combinatorial analyses or simulations to extract network properties or predict system states.
Several systems biology approaches use computational models built upon biological networks to understand human diseases. For example, researchers have previously undertaken the construction and kinetic modeling of a Parkinson's disease interaction map (2), while others have combined the crosstalk of multiple T-cell receptor pathways to understand immune response  (3). To assemble such graphs, multiple data or knowledge bases must be integrated. This integration effort is currently facilitated through several initiatives aimed at better organization of biological knowledge and its open availability, such as Reactome (4), Kyoto Encyclopedia of Genes and Genomes (KEGG)  (5) , PathwayCommons (PC)  (6) , WikiPathways  (7) , Pathway Interaction Database-NCI  (8) , Consensus PathDB  (9) , OmniPath  (10)  and hiPathDB  (11) , among others.
These databases can be automatically queried to reconstruct a large variety of biological networks such as GRNs or SNs. Some of these databases, such as KEGG, WikiPathways, PC ChiBE  (12)  and Reactome, provide an explicit representation and a user-oriented visualization to better understand biological phenomena. However, they do not include query mechanisms to automate the reconstruction of possibly complete (across multiple pathways) upstream subgraphs from a list of genes of interest. For other databases, specific tools have been developed to automate network reconstruction from a list of input genes. These tools include CyPath2  (13) , PCViz (https://www. pathwaycommons. org/pcviz/), PyPath  (10)  and ReactomeFIViz  (14) , all of which produce graphs representing biological networks. However, due to their modeling choices, derived computational models often fail in representing causal biological flows.
For example, the CyPath2, PCViz, ReactomeFIViz and PyPath tools represent protein complexes as a set of interacting entity members (cycles) without including the complex itself as a node in the graph. In contrast, KEGG, WikiPathways, ChiBE and Reactome visualization tools keep protein complexes in the visualization as nodes. The first modeling choice may strongly influence computational modeling because cycles can generate oscillations in simulations. These artificial oscillations do not represent a biological reality. Single-source tools for reconstruction of GRNs and SNs such as ReactomeFIViz and KEGGscape  (18)  do not enable tackling the challenges arising from the integration of biological data from multiple sources. PC and OmniPath are two large-scale initiatives in that direction: they integrate several existing data sources-PC covers 24 resources and OmniPath covers 34 resources-thus allowing to combine multiple knowledge bases.
However, scientists face a massive amount of query results when querying resources, and they consequently need efficient and scalable algorithms to exploit their richness. We identified the following issues that need to be addressed to enable better modeling of biological systems: (i) combining multiple data sources, possibly at multiple scales; (ii) automating the exhaustive reconstruction of multi-source multi-pathway networks and (iii) leveraging biological semantic models to represent causal biological flows. In this paper, we propose pyBRAvo as a computational framework based on Semantic Web technologies (BioPAX ontology) and multiple public data source (PC) to automate the reconstruction of human multi-source and multi-pathway GRNs and SNs.
Material and methods PathwayCommons PC (  6 ) is a large-scale initiative aimed at integrating biological pathway data collected and curated from multiple data sources and making the information accessible. At the time we evaluated our tool, PC version 11 encompassed 22 data sources, 9500 pathways, 3 million interactions and 1. 5 million entities. In the updated version 12, PC integrates 22 data sources and provides information on more than 11,500 pathways, 2. 4 million interactions and 1. 2 million entities. Some of the data sources focus on pathway information such as SMPdb, Reactome, KEGG or WikiPathways, while other sources focus on biological interactions such as BioGRID or IntAct. PC relies on Linked Data  (15)  principles to make this massive pathway knowledge interpretable from both human and computational points of view.
Linked Data provides standards to represent and link resources as public knowledge graphs on the web, and resource description framework (RDF)  (16)  is the W3C standard used to represent these knowledge graphs. It is particularly suitable for representing biological knowledge because it allows the representation of directed labeled graphs. In addition, these resources as well as their relations can be strongly typed with controlled vocabularies or more formal ontologies. In particular, PC leverages the BioPAX ontology  (17)  to provide a standard and uniform view of these multiple and diverse databases. Finally, thanks to the support of Semantic Web standards and technologies, especially the SPARQL query language, this massive biological pathway knowledge graph can be queried on live up-todate biological data to mine and retrieve specific graph patterns.
Network reconstruction algorithm With pyBRAvo, we propose a method to automatically assemble GRNs and SNs based on query rewriting. pyBRAvo leverages publicly available datasets through the PC initiative. Figure  1  presents the network reconstruction algorithm. pyBRAvo first takes a list of genes or protein names as input. This list is then augmented with three optional text-based processings (gray boxes) aimed at decomposing protein complexes, inserting synonyms and inserting suffixes commonly found in PC. These processings are described in the 'Query expansion and network unification' section. Then, the query generation step produces two pattern-matching expressions (see Supplementary Methods A. 2) according to the specific kind of network to be reconstructed (i. e. GRNs or SNs). The generated query is executed on the remote PC data source, and results are recursively explored until no new controllers can be found or the maximum exploration depth has been reached.
Query expansion and network unification To match the maximum number of entities during the network reconstruction process, we propose the following optional pre-and post-processings, as shown in Figure  1. Complex decomposition. Protein complexes can be identified in BioPAX knowledge bases either through their semantic type (bp:Complex) or by a label concatenating several names, separated with special characters. For performance concerns, we favored a syntactical approach that consists of splitting the label into several names and adding these names to the list of biological entities to be explored in following iterations. Label expansion. Although BioPAX allows modeling several forms of biological entities, some databases express specific forms through a prefix or a suffix in entity labels, such as expression of or mutant form.
To maximize entity retrieval, we dynamically expand the regulation and signaling queries with a set of predefined prefixes and suffixes when reconstructing the interaction network. These prefixes and suffixes are removed when entities are added to the regulation or SN. Synonym expansion. To enhance the matching of genes or protein names, we account for common synonyms as registered in the NCBI Gene Info database (Homo_sapi ens. gene_info). For each biological entity name retrieved through PC, we extend the regulation or signaling queries with their synonyms for further exploration. Network unification. Finally, we reuse the NCBI Gene Info database to merge synonym graph nodes into nodes identified with their common name. This computation (of merging synonyms) is done for each analysis. Thus, two graphs are always proposed: one that is unified and another that is not.
EMT signature-based dataset of 910 genes A gene expression profile based on the differential expression (DE) of 16 283 genes in human liver cells was obtained from the LIHC-US project (Liver HCC-TCGA, US, Release 21. https://dcc. icgc. org/releases/release_21/Proj ects/LIHC-US) of the International Cancer Genome Consortium (ICGC) database  (18). The RNAseq expression of these genes was measured across a population of 294 patients with liver cancer. The DE of genes was obtained by comparing patients with liver cancer at an invasive stage with patients whose cancer was at an early and non-invasive stage. Similar to a previously used approach  (19) , this comparison was based on the detection of epithelial-mesenchymal transition (EMT), the process by which cells acquire invasive and migratory abilities.
The output of this DE analysis is a list of 910 genes that were notably over-expressed (fold-change > 2) or under-expressed (fold-change <-0. 5) under the constraint P < 10 -5. These 910 genes are used as input for our software in the 'Gene regulatory network reconstruction' and 'Signaling network reconstruction' sections. Metabolic model-based dataset of 39 genes. In  (20) , pyBRAvo was used to feed a probabilistic model aimed at predicting the impact of drugs on cell growth rate in the context of HCC. More precisely, in this use-case, we used the iLivercancer1715 model proposed by  (21). This metabolic model consists of 4663 metabolic reactions and 5735 metabolites, together with an objective function that describes the biomass growth of the HCC tumor cell. Since the model is reconstructed based on the human metabolic reaction model, deriving the list of 2881 genes with a direct effect on the metabolic reactions of HCC is straightforward.
Evaluation metric computation: coverage To illustrate the construction of SNs (see the 'Signaling network reconstruction' section), we compared pyBRAvo (see the 'Query expansion and network unification' section) with the algorithm proposed using PyPath functionalities (see the 'Signaling network reconstruction' section). Both tools retrieve graphs from a list of input genes. The coverage metric used for this study measures the number of input genes belonging to the output graph. It is computed based on the following formula: S = |ON| ÷ |IG| × 100 where ON is the set of input genes belonging to the output graph and IG is the set of input genes, ON ⊆ IG. This metric represents how well the knowledge of the database, extracted with the specific tool (pyBRAvo or PyPath), covers the initial gene dataset.
Results We applied pyBRAvo to reconstruct two different types of networks using the same gene expression profile. In the first one ('Gene regulatory network reconstruction' section), we built a regulatory network and modeled it using Iggy, a tool based on Answer Set Programming that performs a sign-consistency analysis comparing biological networks with experimental observations  (22). In the second one ('Signaling network reconstruction' section), we used pyBRAvo to reconstruct an SN and compared the obtained results using PyPath, a Python package designed to query the OmniPath database (version of October 2019) to work with molecular network interpretations from this database. Finally, we show in the 'Gene regulatory networks for drug screening applications' section how pyBRAvo can be used in a drug-screening application to enrich potential target genes and associated candidate drugs.
GNN reconstruction We used pyBRAvo to query the PC database (version 11), excluding both miRTarBase and MSigDB sub-databases, to generate a regulatory network that explains the upstream events of the 910 genes selected based on the EMT signature (see the 'Experimental datasets' section). The miRTarBase database was excluded because it contains negative interactions due to miRNA entities, for which we had no experimental observations. MSigDB was excluded because of the absence of signs/roles in the effect of all its interactions; MSigDB interactions are obtained via computational predictions on the gene binding sites. The reconstruction was limited to a recursion depth of 10 levels. This graph was obtained using the Python command line script of pyBRAvo (Command: python pyBRAvo. py -reg -md 10 -sy -su -co -f input.
The edges of this graph represent transcriptional regulation interactions and complex formation interactions. From the 910 queried genes, pyBRAvo recovered the upstream events for 691 (76% of coverage) of them. The reason that not all 910 original genes were found is that not all genes are documented in the queried resources of PC as being regulated by transcription factors. Independently from this study, we used the same list of 910 genes to query the KEGG database for upstream (transcriptional) regulators and we obtained only 63 genes (6% coverage) that were upstream regulated.
Provenance In this case study, we were interested in understanding how different databases provide information that enables the construction of a graph explaining the EMT signature genes. In Figure  2 , we show a graph that was retrieved; its edges are colored according to the source database. The first column gives the name of each database that returned edges, where PART_OF stands for pyBRAvo's specific result: edges representing the association of proteins with the protein complexes they belong to. The second column gives the total number of edges found in the database, which can be of signed type (activation or inhibition) or unsigned type. The third column gives the number of signed edges among them. The Cytoscape session of this figure is available online (https://github. com/pyBRAvo/pyBRAvo/blob/master/cytosc ape-vis/regulation_paper_sept.
Feeding computational modeling tools for Systems Biology users What we understand as a computational model is a mathematical framework that uses either a computational simulator or a solver to discover underlying properties of a (biological) graph, such as a computational prediction of unobserved species behavior. In a computational modeling tool, mathematical equations, logical rules or constraints are involved. One of the motivations in conceiving pyBRAvo was to ease the automatic transfer from knowledge databases toward such computational models. To illustrate this transfer, we built a discrete mathematical model integrating the pyBRAvo regulatory network without the 106 unsigned edges, obtained from Pathways Commons, and the up-and down-regulation DE measurements of the 910 genes obtained from ICGC.
This mathematical model follows the sign-consistency approach implemented in the Iggy framework  (23) , which uses clasp, a conflict-driven Answer Set solver used in the study of NP-hard search problems  (24). Iggy tests the consistency between the network logic (signs and directionality) and the DE information of the genes (up/down shifts of regulation). Interactions labeled as activations and inhibitions were modeled by Iggy using plus and minus signs, respectively. Interactions labeled as PART_OF were modeled by GRN returned by pyBRAvo. The color code of the edges gives their provenance: orange for CTD, purple for Panther, green for PID, red for Reactome and gray for the expansion of protein complexes. The edge tips depend on the interactions type: triangle for an activation, bar for an inhibition, arrow with bar for an unknown interaction type and diamond for a complex composition.
SN reconstruction In this section, we illustrate how SNs, in the forms of influence graphs, are obtained with pyBRAvo (see the 'Gene ; the synonyms option explores synonyms that have been retrieved from the NCBI Gene database; the complex option splits a protein complex into its protein components, and these proteins are integrated into the following upstream search and finally, the label expansion option allows including several forms (added suffixes, prefixes) of an entity in the upstream search. The PyPath loading option accounts for the time it takes to load the database before the algorithm is executed. regulatory and signaling networks reconstruction' section) using the 910 genes selected on the basis of EMT signatures (see the 'Experimental datasets' section). The specificity of this SN reconstruction process is demonstrated through a comparison of pyBRAvo with a similar state-of-the-art tool, PyPath  (10).
Recursive upstream retrieval algorithm using PyPath PyPath is a Python module conceived to query and manipulate the OmniPath database. PyPath provides various functionalities such as the search for protein identifiers and their up-or downstream elements documented in the OmniPath database. PyPath allows searching for direct predecessors from a list of target nodes; however, the complete reconstruction of a SN related to the upstream events from a list of target nodes is not available. Therefore, we implemented an algorithm using the PyPath functions as described in Supplementary Figure  S6. This algorithm does not require specific ID management (aliases, synonyms) because OmniPath already provides pre-processed IDs. Indeed, in OmniPath, all identifiers from the original databases (Gene Symbol, Entez Gene ID, Ensembl Gene or Protein, HGNC name, etc.
Execution time We compared the execution time (pyBRAvo and PyPath calls where executed from a standard laptop machine equipped with Intel ® Xeon ® CPU E5-2620 0 @ 2. 00GHz x 18 and 32Gb of RAM memory) needed by pyBRAvo and PyPath to separately reconstruct a signed SN from the same dataset, by varying the reconstruction depth from 2 to 10 levels with a step of 2 (see Supplementary Figure  S7 ). This comparison was done using the settings shown in Table  2. We briefly review these results in the following paragraphs, and more details can be found in Supplementary Methods E. Cost of update. pyBRAvo queries of the private server are faster, although the data may be outdated in the long term. Depending on the call, the private SPARQL endpoint allows pyBRAvo to obtain a reduction of the computation time in a range of 31-49% of the time obtained when querying the PC endpoint.
The PyPath graph is composed of 6814 signed edges, labeled as stimulation, inhibition and stimulation and inhibition (291 edges), while the pyBRAvo graph has 5252 edges labeled as activation, inhibition and part_of. The PyPath graph contains only protein nodes (2049), while the pyBRAvo graph is composed of 2642 nodes of two different kinds, proteins (1571) and complexes (1071). Most of these complexes are protein complexes (1067), while the rest are small molecule complexes. This different nature of the entities may create the observed difference in node and edge size shown in Figure  3. We measured a coverage of 16. 48% of the 910 input genes for the PyPath graph and of 10. 9% for the pyBRAvo graph. These results indicate that in both databases (OmniPath and PC), the tools recovered upstream signaling events for only a small fraction of the 910 genes.
PyPath information, however, had a better coverage for this dataset. We can see in Table  3  that PyPath and pyBRAvo query different types of resources. In Table  4 , we show the different topological properties of both graphs. We can observe, for example, that the PyPath graph has more connected components than the pyBRAvo graph (37 vs. 18), suggesting that the information in PC, as interpreted by pyBRAvo, appears easier to assemble with respect to signed controlled signaling reactions. The pyBRAvo graph presents signed self-loops, which are real biological mechanisms useful in dynamic modeling. The PyPath graph shows 15. 7% of multiple edges as related to the same pair of nodes, while the proportion is 3. 7% in the pyBRAvo graph. This outcome shows that an interaction can be retrieved multiple times by different data sources contained in either Omnipath or PC, and repeated retrieval happens more often in Omnipath than in PC.
in The Cytoscape session containing the 10-level SN extracted using pyBRAvo is available online (https:// github. com/pyBRAvo/pyBRAvo/blob/master/cytoscape-vis /signaling_10levels_withoutUNK. cys). In Supplementary Figure  S11 , we visualize two small subgraphs of the predecessors of matrix metallopeptidase 2 (MMP2) protein as generated by pyBRAvo using the influence graph and hypergraph/reaction options (see Supplementary Methods A. 4). This hypergraph/reaction option is specific to pyBRAvo and is not available in PyPath.