name: "cellsnp"
namespace: "genetic_demux"
version: "v4.0.4"
authors:
- name: "Xichen Wu"
  roles:
  - "author"
  info:
    role: "Contributor"
    links:
      github: "wxicu"
      linkedin: "xichen-wu"
      orcid: "0009-0008-2168-4508"
    organizations:
    - name: "Helmholtz Munich"
      href: "https://www.helmholtz-munich.de"
      role: "Student Assistant"
argument_groups:
- name: "Input"
  arguments:
  - type: "file"
    name: "--sam_file"
    description: "Indexed sam/bam file(s), comma separated multiple samples. Mode\
      \ 1a & 2a: one sam/bam file with single cell. Mode 1b & 2b: one or multiple\
      \ bulk sam/bam files, no barcodes needed, but sample ids and regionsVCF."
    info: null
    must_exist: true
    create_parent: true
    required: false
    direction: "input"
    multiple: false
    multiple_sep: ";"
  - type: "file"
    name: "--sam_index_file"
    description: "Input SAM/BAM Index file, problem with samFileList."
    info: null
    must_exist: true
    create_parent: true
    required: false
    direction: "input"
    multiple: false
    multiple_sep: ";"
  - type: "file"
    name: "--sam_fileList"
    description: "A list file containing bam files, each per line, for Mode 1b & 2b."
    info: null
    must_exist: true
    create_parent: true
    required: false
    direction: "input"
    multiple: false
    multiple_sep: ";"
  - type: "file"
    name: "--regions_vcf"
    description: "A vcf file listing all candidate SNPs, for fetch each variants.\
      \ If None, pileup the genome. Needed for bulk samples."
    info: null
    must_exist: true
    create_parent: true
    required: false
    direction: "input"
    multiple: false
    multiple_sep: ";"
  - type: "file"
    name: "--targets_vcf"
    description: "Similar as --regions_vcf, but the next position is accessed by streaming\
      \ rather than indexing/jumping (like -T in samtools/bcftools mpileup)."
    info: null
    must_exist: true
    create_parent: true
    required: false
    direction: "input"
    multiple: false
    multiple_sep: ";"
  - type: "file"
    name: "--barcode_file"
    description: "A plain file listing all effective cell barcode."
    info: null
    must_exist: true
    create_parent: true
    required: false
    direction: "input"
    multiple: false
    multiple_sep: ";"
  - type: "file"
    name: "--sample_list"
    description: "A list file containing sample IDs, each per line."
    info: null
    must_exist: true
    create_parent: true
    required: false
    direction: "input"
    multiple: false
    multiple_sep: ";"
  - type: "string"
    name: "--sample_ids"
    description: "Comma separated sample ids."
    info: null
    required: false
    direction: "input"
    multiple: false
    multiple_sep: ";"
  - type: "boolean_true"
    name: "--genotype"
    description: "If use, do genotyping in addition to counting."
    info: null
    direction: "input"
  - type: "boolean_true"
    name: "--gzip"
    description: "If use, the output files will be zipped into BGZF format."
    info: null
    direction: "input"
  - type: "boolean_true"
    name: "--print_skip_snps"
    description: "If use, the SNPs skipped when loading VCF will be printed."
    info: null
    direction: "input"
  - type: "string"
    name: "--chrom"
    description: "The chromosomes to use in integer format 1-22, comma separated"
    info: null
    required: false
    direction: "input"
    multiple: false
    multiple_sep: ";"
  - type: "string"
    name: "--cell_tag"
    description: "Tag for cell barcodes, turn off with None."
    info: null
    default:
    - "CB"
    required: false
    direction: "input"
    multiple: false
    multiple_sep: ";"
  - type: "string"
    name: "--umi_tag"
    description: "Tag for UMI: UR, Auto, None. For Auto mode, use UR if barcodes is\
      \ inputted, otherwise use None. None mode means no UMI but read counts."
    info: null
    default:
    - "Auto"
    required: false
    direction: "input"
    multiple: false
    multiple_sep: ";"
  - type: "integer"
    name: "--min_count"
    description: "Minimum aggragated count."
    info: null
    default:
    - 20
    required: false
    direction: "input"
    multiple: false
    multiple_sep: ";"
  - type: "double"
    name: "--min_maf"
    description: "Minimum minor allele frequency."
    info: null
    default:
    - 0.0
    required: false
    direction: "input"
    multiple: false
    multiple_sep: ";"
  - type: "boolean_true"
    name: "--doublet_gl"
    description: "If use, keep doublet GT likelihood, i.e., GT=0.5 and GT=1.5."
    info: null
    direction: "input"
  - type: "string"
    name: "--incl_flag"
    description: "Required flags: skip reads with all mask bits unset."
    info: null
    required: false
    direction: "input"
    multiple: false
    multiple_sep: ";"
  - type: "string"
    name: "--excl_flag"
    description: "Filter flags: skip reads with any mask bits set [UNMAP,SECONDARY,QCFAIL\
      \ (when use UMI) or UNMAP,SECONDARY,QCFAIL,DUP (otherwise)]"
    info: null
    required: false
    direction: "input"
    multiple: false
    multiple_sep: ";"
  - type: "boolean_true"
    name: "--count_orphan"
    description: "If use, do not skip anomalous read pairs."
    info: null
    direction: "input"
  - type: "integer"
    name: "--min_mapq"
    description: "Minimum MAPQ for read filtering."
    info: null
    default:
    - 20
    required: false
    direction: "input"
    multiple: false
    multiple_sep: ";"
  - type: "integer"
    name: "--min_len"
    description: "Minimum mapped length for read filtering."
    info: null
    default:
    - 30
    required: false
    direction: "input"
    multiple: false
    multiple_sep: ";"
- name: "Output"
  arguments:
  - type: "file"
    name: "--output"
    alternatives:
    - "--outDir"
    description: "Output directory for VCF and sparse matrices."
    info: null
    example:
    - "cellsnp_out"
    must_exist: true
    create_parent: true
    required: false
    direction: "output"
    multiple: false
    multiple_sep: ";"
resources:
- type: "bash_script"
  path: "script.sh"
  is_executable: true
- type: "file"
  path: "nextflow_labels.config"
  dest: "nextflow_labels.config"
description: "cellSNP aims to pileup the expressed alleles in single-cell or bulk\
  \ RNA-seq data. It can be directly used for donor deconvolution in multiplexed single-cell\
  \ RNA-seq data, particularly with vireo."
test_resources:
- type: "bash_script"
  path: "test.sh"
  is_executable: true
- type: "file"
  path: "demuxafy_test_data"
info: null
status: "enabled"
scope:
  image: "public"
  target: "public"
license: "MIT"
links:
  repository: "https://github.com/openpipelines-bio/openpipeline"
  docker_registry: "ghcr.io"
runners:
- type: "executable"
  id: "executable"
  docker_setup_strategy: "ifneedbepullelsecachedbuild"
- type: "nextflow"
  id: "nextflow"
  directives:
    label:
    - "highmem"
    - "highcpu"
    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: "docker"
  id: "docker"
  image: "ubuntu:latest"
  target_registry: "images.viash-hub.com"
  target_tag: "v4.0.4"
  namespace_separator: "/"
  setup:
  - type: "apt"
    packages:
    - "wget"
    - "gcc"
    - "zlib1g"
    - "make"
    - "libbz2-dev"
    - "zlib1g-dev"
    - "libncurses5-dev"
    - "liblzma-dev"
    - "autoconf"
    - "automake"
    - "perl"
    - "libcurl4-gnutls-dev"
    - "libssl-dev"
    - "git"
    - "bzip2"
    interactive: false
  - type: "docker"
    run:
    - "wget https://github.com/samtools/htslib/releases/download/1.16/htslib-1.16.tar.bz2\
      \ -O htslib.tar.bz2 && tar -xjvf htslib.tar.bz2 && cd htslib-1.16 && make &&\
      \ make install"
  - type: "docker"
    run:
    - "git clone https://github.com/single-cell-genetics/cellsnp-lite.git && cd cellsnp-lite\
      \ && autoreconf -iv && ./configure --with-htslib=/htslib-1.16 && make && make\
      \ install"
  entrypoint: []
  cmd: null
- type: "native"
  id: "native"
build_info:
  config: "src/genetic_demux/cellsnp/config.vsh.yaml"
  runner: "nextflow"
  engine: "docker|native"
  output: "target/nextflow/genetic_demux/cellsnp"
  executable: "target/nextflow/genetic_demux/cellsnp/main.nf"
  viash_version: "0.9.4"
  git_commit: "fb7dc76676aa63d06ae1421bbdd6312ad4f67312"
  git_remote: "https://github.com/openpipelines-bio/openpipeline"
package_config:
  name: "openpipeline"
  version: "v4.0.4"
  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.4'"
  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"
