includeConfig 'conf/base.config'

params {

  samplesheet = 'index.csv'
  publish_dir = 'results'
  outdir = 'results'
  merge = false
  help = false

  qc_only = false
  preprocessing_only = false
  adapter_trimming = false

  porechop_options = ''
  porechop_custom_primers = false
  porechop_custom_primers_path = null

  qual_filt = false
  chopper_options = ''

  host_filtering = false
  host_fasta = null

  analysis_mode = ''

  canu = false
  canu_genome_size = '0.01m'
  canu_options = ''

  final_primer_check = false

  flye = false
  flye_options = ''
  flye_mode = 'nano-raw'

  rattle_clustering_options = ''
  rattle_polishing_options = ''

  contamination_flag_threshold = '0.01'

  blast_mode = 'ncbi'
  blast_threads = 4
  blastn_db = null
  blast_vs_ref = false

  reference = null
  medaka_consensus_options = ''
  bcftools_min_coverage = 20

  read_classification = false
  megablast = false
  kaiju = false
  kaiju_threads = 8
  kaiju_nodes = null
  kaiju_dbname = null
  kaiju_names = null
  krkdb = null
  kraken2 = false
}

process {
  withName: FILTER_VCF { container = "quay.io/biocontainers/bcftools:1.19--h8b25389_0" }
  withName: BLASTN2REF { container = "quay.io/biocontainers/blast:2.14.1--pl5321h6f7f691_0" }
  withName: BLASTN { container = "quay.io/biocontainers/blast:2.14.1--pl5321h6f7f691_0" }
  withName: BRACKEN { container = "quay.io/biocontainers/bracken:2.8--py310h0dbaff4_1" }
  withName: BRACKEN_HTML { container = "docker://infrahelpers/python-light:py310-bullseye" }
  withName: CANU { container = "quay.io/biocontainers/canu:2.2--ha47f30e_0" }
  withName: CAP3 { container = "quay.io/biocontainers/cap3:10.2011--h779adbc_3" }
  withName: CHOPPER { container = "quay.io/biocontainers/chopper:0.5.0--hdcf5f25_2" }
  withName: CONCATENATE_FASTA { container = "quay.io/biocontainers/seqtk:1.3--h5bf99c6_3" }
  withName: CUTADAPT { container = "quay.io/biocontainers/cutadapt:4.1--py310h1425a21_1" }
  withName: COVSTATS { container = "docker://infrahelpers/python-light:py310-bullseye" }
  withName: DETECTION_REPORT { container = "docker://infrahelpers/python-light:py310-bullseye" }
  withName: EXTRACT_READS { container = "quay.io/biocontainers/seqtk:1.3--h5bf99c6_3" }
  withName: EXTRACT_VIRAL_BLAST_HITS { container = "docker://infrahelpers/python-light:py310-bullseye" }
  withName: FASTCAT { container = "ontresearch/wf-amplicon:sha7d1766bb6196d4c370d6bd45d89154e7c1fef0b3" }
  withName: FLYE { container = "quay.io/biocontainers/flye:2.9.1--py310h590eda1_0" }
  withName: FASTQ2FASTA { container = "quay.io/biocontainers/seqtk:1.3--h7132678_4" }
  withName: KAIJU { container = "quay.io/biocontainers/kaiju:1.8.2--h5b5514e_1" }
  withName: READ_CLASSIFICATION_HTML { container = "docker://infrahelpers/python-light:py310-bullseye" }
  withName: KRAKEN2 { container = "quay.io/biocontainers/kraken2:2.1.3--pl5321hdcf5f25_0" }
  withName: KRONA { container = "quay.io/biocontainers/krona:2.8.1--pl5321hdfd78af_1" }
  withName: MEDAKA { container = "quay.io/biocontainers/medaka:1.11.3--py39h05d5c5e_0" }
  withName: MINIMAP2_ALIGN_RNA { container = "quay.io/biocontainers/minimap2:2.24--h7132678_1" }
  withName: MINIMAP2_REF { container = "quay.io/biocontainers/minimap2:2.24--h7132678_1" }
  withName: NANOPLOT { container = "quay.io/biocontainers/nanoplot:1.41.0--pyhdfd78af_0" }
  withName: PORECHOP_ABI { container = "quay.io/biocontainers/porechop_abi:0.5.0--py38he0f268d_2" }
  withName: QCREPORT { container = "docker://infrahelpers/python-light:py310-bullseye" }
  withName: RATTLE { container = "ghcr.io/eresearchqut/rattle-image:0.0.1" }
  withName: REFORMAT { container = "quay.io/biocontainers/bbmap:39.01--h92535d8_1" }
  withName: SAMTOOLS { container = "quay.io/biocontainers/samtools:1.16.1--h6899075_1" }
  withName: MAPPING_BACK_TO_REF { container = "docker.io/gauthiem/map2ref" }
  withName: EXTRACT_REF_FASTA { container = "quay.io/biocontainers/entrez-direct:22.4--he881be0_0" }
  withName: MOSDEPTH { container = "quay.io/biocontainers/mosdepth:0.3.3--h37c5b7d_2" }
  withName: COVERM { container = "quay.io/biocontainers/coverm:0.7.0--h07ea13f_1" }
}

profiles {
  docker {
    docker.enabled = true
    singularity.enabled = false
  }
  singularity {
    singularity.enabled = true
    singularity.autoMounts = true
    docker.enabled = false
  }
  test {
    includeConfig 'conf/test.config'
  }
}

manifest {
    name            = 'eresearchqut/ontvisc'
    author          = 'eResearch, QUT'
    homePage        = 'https://github.com/eresearchqut/ontvisc'
    description     = 'ONT-based Viral Screening for Biosecurity'
    mainScript      = 'main.nf'
    nextflowVersion = '>=21.05.0'
    defaultBranch   = 'main'
}
