From 8073319f9fb9bfff8acf476436329348e1c3d8fd Mon Sep 17 00:00:00 2001
From: Dominik Brilhaus <brilhaus@nfdi4plants.org>
Date: Sun, 10 Nov 2024 20:21:41 +0100
Subject: [PATCH] fix heatmap cwl

---
 workflows/heatmap/heatmap.py   | 8 +++-----
 workflows/heatmap/workflow.cwl | 5 +----
 2 files changed, 4 insertions(+), 9 deletions(-)

diff --git a/workflows/heatmap/heatmap.py b/workflows/heatmap/heatmap.py
index 79efcbd..facb405 100644
--- a/workflows/heatmap/heatmap.py
+++ b/workflows/heatmap/heatmap.py
@@ -3,11 +3,11 @@ import plotly.express as px
 import sys
 
 # Read command line arguments
-MeasurementTableCSV=sys.argv[0]
-FigureFileName=sys.argv[1]
+MeasurementTableCSV=sys.argv[1]
+FigureFileName=sys.argv[2]
 
 # Read the CSV file
-data = pd.read_csv(MeasurementTableCSV, index_col=0)
+data = pd.read_csv(MeasurementTableCSV, index_col=0, on_bad_lines='skip')
 
 # Create a heatmap
 fig = px.imshow(data, 
@@ -17,5 +17,3 @@ fig = px.imshow(data,
 
 # Save heatmap to file
 fig.write_image(FigureFileName + ".svg")
-
-
diff --git a/workflows/heatmap/workflow.cwl b/workflows/heatmap/workflow.cwl
index f080070..5ccb946 100644
--- a/workflows/heatmap/workflow.cwl
+++ b/workflows/heatmap/workflow.cwl
@@ -2,9 +2,6 @@
 
 cwlVersion: v1.2
 class: CommandLineTool
-# hints:
-#   DockerRequirement:
-#     dockerPull: 
 requirements:
   - class: InitialWorkDirRequirement
     listing:
@@ -13,7 +10,7 @@ requirements:
           $include: heatmap.py
   - class: NetworkAccess
     networkAccess: true
-baseCommand: [python, heatmap.py]
+baseCommand: [python3, heatmap.py]
 inputs:
   MeasurementTableCSV:
     type: File
-- 
GitLab