Class NetworkBuilder

java.lang.Object
es.imim.DISGENET.network.NetworkBuilder

public class NetworkBuilder extends Object
  • Constructor Details

    • NetworkBuilder

      public NetworkBuilder()
    • NetworkBuilder

      public NetworkBuilder(GuiParameters params)
  • Method Details

    • getDB

      public Database getDB()
    • createCyNetwork

      public org.cytoscape.model.CyNetwork createCyNetwork(String name)
    • createNodeAttributeColumns

      public void createNodeAttributeColumns(org.cytoscape.model.CyNetwork cyNetwork)
    • createCyEdgeAttributeColumns

      public void createCyEdgeAttributeColumns(org.cytoscape.model.CyNetwork cyNetwork)
    • expandGeneDiseaseNet

      public Map<String,Long> expandGeneDiseaseNet(GuiParameters curParams, Map<String,Long> nodeMap) throws SQLException, DisGeNetException
      Expands the selected gene disease network using the selected nodes as reference.
      Parameters:
      curParams - the parameters of the current network.
      nodeMap - the nodes that exist in the current network.
      Returns:
      map containing the existing nodes plus the added ones, with the name as key and the suid as value.
      Throws:
      DisGeNetException - low level exception with the message for the user.
      SQLException - in case of database access error.
    • expandVariantDiseaseNet

      public Map<String,Long> expandVariantDiseaseNet(GuiParameters curParams, Map<String,Long> nodeMap) throws SQLException, DisGeNetException
      Expands the selected variant disease network using the selected nodes as reference.
      Parameters:
      curParams - the parameters of the current network.
      nodeMap - the nodes that exist in the current network.
      Returns:
      map containing the existing nodes plus the added ones, with the name as key and the suid as value.
      Throws:
      DisGeNetException - low level exception with the error message for the user.
      SQLException - in case of database access error.
    • buildGeneDiseaseNet

      public void buildGeneDiseaseNet(GuiParameters curParams) throws DisGeNetException
      Get the gene/disease net information from the database and call generic function to build net
      Parameters:
      curParams - the current parameters of the network.
      Throws:
      DisGeNetException - low level exception with the message error for the user.
    • buildVariantDiseaseNet

      public void buildVariantDiseaseNet(GuiParameters curParams) throws DisGeNetException, SQLException
      Get the variant/disease net information from the database and call generic function to build net
      Parameters:
      curParams - the current parameters of the network.
      Throws:
      DisGeNetException - low level exception with the message error for the user.
      SQLException - in case of database access error.
    • showVariantNetWithGenes

      public void showVariantNetWithGenes() throws DisGeNetException, SQLException
      Calls the method to expand a variant disease network and updates the view.
      Throws:
      DisGeNetException - low level exception with the message error for the user.
      SQLException - low level exception with the message error for the user.
    • removeGenesFromVariantNet

      public void removeGenesFromVariantNet()
      Removes the gene nodes from the variant disease network and updates the view.
    • buildDiseaseNet

      public void buildDiseaseNet(GuiParameters curParams) throws DisGeNetException
      Generic function to create disease network
      Parameters:
      curParams - the current parameters of the network.
      Throws:
      DisGeNetException - low level exception with the message error for the user.
    • buildGeneNet

      public void buildGeneNet(GuiParameters curParams) throws DisGeNetException
      Generic function to create gene network
      Parameters:
      curParams - the current parameters of the network.
      Throws:
      DisGeNetException - low level exception with the message error for the user.
    • getNodeNamesFromNet

      public ArrayList<String> getNodeNamesFromNet()
      Function to retrieve all node names from currently selected network to be able to search for them.
      Returns:
      an arrayList containing the node names.
    • buildNet

      public void buildNet(List<String> list1, List<String> list2, List<String> nrCommonEntities, String src, GuiParameters params) throws DisGeNetException
      Builds a new disease-disease or gene-gene network.
      Parameters:
      list1 - list of genes or diseases
      list2 - duplication of the first list
      src - selected source for the search
      nrCommonEntities - number of entities in common
      params - current params for the network
      Throws:
      DisGeNetException - low level exception with the error message.
    • buildNetWithEdgeAttributes

      public void buildNetWithEdgeAttributes(ArrayList<String> intList, ArrayList<String> disList, ArrayList<String> genList, ArrayList<String> scoreList, ArrayList<String> eiList, ArrayList<String> yearList, ArrayList<String> yearFinalList, GuiParameters params) throws DisGeNetException
      Throws:
      DisGeNetException
    • initAdditionalStyleAttributes

      public void initAdditionalStyleAttributes(GuiParameters<?,?> params)
      Fills the attribute columns for the different type of networks.
      Parameters:
      params - the parameters given to the network.
    • addNetCreationListener

      public void addNetCreationListener(NetCreationListener l)
    • removeMoodListener

      public void removeMoodListener(NetCreationListener l)