Package es.imim.DISGENET.network
Class NetworkBuilder
java.lang.Object
es.imim.DISGENET.network.NetworkBuilder
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
void
buildDiseaseNet
(GuiParameters curParams) Generic function to create disease networkvoid
buildGeneDiseaseNet
(GuiParameters curParams) Get the gene/disease net information from the database and call generic function to build netvoid
buildGeneNet
(GuiParameters curParams) Generic function to create gene networkvoid
buildNet
(List<String> list1, List<String> list2, List<String> nrCommonEntities, String src, GuiParameters params) Builds a new disease-disease or gene-gene network.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) void
buildVariantDiseaseNet
(GuiParameters curParams) Get the variant/disease net information from the database and call generic function to build netvoid
createCyEdgeAttributeColumns
(org.cytoscape.model.CyNetwork cyNetwork) org.cytoscape.model.CyNetwork
createCyNetwork
(String name) void
createNodeAttributeColumns
(org.cytoscape.model.CyNetwork cyNetwork) expandGeneDiseaseNet
(GuiParameters curParams, Map<String, Long> nodeMap) Expands the selected gene disease network using the selected nodes as reference.expandVariantDiseaseNet
(GuiParameters curParams, Map<String, Long> nodeMap) Expands the selected variant disease network using the selected nodes as reference.getDB()
Function to retrieve all node names from currently selected network to be able to search for them.void
initAdditionalStyleAttributes
(GuiParameters<?, ?> params) Fills the attribute columns for the different type of networks.void
Removes the gene nodes from the variant disease network and updates the view.void
void
Calls the method to expand a variant disease network and updates the view.
-
Constructor Details
-
NetworkBuilder
public NetworkBuilder() -
NetworkBuilder
-
-
Method Details
-
getDB
-
createCyNetwork
-
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, DisGeNetExceptionExpands 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, DisGeNetExceptionExpands 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
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
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
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
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
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
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 diseaseslist2
- duplication of the first listsrc
- selected source for the searchnrCommonEntities
- number of entities in commonparams
- 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
Fills the attribute columns for the different type of networks.- Parameters:
params
- the parameters given to the network.
-
addNetCreationListener
-
removeMoodListener
-