Skip to content
Snippets Groups Projects
Commit aff77ff5 authored by Dominik Brilhaus's avatar Dominik Brilhaus
Browse files

add cwl

parent 81ade67a
No related branches found
No related tags found
No related merge requests found
MeasurementTableCSV:
class: File
path: ../../assays/SugarMeasurement/dataset/sugar_result.csv
FigureFileName: heatmap
\ No newline at end of file
import pandas as pd
import plotly.express as px
import sys
# Read command line arguments
MeasurementTableCSV=sys.argv[0]
FigureFileName=sys.argv[1]
# Read the CSV file
data = pd.read_csv(MeasurementTableCSV, index_col=0)
# Create a heatmap
fig = px.imshow(data,
labels=dict(x="Columns", y="Rows", color="Value"),
x=data.columns,
y=data.index)
# Save heatmap to file
fig.write_image(FigureFileName + ".svg")
#!/usr/bin/env cwl-runner
cwlVersion: v1.2
class: CommandLineTool
# hints:
# DockerRequirement:
# dockerPull:
requirements:
- class: InitialWorkDirRequirement
listing:
- entryname: heatmap.py
entry:
$include: heatmap.py
- class: NetworkAccess
networkAccess: true
baseCommand: [python, heatmap.py]
inputs:
MeasurementTableCSV:
type: File
inputBinding:
position: 1
FigureFileName:
type: string
inputBinding:
position: 2
outputs:
output:
type: File
outputBinding:
glob: "*.svg"
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment