# genotype

## Version of tools in docker image (/container/Dockerfile)

| Tool                 | Version | Location                                   |
| -------------------- | ------- | ------------------------------------------ |
| biometrics\_genotype | 0.2.15  | <https://github.com/msk-access/biometrics> |

## CWL

* CWL specification 1.0
* Use example\_inputs.json to see the inputs to the cwl
* Example Command using [toil](https://toil.readthedocs.io):

```bash
    > toil-cwl-runner biometrics_genotype.cwl example_inputs.json
```

```bash
#Using CWLTOOL
> cwltool --singularity --non-strict /path/to/biometrics_genotype.cwl /path/to/example_inputs.json

#Using toil-cwl-runner
> mkdir tool_toil_log
> toil-cwl-runner --singularity --logFile /path/to/tool_toil_log/cwltoil.log  --jobStore /path/to/tool_jobStore --batchSystem lsf --workDir /path/to/tool_toil_log --outdir . --writeLogs /path/to/tool_toil_log --logLevel DEBUG --stats --retryCount 2 --disableCaching --maxLogFileSize 20000000000 /path/to/biometrics_genotype.cwl /path/to/example_inputs.json > tool_toil.stdout 2> tool_toil.stderr &
```

### Usage

```bash
> toil-cwl-runner biometrics_genotype.cwl -h
usage: biometrics_genotype/0.2.15/biometrics_genotype.cwl [-h] --input INPUT [--database DATABASE]
                                                          [--discordance_threshold DISCORDANCE_THRESHOLD]
                                                          [--prefix PREFIX] [--plot] [--json]
                                                          [--no_db_comparison] [--het HET][--threads THREADS]
                                                          [job_order]

positional arguments:
  job_order             Job input json file

optional arguments:
  -h, --help            show this help message and exit
  --input INPUT         Can be one of three types: (1) path to a CSV file containing sample information
                        (one per line). For example:
                        sample_name,sample_bam,sample_type,sample_sex,sample_group. (2) Path to a '*.pk'
                        file that was produced by the 'extract' tool. (3) Name of the sample to analyze;
                        this assumes there is a file named '{sample_name}.pk' in your database directory.
                        Can be specified more than once.
  --database DATABASE   Directory to store the intermediate files after running the extraction step.
  --discordance_threshold DISCORDANCE_THRESHOLD
                        Discordance values less than this are regarded as matching samples. (default:
                        0.05)
  --prefix PREFIX       Output file prefix.
  --plot                Also output plots of the data.
  --json                Also output data in JSON format.
  --no_db_comparison    Do not compare the sample(s) you provided to all samples in the database, only
                        compare them with each other.
  --het                 Include Hetrozygous sites along with homozygous sites when calculating discordant rate, helps specifically in cases where there are less than 100 total number of sites
  --threads THREADS     Number of threads to use.
```


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://cmo-ci.gitbook.io/command-line-tools-cwl/biometrics/biometrics_genotype_0.2.15.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
