Skip to content

File type ext

Peter Ebert edited this page Oct 24, 2025 · 1 revision
author date tags
PE 2025-10-24 cubi, internal, convention, sop, rule, policy, standard

CUBI workflow and projects: allowed file types

This SOP complements all other SOPs related to code development such as describing the general dev process, naming and style and so on.

SOP scope

This SOP sets rules for file types and associated file extensions that are allowed to be created by the CUBI developers in workflow or project repositories.

For file types not mentioned here, the general guideline applies that text-based files that can be read or manipulated with general-purpose software must always be preferred over any other more domain-specific file type.

NB: for external files, e.g., annotation data/tables provided by clients, follow the SOP of storing the file unaltered (only adding a date stamp to the file name if needed) under annotations/raw; then create an unaltered text export under annotations/export (see CUBI KB)

File types

Coding

  1. Jupyter notebook: .ipynb
    • Jupyter notebooks must not be used as a replacement for a proper script to be executed as part of a workflow
  2. Python (script): .py
    • scripts must always be marked as executable
    • scripts must always contain the relevant shebang line
      • #!/usr/bin/env python or #!/usr/bin/env python3
    • scripts must not be implemented with a dependency on a specific workflow engine
  3. R (script): .R
    • scripts must always be marked as executable
    • scripts must always contain the relevant shebang line
      • #!/usr/bin/env Rscript
    • scripts must not be implemented with a dependency on a specific workflow engine
  4. Snakemake:
    • main Snakefile only (per workflow): Snakefile
    • all other snakemake files: .smk
  5. Nextflow: .nxf
  6. Bash script: .sh
    • the use of bash scripts is discouraged
      • use Snakemake for workflow-like automation
      • use Python for tool-like/system-level automation
    • scripts must always be marked as executable
    • scripts must always contain the relevant shebang line
      • #!/usr/bin/env bash
  7. awk script: (package as bash script, see above)

Configuration

  1. YAML: .yaml
    • preferred config file format
  2. TOML: .toml
    • only used for special file pyproject.toml
  3. JSON: .json
  4. Apptainer (Singularity) definition file: .def

Documentation

  1. Markdown: .md

Annotation

  1. Tab-separated text table: .tsv
  2. Comma-separated text table: .csv
    • strongly discouraged, use tab-separation

Clone this wiki locally