name: create_pdata
namespace: eset
description: |
  Create a pdata file by combining the mapping statistics 
arguments:
- name: "--star_stats_file"
  type: file
  description: |
    Tab-delimited text file containing statistics (per column) that were generated
    from the STAR log files (Log.final.out, Summary.csv, ReadsPerGene.out.tab).
    Each entry (row) in the file describes the values for one well (barcode).
  required: true
- name: "--nrReadsNrGenesPerChromPool"
  type: file
  description: |
    Pivot table in tsv format of the combined nrReadsNrGenesPerChrom files from STAR. 
    Describes per chromosome (as columns) the number of reads, as well as the total number 
    of reads per cell barcode and the percentage of nuclear, ERCC and mitochondrial
    reads.
  required: true
- name: "--output"
  type: file
  direction: output
  default: pData.$id.txt
resources:
- type: python_script
  path: create_pdata.py
test_resources:
- type: python_script
  path: test.py
- path: nrReadsNrGenesPerChromPool.txt
- path: starLogs.txt

engines:
  - type: docker
    image: python:3.12-slim
    setup:
      - type: apt
        packages:
          - procps
      - type: python
        packages:
          - pandas
    test_setup:
      - type: python
        packages:
          - viashpy
runners:
  - type: executable
  - type: nextflow