name: bamcmp
description: Bamcmp (Bam Compare) is a tool for assigning reads between a primary genome and a contamination genome. For instance, filtering out mouse reads from patient derived xenograft mouse models (PDX).
keywords:
  - filter
  - xenograft
  - host
  - graft
  - contamination
  - mouse

tools:
  - bamcmp:
      description: Bamcmp is a tool for deconvolving host and graft reads, using two bam files. Reads should be mapped to two genomes, and the mapped,
                    sorted bam files supplied to the tool. It is highly recommended to use the "-s as" option not the "-s mapq" option, else
                    reads which multimap to the contamination genome will be spuriously kept.
      homepage: https://github.com/CRUKMI-ComputationalBiology/bamcmp
      documentation: https://github.com/CRUKMI-ComputationalBiology/bamcmp
      tool_dev_url: https://github.com/CRUKMI-ComputationalBiology/bamcmp
      doi: "10.1158/1541-7786.MCR-16-0431"
      licence: ['GPL v3']

input:
  - meta:
      type: map
      description: |
        Groovy Map containing sample information
        e.g. [ id:'test']

  - sample:
      type: file
      description: BAM/CRAM/SAM file with the reads aligned to the primary genome (the one you want to keep)
      pattern: "*.{bam,cram,sam}"

  - contaminant:
      type: file
      description: BAM/CRAM/SAM file with the reads aligned to the contaminant genome (the one you want to filter out)
      pattern: "*.{bam,cram,sam}"

output:
  - versions:
      type: file
      description: File containing software versions
      pattern: "versions.yml"

  - bam:
      type: file
      description: Bam file containing the reads which align better to the primary genome.
      pattern: "*.{bam,cram,sam}"

  - bam:
      type: file
      description: Bam file containing the reads which align better to the contaminant genome.
      pattern: "*.{bam,cram,sam}"

authors:
  - "@kmurat1"
  - "@sppearce"
