Front. Genet.Frontiers in GeneticsFront. Genet.1664-8021Frontiers Media S.A.10.3389/fgene.2021.706854GeneticsBrief Research ReportCrosslink: An R Package for Network Visualization of Grouped NodesLiuDi1BaiZhijie2LiuBing234*LiZongcheng3*1Peking-Tsinghua Center for Life Sciences, Peking University, Beijing, China2State Key Laboratory of Proteomics, Academy of Military Medical Sciences, Academy of Military Sciences, Beijing, China3State Key Laboratory of Experimental Hematology, Institute of Hematology, Fifth Medical Center of Chinese PLA General Hospital, Beijing, China4Key Laboratory for Regenerative Medicine of Ministry of Education, Institute of Hematology, School of Medicine, Jinan University, Guangzhou, China
Edited by: Guangchuang Yu, Southern Medical University, China
Reviewed by: Matthew N. Bernstein, Morgridge Institute for Research, United States; Kira Vyatkina, Saint Petersburg Academic University (RAS), Russia
This is an open-access article distributed under the terms of the Creative Commons Attribution License (CC BY). The use, distribution or reproduction in other forums is permitted, provided the original author(s) and the copyright owner(s) are credited and that the original publication in this journal is cited, in accordance with accepted academic practice. No use, distribution or reproduction is permitted which does not comply with these terms.
The demand for network visualization of relationships between nodes attributed to different categories grows in various biomedical research scenarios, such as gene regulatory networks, drug-target networks, ligand-receptor interactions and association networks of multi-omics elements. Elegantly visualizing the relationships between nodes with complex metadata of nodes and edges appended may inspire new insights. Here, we developed the crosslink R package, tailored for network visualization of grouped nodes, to provide a series of flexible functions for generating network diagrams. We first designed a CrossLink class for storage of metadata about nodes and edges and manipulation of node coordinates. Then affine transformation and function mapping transformation are implemented to perform fundamental node coordinates transformation by groups, based on which various network layouts can be defined easily. For convenience, we predefined several commonly used layouts, including row, column, arc, polygon and hive, which also can be combined in one layout. Finally, we designed a user-friendly wrapper function to draw network connections, aesthetic mappings of metadata and decoration with related annotation graphs in one interface by taking advantage of the powerful ggplot2 system. Overall, the crosslink R package is easy-to-use for achieving complex visualization of a network diagram of grouped nodes surrounded by associated annotation graphs.
Availability and Implementation
Cosslink is an open-source R package, freely available from github: https://github.com/zzwch/crosslink; A detailed user documentation can be found in https://zzwch.github.io/crosslink/.
R packagenetworkvisualizationgrouped datacrosslink
With the rapid development of multi-omic technologies, intricate relationships between different categories of biomedical molecules were established, which brought huge opportunities and challenges to network visualization. Visualization of relationships between various biomolecules from different layers is helpful to explain and extract comprehensive biological information. For instance, Youqiong Ye etc. presented the network among the identified molecular alterations and the sensitivity of anticancer drugs to directly display a multi-omic molecular feature landscape of tumor hypoxia (Ye et al., 2019). And recently, there is a study characterizing the network among the expression of altered m6A regulators and cancer related pathways to illustrate the role of m6A in carcinogenesis (Li et al., 2019). Besides, researches in brain disease and plant development often provide an intuitive correlation network diagram to explain the influence of key regulators on other related layers (Shahan et al., 2018; Gilson et al., 2020). These cases show the common elements required for network visualization in many biomedical researches: (1) connections between multiple groups of biomolecules (i.e., grouped nodes), (2) mapping of additional biological information onto biomolecules and connections (i.e., nodes and edges), (3) arrangement of biomolecules in columns according to their categories, and (4) combination of annotation graphs around the network diagram.
A number of tools have been developed for visualization of various complex network, such as Cytoscape (Shannon et al., 2003), igraph (Csardi and Nepusz, 2006), ggraph (Pedersen, 2020) and Gelphi (Bastian et al., 2009). Recently, CellChat (Jin et al., 2021) was released to specifically analyze and visualize cell-cell communication network. Importantly, none of the tools above offer the function to combine the network diagram with the corresponding annotation graphs for grouped nodes. For the present, a tool specially designed for network visualization of grouped nodes that supports nodes decoration with annotation plots is still lacking.
Therefore, the user-friendly R package crosslink is developed here to arrange nodes by group, map metadata onto aesthetics of nodes and edges and align annotation graphs with the network. This package would hopefully meet various specific demands on network visualization of grouped biomolecules in biomedical research.
Materials and Methods
The crosslink is developed in R language and mainly includes four modules, which is CrossLink class, coordinate transformation methods, layout modules and the plotting function, as shown in Figure 1A. The CrossLink class is the basic module, storing the metadata of nodes and edges, node coordinates and other parameters. The other three modules are operated on the data structure of CrossLink class. Here, we termed the group of nodes as “cross” and the edge between groups as “link”.
Overviw and usage examples of crosslink. (A). A schematic diagram of crosslink showing four modules and associated functions. (B) Schematic diagram and examples showing transformation effects after using the coordinate transformation functions as indicated. (C) Examples of five predefined layout styles. (D) A typical application of combination network visualization by using crosslink.
First, the function “crosslink” is used to generate a CrossLink object. With this function users can easily initialize a default network by inputting nodes and edges information. Several adjustments including spaces between nodes and gaps between crosses (groups) are also available for fine-tuning the default layout.
Second, coordinate transformation module, consisting of several affine transformation methods and the method to define the function for mapping transformation, is then applied for node coordinate transforming by crosses. The “tf_affine” function is designed for coordinate transforming of grouped nodes in the network. It requires a CrossLink object as the input and returns the object with transformed coordinates. This function provides several designed modes including rotating, shifting, shearing, flipping and scaling (Figure 1B), which would be useful when adjusting node coordinates in one or all groups to beautify presentation of complex relationships among multiple types of data, as shown in Figure 1D. The “tf_fun” interface allows users to customize transforming function according to specific needs. Here, as an example, we designed a “sin” transformation method using “tf_fun” interface to illustrate its usage (Figure 1B).
Third, commonly used styles are predefined in the layout module, including row, column, arc, polygon and hive as shown inFigure 1C. Users can specify a predefined network layout or combine multiple predefined layouts to design a diverse network.
Fourth, the plotting function “cl_plot” allows various aesthetic settings for nodes, edges, node labels and headers by taking advantage of “ggplot2” system (Ito and Murphy, 2013). In particular, this function provides the annotation interface to achieve the combination of the network diagram and corresponding annotation graphs, with node coordinates aligned (Figure 1D). Additionally, the plotting module also includes several data extraction functions, such as “get_cross” and “get_link”, which can be used to obtain the coordinate and metadata information. The “set_header” function is provided to place cross (group) headers.
In summary, crosslink provides a friendly interface for users to realize diverse network plotting of grouped nodes. This package can be applied to various biomedical studies for visualizing complex information and relationships between biomolecules in different categories (Goh et al., 2007; Neph et al., 2012; Chen and Wu, 2013; Shahan et al., 2018).
Discussion
This work presented the first network visualization R package tailored for grouped nodes that implements a series of functions to store network data, manipulate node coordinates, and plot network diagram with supports for aesthetic mappings for nodes and edges and aligned graph annotation.
Data Availability Statement
The original contributions presented in the study are included in the article/Supplementary Material, further inquiries can be directed to the corresponding author/s.
Author Contributions
ZL and BL conceived and designed the study. ZL completed the R package “crosslink” and wrote the manuscript. DL performed the figure test and wrote the user guide and the manuscript. ZB proofread and corrected the manuscript. All authors contributed to the article and approved the submitted version.
Conflict of Interest
The authors declare that the research was conducted in the absence of any commercial or financial relationships that could be construed as a potential conflict of interest.
Funding. This work was supported by the National Natural Science Foundation of China (81900115 and 31930054).
Supplementary Material
The Supplementary Material for this article can be found online at: /articles/10.3389/fgene.2021.706854/full#supplementary-material
ReferencesBastianM.SebastienH.MathieuJ. (2009). “Gephi: an open source software for exploring and manipulating networks,” in Proceeding of the International AAAI Conference on Web and Social Media.ChenB. S.WuC. C. (2013). Systems biology as an integrated platform for bioinformatics, systems synthetic biology, and systems metabolic engineering.Cells2635–688. 10.3390/cells204063524709875CsardiG.NepuszT. (2006). The igraph software package for complex network research.InterJ. Comp. Syst.1695. Available online at: https://igraph.orgGilsonM.Zamora-LópezG.PallarésV.AdhikariM. H.SendenM.CampoA. T. (2020). Model-based whole-brain effective connectivity to study distributed cognition in health and disease.Netw Neurosci.4338–373. 10.1162/netn_a_00117GohK. I.CusickM. E.ValleD.ChildsB.VidalM.BarabásiA. L. (2007). The human disease network.Proc. Natl. Acad. Sci. U.S.A.1048685–8690. 10.1073/pnas.070136110417502601ItoK.MurphyD. (2013). Application of ggplot2 to pharmacometric graphics.CPT Pharmacometrics Syst. Pharmacol.2:e79. 10.1038/psp.2013.5624132163JinS.Guerrero-JuarezC. F.ZhangL.ChangI.RamosR.KuanC. H. (2021). Inference and analysis of cell-cell communication using CellChat.Nat. Commun.12:1088. 10.1038/s41467-021-21246-933597522LiY.XiaoJ.BaiJ.TianY.QuY.ChenX. (2019). Molecular characterization and clinical relevance of m(6)a regulators across 33 cancer types.Mol. Cancer18:137. 10.1186/s12943-019-1066-331521193NephS.StergachisA. B.ReynoldsA.SandstromR.BorensteinE.StamatoyannopoulosJ. A. (2012). Circuitry and dynamics of human transcription factor regulatory networks.Cell1501274–1286. 10.1016/j.cell.2012.04.04022959076PedersenT. L. (2020). ggraph: An Implementation of Grammar of Graphics for Graphs and Networks.R package version 2.0.4. Available online at: https://CRAN.R-project.org/package=ggraphShahanR.ZaworaC.WightH.SittmannJ.WangW.MountS. M. (2018). Consensus coexpression network analysis identifies key regulators of flower and fruit development in wild strawberry.Plant Physiol.178202–216. 10.1104/pp.18.0008629991484ShannonP.MarkielA.OzierO.BaligaN. S.WangJ. T.RamageD. (2003). Cytoscape: a software environment for integrated models of biomolecular interaction networks.Genome Res.132498–2504. 10.1101/gr.123930314597658YeY.HuQ.ChenH.LiangK.YuanY.XiangY. (2019). Characterization of hypoxia-associated molecular features to aid hypoxia-targeted therapy.Nat. Metab1431–444. 10.1038/s42255-019-0045-831984309‘Oh, my dear Thomas, you haven’t heard the terrible news then?’ she said. ‘I thought you would be sure to have seen it placarded somewhere. Alice went straight to her room, and I haven’t seen her since, though I repeatedly knocked at the door, which she has locked on the inside, and I’m sure it’s most unnatural of her not to let her own mother comfort her. It all happened in a moment: I have always said those great motor-cars shouldn’t be allowed to career about the streets, especially when they are all paved with cobbles as they are at Easton Haven, which are{331} so slippery when it’s wet. He slipped, and it went over him in a moment.’ My thanks were few and awkward, for there still hung to the missive a basting thread, and it was as warm as a nestling bird. I bent low--everybody was emotional in those days--kissed the fragrant thing, thrust it into my bosom, and blushed worse than Camille. "What, the Corner House victim? Is that really a fact?" "My dear child, I don't look upon it in that light at all. The child gave our picturesque friend a certain distinction--'My husband is dead, and this is my only child,' and all that sort of thing. It pays in society." leave them on the steps of a foundling asylum in order to insure [See larger version] Interoffice guff says you're planning definite moves on your own, J. O., and against some opposition. Is the Colonel so poor or so grasping—or what? Albert could not speak, for he felt as if his brains and teeth were rattling about inside his head. The rest of[Pg 188] the family hunched together by the door, the boys gaping idiotically, the girls in tears. "Now you're married." The host was called in, and unlocked a drawer in which they were deposited. The galleyman, with visible reluctance, arrayed himself in the garments, and he was observed to shudder more than once during the investiture of the dead man's apparel. HoME香京julia种子在线播放
ENTER NUMBET 0016www.hfyhego.com.cn jyyczz.com.cn www.hocgnw.com.cn gyrjtd.com.cn www.formit.com.cn www.gersnq.com.cn www.qzchain.com.cn www.mtwu.com.cn www.phoike.com.cn www.tpchain.com.cn