Skip to content

Commit

Permalink
rework tutorial
Browse files Browse the repository at this point in the history
  • Loading branch information
cbielow committed Jun 4, 2024
1 parent 2a5b34e commit afa3c9d
Show file tree
Hide file tree
Showing 30 changed files with 634 additions and 629 deletions.
Binary file modified doc/doxygen/images/TOPPAS_edges.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified doc/doxygen/images/TOPPAS_parameters.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added doc/doxygen/images/TOPPAS_recycling.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified doc/doxygen/images/TOPPAS_simple_example.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
120 changes: 76 additions & 44 deletions doc/doxygen/public/TOPPAS.doxygen

Large diffs are not rendered by default.

87 changes: 54 additions & 33 deletions share/OpenMS/examples/TOPPAS/Ecoli_Identification.toppas

Large diffs are not rendered by default.

22 changes: 20 additions & 2 deletions share/OpenMS/examples/TOPPAS/QualityControl.toppas
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@
<PARAMETERS version="1.7.0" xsi:noNamespaceSchemaLocation="https://raw.githubusercontent.com/OpenMS/OpenMS/develop/share/OpenMS/SCHEMAS/Param_1_7_0.xsd" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<NODE name="info" description="">
<ITEM name="version" value="3.1.0-pre-disabled-20240527" type="string" description="" required="false" advanced="false" />
<ITEM name="num_vertices" value="25" type="int" description="" required="false" advanced="false" />
<ITEM name="num_edges" value="31" type="int" description="" required="false" advanced="false" />
<ITEM name="num_vertices" value="26" type="int" description="" required="false" advanced="false" />
<ITEM name="num_edges" value="32" type="int" description="" required="false" advanced="false" />
<ITEM name="description" value="&lt;![CDATA[&lt;!DOCTYPE HTML PUBLIC &quot;-//W3C//DTD HTML 4.0//EN&quot; &quot;http://www.w3.org/TR/REC-html40/strict.dtd&quot;&gt; &lt;html&gt;&lt;head&gt;&lt;meta name=&quot;qrichtext&quot; content=&quot;1&quot; /&gt;&lt;style type=&quot;text/css&quot;&gt; p, li { white-space: pre-wrap; } &lt;/style&gt;&lt;/head&gt;&lt;body style=&quot; font-family:&apos;Arial&apos;; font-size:12pt; font-weight:400; font-style:normal;&quot;&gt; &lt;p style=&quot;-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;br /&gt;&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;]]&gt;" type="string" description="" required="false" advanced="false" />
</NODE>
<NODE name="vertices" description="">
Expand Down Expand Up @@ -715,6 +715,13 @@
<ITEM name="recycle_output" value="false" type="string" description="" required="false" advanced="false" />
<ITEM name="output_folder_name" value="" type="string" description="" required="false" advanced="false" />
</NODE>
<NODE name="25" description="">
<ITEM name="toppas_type" value="output file list" type="string" description="" required="false" advanced="false" />
<ITEM name="x_pos" value="-260.0" type="double" description="" required="false" advanced="false" />
<ITEM name="y_pos" value="160.0" type="double" description="" required="false" advanced="false" />
<ITEM name="recycle_output" value="false" type="string" description="" required="false" advanced="false" />
<ITEM name="output_folder_name" value="" type="string" description="" required="false" advanced="false" />
</NODE>
</NODE>
<NODE name="edges" description="">
<NODE name="0" description="">
Expand Down Expand Up @@ -1058,5 +1065,16 @@
<ITEM name="" value="__no_name__" type="string" description="" required="false" advanced="false" />
</NODE>
</NODE>
<NODE name="31" description="">
<NODE name="source/target" description="">
<ITEM name="" value="5/25" type="string" description="" required="false" advanced="false" />
</NODE>
<NODE name="source_out_param" description="">
<ITEM name="" value="out" type="string" description="" required="false" advanced="false" />
</NODE>
<NODE name="target_in_param" description="">
<ITEM name="" value="__no_name__" type="string" description="" required="false" advanced="false" />
</NODE>
</NODE>
</NODE>
</PARAMETERS>
32 changes: 17 additions & 15 deletions share/OpenMS/examples/TOPPAS/peakpicker_tutorial.toppas
Original file line number Diff line number Diff line change
@@ -1,36 +1,38 @@
<?xml version="1.0" encoding="ISO-8859-1"?>
<PARAMETERS version="1.7.0" xsi:noNamespaceSchemaLocation="https://raw.githubusercontent.com/OpenMS/OpenMS/develop/share/OpenMS/SCHEMAS/Param_1_7_0.xsd" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<NODE name="info" description="">
<ITEM name="version" value="3.1.0-pre-disabled-20231206" type="string" description="" required="false" advanced="false" />
<ITEM name="version" value="3.1.0-pre-disabled-20240603" type="string" description="" required="false" advanced="false" />
<ITEM name="num_vertices" value="5" type="int" description="" required="false" advanced="false" />
<ITEM name="num_edges" value="4" type="int" description="" required="false" advanced="false" />
<ITEM name="description" value="&lt;![CDATA[&lt;!DOCTYPE HTML PUBLIC &quot;-//W3C//DTD HTML 4.0//EN&quot; &quot;http://www.w3.org/TR/REC-html40/strict.dtd&quot;&gt;
&lt;html&gt;&lt;head&gt;&lt;meta name=&quot;qrichtext&quot; content=&quot;1&quot; /&gt;&lt;style type=&quot;text/css&quot;&gt;
p, li { white-space: pre-wrap; }
&lt;/style&gt;&lt;/head&gt;&lt;body style=&quot; font-family:&apos;Arial&apos;; font-size:12pt; font-weight:400; font-style:normal;&quot;&gt;
&lt;p style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt; &lt;/p&gt;
&lt;p style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt; &lt;/p&gt;
&lt;p style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;span style=&quot; color:#000000;&quot;&gt;Basic peak picking pipeline using PeakPickerHiRes.&lt;/span&gt;&lt;/p&gt;
&lt;p style=&quot;-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; color:#000000;&quot;&gt;&lt;br /&gt;&lt;/p&gt;
&lt;p style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;span style=&quot; color:#000000;&quot;&gt;The fist steps are NoiseFilterSGolay (assuming low-res data) and BaselineFilter (for MALDI data) to smooth the data and remove a baseline.&lt;/span&gt;&lt;/p&gt;
&lt;p style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;span style=&quot; color:#000000;&quot;&gt;Depending on your data, either of the two filters may be removed or reconfigured with other parameters.&lt;/span&gt;&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;]]&gt;" type="string" description="" required="false" advanced="false" />
&lt;p style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;span style=&quot; color:#000000;&quot;&gt;Depending on your data, either of the two filters may be removed or reconfigured with other parameters.&lt;/span&gt;&lt;/p&gt;
&lt;p style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;span style=&quot; color:#000000;&quot;&gt;As a last step, PeakPickerHiRes will convert profile peaks into centroided peaks and store the result in Node #5 as mzML file.&lt;/span&gt;&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;]]&gt;" type="string" description="" required="false" advanced="false" />
</NODE>
<NODE name="vertices" description="">
<NODE name="0" description="">
<ITEM name="recycle_output" value="false" type="string" description="" required="false" advanced="false" />
<ITEM name="toppas_type" value="input file list" type="string" description="" required="false" advanced="false" />
<ITEM name="x_pos" value="-320.0" type="double" description="" required="false" advanced="false" />
<ITEM name="y_pos" value="0.0" type="double" description="" required="false" advanced="false" />
<ITEM name="recycle_output" value="false" type="string" description="" required="false" advanced="false" />
<ITEMLIST name="file_names" type="string" description="" required="false" advanced="false">
<LISTITEM value="../peakpicker_tutorial_1.mzML"/>
</ITEMLIST>
<ITEM name="x_pos" value="-320.0" type="double" description="" required="false" advanced="false" />
<ITEM name="y_pos" value="0.0" type="double" description="" required="false" advanced="false" />
</NODE>
<NODE name="1" description="">
<ITEM name="recycle_output" value="false" type="string" description="" required="false" advanced="false" />
<ITEM name="toppas_type" value="tool" type="string" description="" required="false" advanced="false" />
<ITEM name="tool_name" value="NoiseFilterSGolay" type="string" description="" required="false" advanced="false" />
<ITEM name="tool_type" value="" type="string" description="" required="false" advanced="false" />
<ITEM name="x_pos" value="-140.0" type="double" description="" required="false" advanced="false" />
<ITEM name="y_pos" value="0.0" type="double" description="" required="false" advanced="false" />
<ITEM name="recycle_output" value="false" type="string" description="" required="false" advanced="false" />
<ITEM name="tool_name" value="NoiseFilterSGolay" type="string" description="" required="false" advanced="false" />
<ITEM name="tool_type" value="" type="string" description="" required="false" advanced="false" />
<NODE name="parameters" description="">
<ITEM name="in" value="" type="input-file" description="input raw data file " required="true" advanced="false" supported_formats="*.mzML" />
<ITEM name="out" value="" type="output-file" description="output raw data file " required="true" advanced="false" supported_formats="*.mzML" />
Expand All @@ -46,12 +48,12 @@ p, li { white-space: pre-wrap; }
</NODE>
</NODE>
<NODE name="2" description="">
<ITEM name="recycle_output" value="false" type="string" description="" required="false" advanced="false" />
<ITEM name="toppas_type" value="tool" type="string" description="" required="false" advanced="false" />
<ITEM name="tool_name" value="BaselineFilter" type="string" description="" required="false" advanced="false" />
<ITEM name="tool_type" value="" type="string" description="" required="false" advanced="false" />
<ITEM name="x_pos" value="40.0" type="double" description="" required="false" advanced="false" />
<ITEM name="y_pos" value="0.0" type="double" description="" required="false" advanced="false" />
<ITEM name="recycle_output" value="false" type="string" description="" required="false" advanced="false" />
<ITEM name="tool_name" value="BaselineFilter" type="string" description="" required="false" advanced="false" />
<ITEM name="tool_type" value="" type="string" description="" required="false" advanced="false" />
<NODE name="parameters" description="">
<ITEM name="in" value="" type="input-file" description="input raw data file " required="true" advanced="false" supported_formats="*.mzML" />
<ITEM name="out" value="" type="output-file" description="output raw data file " required="true" advanced="false" supported_formats="*.mzML" />
Expand All @@ -66,12 +68,12 @@ p, li { white-space: pre-wrap; }
</NODE>
</NODE>
<NODE name="3" description="">
<ITEM name="recycle_output" value="false" type="string" description="" required="false" advanced="false" />
<ITEM name="toppas_type" value="tool" type="string" description="" required="false" advanced="false" />
<ITEM name="tool_name" value="PeakPickerHiRes" type="string" description="" required="false" advanced="false" />
<ITEM name="tool_type" value="" type="string" description="" required="false" advanced="false" />
<ITEM name="x_pos" value="220.0" type="double" description="" required="false" advanced="false" />
<ITEM name="y_pos" value="0.0" type="double" description="" required="false" advanced="false" />
<ITEM name="recycle_output" value="false" type="string" description="" required="false" advanced="false" />
<ITEM name="tool_name" value="PeakPickerHiRes" type="string" description="" required="false" advanced="false" />
<ITEM name="tool_type" value="" type="string" description="" required="false" advanced="false" />
<NODE name="parameters" description="">
<ITEM name="in" value="" type="input-file" description="input profile data file " required="true" advanced="false" supported_formats="*.mzML" />
<ITEM name="out" value="" type="output-file" description="output peak file " required="true" advanced="false" supported_formats="*.mzML" />
Expand Down Expand Up @@ -106,10 +108,10 @@ p, li { white-space: pre-wrap; }
</NODE>
</NODE>
<NODE name="4" description="">
<ITEM name="recycle_output" value="false" type="string" description="" required="false" advanced="false" />
<ITEM name="toppas_type" value="output file list" type="string" description="" required="false" advanced="false" />
<ITEM name="x_pos" value="400.0" type="double" description="" required="false" advanced="false" />
<ITEM name="y_pos" value="0.0" type="double" description="" required="false" advanced="false" />
<ITEM name="recycle_output" value="false" type="string" description="" required="false" advanced="false" />
<ITEM name="output_folder_name" value="" type="string" description="" required="false" advanced="false" />
</NODE>
</NODE>
Expand Down
69 changes: 35 additions & 34 deletions src/openms_gui/include/OpenMS/VISUAL/TOPPASInputFileListVertex.h
Original file line number Diff line number Diff line change
Expand Up @@ -20,43 +20,44 @@ namespace OpenMS
@ingroup TOPPAS_elements
*/
class OPENMS_GUI_DLLAPI TOPPASInputFileListVertex :
public TOPPASVertex
{
Q_OBJECT
class OPENMS_GUI_DLLAPI TOPPASInputFileListVertex : public TOPPASVertex
{
Q_OBJECT

public:
/// Default constructor
TOPPASInputFileListVertex() = default;
/// Constructor
TOPPASInputFileListVertex(const QStringList& files);
/// Copy constructor
TOPPASInputFileListVertex(const TOPPASInputFileListVertex& rhs) = default;
/// Destructor
~TOPPASInputFileListVertex() override = default;
/// Assignment operator
TOPPASInputFileListVertex& operator=(const TOPPASInputFileListVertex& rhs) = default;

virtual std::unique_ptr<TOPPASVertex> clone() const override;

/// Default constructor
TOPPASInputFileListVertex() = default;
/// Constructor
TOPPASInputFileListVertex(const QStringList& files);
/// Copy constructor
TOPPASInputFileListVertex(const TOPPASInputFileListVertex& rhs) = default;
/// Destructor
~TOPPASInputFileListVertex() override = default;
/// Assignment operator
TOPPASInputFileListVertex & operator=(const TOPPASInputFileListVertex & rhs) = default;
/// returns "InputVertex"
String getName() const override;
/// Sets the list of files
void setFilenames(const QStringList & files);
/// Starts all tools below this node
void run() override;
// documented in base class
void paint(QPainter * painter, const QStyleOptionGraphicsItem * option, QWidget * widget) override;
// documented in base class
QRectF boundingRect() const override;
/// Checks if the given list of file names is valid
bool fileNamesValid();
/// Shows the dialog for editing the files
void showFilesDialog();
/// Opens the folders of the input files
void openContainingFolder();
/// Returns the key (for applying resources from a resource file)
const QString & getKey();
/// Sets the key (for applying resources from a resource file)
void setKey(const QString & key);
/// returns "InputVertex"
String getName() const override;
/// Sets the list of files
void setFilenames(const QStringList & files);
/// Starts all tools below this node
void run() override;
// documented in base class
void paint(QPainter * painter, const QStyleOptionGraphicsItem * option, QWidget * widget) override;
// documented in base class
QRectF boundingRect() const override;
/// Checks if the given list of file names is valid
bool fileNamesValid();
/// Shows the dialog for editing the files
void showFilesDialog();
/// Opens the folders of the input files
void openContainingFolder();
/// Returns the key (for applying resources from a resource file)
const QString & getKey();
/// Sets the key (for applying resources from a resource file)
void setKey(const QString & key);

public slots:
/// Called by an outgoing edge when it has changed
Expand Down
53 changes: 27 additions & 26 deletions src/openms_gui/include/OpenMS/VISUAL/TOPPASMergerVertex.h
Original file line number Diff line number Diff line change
Expand Up @@ -29,35 +29,36 @@ namespace OpenMS
@ingroup TOPPAS_elements
*/
class OPENMS_GUI_DLLAPI TOPPASMergerVertex :
public TOPPASVertex
{
Q_OBJECT
class OPENMS_GUI_DLLAPI TOPPASMergerVertex : public TOPPASVertex
{
Q_OBJECT

public:
/// Default constructor
TOPPASMergerVertex() = default;
/// Constructor
TOPPASMergerVertex(bool round_based);
/// Copy constructor
TOPPASMergerVertex(const TOPPASMergerVertex& rhs) = default;
/// Destructor
~TOPPASMergerVertex() override = default;
/// Assignment operator
TOPPASMergerVertex& operator=(const TOPPASMergerVertex& rhs) = default;

virtual std::unique_ptr<TOPPASVertex> clone() const override;

/// Default constructor
TOPPASMergerVertex() = default;
/// Constructor
TOPPASMergerVertex(bool round_based);
/// Copy constructor
TOPPASMergerVertex(const TOPPASMergerVertex& rhs) = default;
/// Destructor
~TOPPASMergerVertex() override = default;
/// Assignment operator
TOPPASMergerVertex& operator=(const TOPPASMergerVertex& rhs) = default;
/// returns "MergerVertex"
String getName() const override;
/// check if upstream nodes are finished and call downstream nodes
void run() override;
/// Determines whether this merger is merging round based or merging all inputs into one list
bool roundBasedMode() const;
// documented in base class
void paint(QPainter* painter, const QStyleOptionGraphicsItem* option, QWidget* widget) override;
// documented in base class
QRectF boundingRect() const override;
// documented in base class
void markUnreachable() override;
/// returns "MergerVertex"
String getName() const override;
/// check if upstream nodes are finished and call downstream nodes
void run() override;
/// Determines whether this merger is merging round based or merging all inputs into one list
bool roundBasedMode() const;
// documented in base class
void paint(QPainter* painter, const QStyleOptionGraphicsItem* option, QWidget* widget) override;
// documented in base class
QRectF boundingRect() const override;
// documented in base class
void markUnreachable() override;

public slots:

Expand Down
28 changes: 4 additions & 24 deletions src/openms_gui/include/OpenMS/VISUAL/TOPPASOutputFileListVertex.h
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
// OpenMS_GUI config
#include <OpenMS/VISUAL/OpenMS_GUIConfig.h>

#include <OpenMS/VISUAL/TOPPASVertex.h>
#include <OpenMS/VISUAL/TOPPASOutputVertex.h>

namespace OpenMS
{
Expand All @@ -26,37 +26,17 @@ namespace OpenMS
Q_OBJECT

public:
virtual std::unique_ptr<TOPPASVertex> clone() const override;
/// returns "OutputFileVertex"
String getName() const override;
// documented in base class
void paint(QPainter * painter, const QStyleOptionGraphicsItem * option, QWidget * widget) override;
// documented in base class
QRectF boundingRect() const override;
// documented in base class
void reset(bool reset_all_files = false) override;
/// opens the folder containing the output data
void mouseDoubleClickEvent(QGraphicsSceneMouseEvent*) override;

/// Called when the parent node has finished execution
void run() override;
/// Returns the full directory (including preceding output path as selected by user)
String getFullOutputDirectory() const;
/// Returns the directory where the output files are stored
String getOutputDir() const;
/// Creates the output directory for this node
String createOutputDir() const;
/// Sets the topological sort number and removes invalidated tmp files
void setTopoNr(UInt nr) override;
/// Opens the folders of the output files
void openContainingFolder() const;
/// Sets a custom output folder name, which will be integrated into 'getOutputDir()' and 'getFullOutputDirectory()' calls.
/// @note The string is not checked for validity (avoid characters which are not allowed in directories, e.g. '{')
void setOutputFolderName(const QString& name);
/// return the output folder where results are written
const QString& getOutputFolderName() const;

public slots:
//documented in base class
void inEdgeHasChanged() override;

};
}

Loading

0 comments on commit afa3c9d

Please sign in to comment.