Search in sources :

Example 1 with DefaultGraph

use of org.graphstream.graph.implementations.DefaultGraph in project mzmine2 by mzmine.

the class GNPSResultsImportTask method run.

/**
 * @see java.lang.Runnable#run()
 */
@Override
public void run() {
    setStatus(TaskStatus.PROCESSING);
    logger.info("Importing GNPS results for " + peakList);
    // remove zero ids from edges to prevent exception
    removeZeroIDFromEdge(file);
    Graph graph = new DefaultGraph("GNPS");
    if (importGraphData(graph, file)) {
        // import library matches from nodes
        importLibraryMatches(graph);
        // Add task description to peakList
        ((SimplePeakList) peakList).addDescriptionOfAppliedTask(new SimplePeakListAppliedMethod("Identification of complexes", parameters));
        // Repaint the window to reflect the change in the feature list
        Desktop desktop = MZmineCore.getDesktop();
        if (!(desktop instanceof HeadLessDesktop))
            desktop.getMainWindow().repaint();
        setStatus(TaskStatus.FINISHED);
        logger.info("Finished import of GNPS results for " + peakList);
    }
}
Also used : DefaultGraph(org.graphstream.graph.implementations.DefaultGraph) Graph(org.graphstream.graph.Graph) HeadLessDesktop(net.sf.mzmine.desktop.impl.HeadLessDesktop) Desktop(net.sf.mzmine.desktop.Desktop) DefaultGraph(org.graphstream.graph.implementations.DefaultGraph) SimplePeakList(net.sf.mzmine.datamodel.impl.SimplePeakList) SimplePeakListAppliedMethod(net.sf.mzmine.datamodel.impl.SimplePeakListAppliedMethod) HeadLessDesktop(net.sf.mzmine.desktop.impl.HeadLessDesktop)

Aggregations

SimplePeakList (net.sf.mzmine.datamodel.impl.SimplePeakList)1 SimplePeakListAppliedMethod (net.sf.mzmine.datamodel.impl.SimplePeakListAppliedMethod)1 Desktop (net.sf.mzmine.desktop.Desktop)1 HeadLessDesktop (net.sf.mzmine.desktop.impl.HeadLessDesktop)1 Graph (org.graphstream.graph.Graph)1 DefaultGraph (org.graphstream.graph.implementations.DefaultGraph)1