name: "make_reference"
namespace: "workflows/ingestion"
version: "v4.0.2"
authors:
- name: "Angela Oliveira Pisco"
  roles:
  - "author"
  info:
    role: "Contributor"
    links:
      github: "aopisco"
      orcid: "0000-0003-0142-2355"
      linkedin: "aopisco"
    organizations:
    - name: "Insitro"
      href: "https://insitro.com"
      role: "Director of Computational Biology"
    - name: "Open Problems"
      href: "https://openproblems.bio"
      role: "Core Member"
- name: "Robrecht Cannoodt"
  roles:
  - "author"
  - "maintainer"
  info:
    role: "Core Team Member"
    links:
      email: "robrecht@data-intuitive.com"
      github: "rcannood"
      orcid: "0000-0003-3641-729X"
      linkedin: "robrechtcannoodt"
    organizations:
    - name: "Data Intuitive"
      href: "https://www.data-intuitive.com"
      role: "Data Science Engineer"
    - name: "Open Problems"
      href: "https://openproblems.bio"
      role: "Core Member"
- name: "Weiwei Schultz"
  roles:
  - "contributor"
  info:
    role: "Contributor"
    organizations:
    - name: "Janssen R&D US"
      role: "Associate Director Data Sciences"
argument_groups:
- name: "Inputs"
  arguments:
  - type: "string"
    name: "--id"
    description: "ID of the reference."
    info: null
    example:
    - "foo"
    required: true
    direction: "input"
    multiple: false
    multiple_sep: ";"
  - type: "file"
    name: "--genome_fasta"
    description: "Reference genome fasta."
    info: null
    example:
    - "https:/ftp.ebi.ac.uk/pub/databases/gencode/Gencode_human/release_41/GRCh38.primary_assembly.genome.fa.gz"
    must_exist: true
    create_parent: true
    required: true
    direction: "input"
    multiple: false
    multiple_sep: ";"
  - type: "file"
    name: "--transcriptome_gtf"
    description: "Reference transcriptome annotation."
    info: null
    example:
    - "https:/ftp.ebi.ac.uk/pub/databases/gencode/Gencode_human/release_41/gencode.v41.annotation.gtf.gz"
    must_exist: true
    create_parent: true
    required: true
    direction: "input"
    multiple: false
    multiple_sep: ";"
  - type: "file"
    name: "--ercc"
    description: "ERCC sequence and annotation file."
    info: null
    example:
    - "https:/assets.thermofisher.com/TFS-Assets/LSG/manuals/ERCC92.zip"
    must_exist: true
    create_parent: true
    required: false
    direction: "input"
    multiple: false
    multiple_sep: ";"
- name: "STAR Settings"
  arguments:
  - type: "integer"
    name: "--star_genome_sa_index_nbases"
    description: "Length (bases) of the SA pre-indexing string. Typically between\
      \ 10 and 15.\nLonger strings will use much more memory, but allow faster searches.\
      \ For small\ngenomes, the parameter {genomeSAindexNbases must be scaled down\
      \ to\nmin(14, log2(GenomeLength)/2 - 1).\n"
    info: null
    default:
    - 14
    required: false
    direction: "input"
    multiple: false
    multiple_sep: ";"
- name: "BD Rhapsody Settings"
  arguments:
  - type: "string"
    name: "--bdrhap_mitochondrial_contigs"
    description: "Names of the Mitochondrial contigs in the provided Reference Genome.\
      \ Fragments originating from contigs other than these are\nidentified as 'nuclear\
      \ fragments' in the ATACseq analysis pipeline.\n"
    info: null
    default:
    - "chrM"
    - "chrMT"
    - "M"
    - "MT"
    required: false
    direction: "input"
    multiple: true
    multiple_sep: ";"
  - type: "boolean_true"
    name: "--bdrhap_filtering_off"
    description: "By default the input Transcript Annotation files are filtered based\
      \ on the gene_type/gene_biotype attribute. Only features \nhaving the following\
      \ attribute values are kept:\n\n  - protein_coding\n  - lncRNA \n  - IG_LV_gene\n\
      \  - IG_V_gene\n  - IG_V_pseudogene\n  - IG_D_gene\n  - IG_J_gene\n  - IG_J_pseudogene\n\
      \  - IG_C_gene\n  - IG_C_pseudogene\n  - TR_V_gene\n  - TR_V_pseudogene\n  -\
      \ TR_D_gene\n  - TR_J_gene\n  - TR_J_pseudogene\n  - TR_C_gene\n\n  If you have\
      \ already pre-filtered the input Annotation files and/or wish to turn-off the\
      \ filtering, please set this option to True.\n"
    info: null
    direction: "input"
  - type: "boolean_true"
    name: "--bdrhap_wta_only_index"
    description: "Build a WTA only index, otherwise builds a WTA + ATAC index."
    info: null
    direction: "input"
  - type: "string"
    name: "--bdrhap_extra_star_params"
    description: "Additional parameters to pass to STAR when building the genome index.\
      \ Specify exactly like how you would on the command line."
    info: null
    example:
    - "--limitGenomeGenerateRAM 48000 --genomeSAindexNbases 11"
    required: false
    direction: "input"
    multiple: false
    multiple_sep: ";"
- name: "Cellranger ARC options"
  arguments:
  - type: "file"
    name: "--motifs_file"
    description: "Path to file containing transcription factor motifs in JASPAR format."
    info: null
    must_exist: true
    create_parent: true
    required: false
    direction: "input"
    multiple: false
    multiple_sep: ";"
  - type: "string"
    name: "--non_nuclear_contigs"
    description: "Name(s) of contig(s) that do not have any chromatin structure, for\
      \ example, \nmitochondria or plastids. These contigs are excluded from peak\
      \ calling since\nthe entire contig will be \"open\" due to a lack of chromatin\
      \ structure.\nLeave empty if there are no such contigs.\n"
    info: null
    required: false
    direction: "input"
    multiple: true
    multiple_sep: ";"
- name: "Outputs"
  arguments:
  - type: "string"
    name: "--target"
    description: "Which reference indices to generate."
    info: null
    default:
    - "star"
    required: false
    choices:
    - "cellranger"
    - "cellranger_arc"
    - "bd_rhapsody"
    - "star"
    direction: "input"
    multiple: true
    multiple_sep: ";"
  - type: "file"
    name: "--output_fasta"
    description: "Output genome sequence fasta."
    info: null
    example:
    - "genome_sequence.fa.gz"
    must_exist: true
    create_parent: true
    required: false
    direction: "output"
    multiple: false
    multiple_sep: ";"
  - type: "file"
    name: "--output_gtf"
    description: "Output transcriptome annotation gtf."
    info: null
    example:
    - "transcriptome_annotation.gtf.gz"
    must_exist: true
    create_parent: true
    required: false
    direction: "output"
    multiple: false
    multiple_sep: ";"
  - type: "file"
    name: "--output_cellranger"
    description: "Output index"
    info: null
    example:
    - "cellranger_index.tar.gz"
    must_exist: true
    create_parent: true
    required: false
    direction: "output"
    multiple: false
    multiple_sep: ";"
  - type: "file"
    name: "--output_cellranger_arc"
    description: "Output index"
    info: null
    example:
    - "cellranger_index_arc.tar.gz"
    must_exist: true
    create_parent: true
    required: false
    direction: "output"
    multiple: false
    multiple_sep: ";"
  - type: "file"
    name: "--output_bd_rhapsody"
    description: "Output index"
    info: null
    example:
    - "bdrhap_index.tar.gz"
    must_exist: true
    create_parent: true
    required: false
    direction: "output"
    multiple: false
    multiple_sep: ";"
  - type: "file"
    name: "--output_star"
    description: "Output index"
    info: null
    example:
    - "star_index.tar.gz"
    must_exist: true
    create_parent: true
    required: false
    direction: "output"
    multiple: false
    multiple_sep: ";"
- name: "Arguments"
  arguments:
  - type: "string"
    name: "--subset_regex"
    description: "Will subset the reference chromosomes using the given regex."
    info: null
    example:
    - "(ERCC-00002|chr1)"
    required: false
    direction: "input"
    multiple: false
    multiple_sep: ";"
resources:
- type: "nextflow_script"
  path: "main.nf"
  is_executable: true
  entrypoint: "run_wf"
- type: "file"
  path: "utils"
- type: "file"
  path: "nextflow_labels.config"
  dest: "nextflow_labels.config"
description: "Build a transcriptomics reference into one of many formats.\n"
test_resources:
- type: "nextflow_script"
  path: "test.nf"
  is_executable: true
  entrypoint: "test_wf"
- type: "file"
  path: "reference_gencodev41_chr1"
info: null
status: "enabled"
scope:
  image: "public"
  target: "public"
dependencies:
- name: "reference/make_reference"
  alias: "make_reference_component"
  repository:
    type: "local"
- name: "reference/build_bdrhap_reference"
  repository:
    type: "local"
- name: "reference/build_star_reference"
  repository:
    type: "local"
- name: "reference/build_cellranger_reference"
  repository:
    type: "local"
- name: "reference/build_cellranger_arc_reference"
  repository:
    type: "local"
license: "MIT"
links:
  repository: "https://github.com/openpipelines-bio/openpipeline"
  docker_registry: "ghcr.io"
runners:
- type: "nextflow"
  id: "nextflow"
  directives:
    tag: "$id"
  auto:
    simplifyInput: true
    simplifyOutput: false
    transcript: false
    publish: false
  config:
    labels:
      mem1gb: "memory = 1000000000.B"
      mem2gb: "memory = 2000000000.B"
      mem5gb: "memory = 5000000000.B"
      mem10gb: "memory = 10000000000.B"
      mem20gb: "memory = 20000000000.B"
      mem50gb: "memory = 50000000000.B"
      mem100gb: "memory = 100000000000.B"
      mem200gb: "memory = 200000000000.B"
      mem500gb: "memory = 500000000000.B"
      mem1tb: "memory = 1000000000000.B"
      mem2tb: "memory = 2000000000000.B"
      mem5tb: "memory = 5000000000000.B"
      mem10tb: "memory = 10000000000000.B"
      mem20tb: "memory = 20000000000000.B"
      mem50tb: "memory = 50000000000000.B"
      mem100tb: "memory = 100000000000000.B"
      mem200tb: "memory = 200000000000000.B"
      mem500tb: "memory = 500000000000000.B"
      mem1gib: "memory = 1073741824.B"
      mem2gib: "memory = 2147483648.B"
      mem4gib: "memory = 4294967296.B"
      mem8gib: "memory = 8589934592.B"
      mem16gib: "memory = 17179869184.B"
      mem32gib: "memory = 34359738368.B"
      mem64gib: "memory = 68719476736.B"
      mem128gib: "memory = 137438953472.B"
      mem256gib: "memory = 274877906944.B"
      mem512gib: "memory = 549755813888.B"
      mem1tib: "memory = 1099511627776.B"
      mem2tib: "memory = 2199023255552.B"
      mem4tib: "memory = 4398046511104.B"
      mem8tib: "memory = 8796093022208.B"
      mem16tib: "memory = 17592186044416.B"
      mem32tib: "memory = 35184372088832.B"
      mem64tib: "memory = 70368744177664.B"
      mem128tib: "memory = 140737488355328.B"
      mem256tib: "memory = 281474976710656.B"
      mem512tib: "memory = 562949953421312.B"
      cpu1: "cpus = 1"
      cpu2: "cpus = 2"
      cpu5: "cpus = 5"
      cpu10: "cpus = 10"
      cpu20: "cpus = 20"
      cpu50: "cpus = 50"
      cpu100: "cpus = 100"
      cpu200: "cpus = 200"
      cpu500: "cpus = 500"
      cpu1000: "cpus = 1000"
    script:
    - "includeConfig(\"nextflow_labels.config\")"
  debug: false
  container: "docker"
engines:
- type: "native"
  id: "native"
build_info:
  config: "src/workflows/ingestion/make_reference/config.vsh.yaml"
  runner: "nextflow"
  engine: "native"
  output: "target/nextflow/workflows/ingestion/make_reference"
  executable: "target/nextflow/workflows/ingestion/make_reference/main.nf"
  viash_version: "0.9.4"
  git_commit: "cd7beddfa85b60b543399a9e2554b8e7b8eaaf62"
  git_remote: "https://github.com/openpipelines-bio/openpipeline"
  dependencies:
  - "target/nextflow/reference/make_reference"
  - "target/nextflow/reference/build_bdrhap_reference"
  - "target/nextflow/reference/build_star_reference"
  - "target/nextflow/reference/build_cellranger_reference"
  - "target/nextflow/reference/build_cellranger_arc_reference"
package_config:
  name: "openpipeline"
  version: "v4.0.2"
  summary: "Best-practice workflows for single-cell multi-omics analyses.\n"
  description: "OpenPipelines are extensible single cell analysis pipelines for reproducible\
    \ and large-scale single cell processing using [Viash](https://viash.io) and [Nextflow](https://www.nextflow.io/).\n\
    \nIn terms of workflows, the following has been made available, but keep in mind\
    \ that\nindividual tools and functionality can be executed as standalone components\
    \ as well.\n\n  * Demultiplexing: conversion of raw sequencing data to FASTQ objects.\n\
    \  * Ingestion: Read mapping and generating a count matrix.\n  * Single sample\
    \ processing: cell filtering and doublet detection.\n  * Multisample processing:\
    \ Count transformation, normalization, QC metric calulations.\n  * Integration:\
    \ Clustering, integration and batch correction using single and multimodal methods.\n\
    \  * Downstream analysis workflows\n"
  info:
    test_resources:
    - type: "s3"
      path: "s3://openpipelines-data"
      dest: "resources_test"
    nextflow_labels_ci:
    - path: "src/workflows/utils/labels_ci.config"
      description: "Adds the correct memory and CPU labels when running on the Viash\
        \ Hub CI."
  viash_version: "0.9.4"
  source: "src"
  target: "target"
  config_mods:
  - ".resources += {path: '/src/workflows/utils/labels.config', dest: 'nextflow_labels.config'}\n\
    .runners[.type == 'nextflow'].config.script := 'includeConfig(\"nextflow_labels.config\"\
    )'"
  - ".engines += { type: \"native\" }"
  - ".engines[.type == 'docker'].target_registry := 'images.viash-hub.com'"
  - ".engines[.type == 'docker'].target_tag := 'v4.0.2'"
  keywords:
  - "single-cell"
  - "multimodal"
  license: "MIT"
  organization: "vsh"
  links:
    repository: "https://github.com/openpipelines-bio/openpipeline"
    docker_registry: "ghcr.io"
    homepage: "https://openpipelines.bio"
    documentation: "https://openpipelines.bio/fundamentals"
    issue_tracker: "https://github.com/openpipelines-bio/openpipeline/issues"
