call_mixed_bases_from_trace
Call the bases of a Sanger trace AND ask at every position whether a second allele is present, writing a two-base IUB code (R, Y, S, W, K, M) where it is. mode: het assumes the two alleles are present in equal amounts, which is the diploid heterozygote case; mode: mix assumes nothing about their ratio, for a mixed template, a contaminated read or a pooled sample. The two disagree: on this repo's own corpus they differ on 348 of 5,605 calls. Also returns the ALTERNATIVE calls the search considered and rejected.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| mode | No | het = the two alleles are assumed present 1:1 (a diploid heterozygote); mix = no assumption is made about their ratio. | het |
| table | No | the instrument/polymer calibration table to score against. The same signal scores differently under each, so a quality value is only interpretable with the table named. Defaults to ABI 3730 POP-7. | 3730pop7 |
| _files | No | The project: record references shaped like _subject. Their records become library documents a tool names in sequences/parts/document; a trace or alignment is found by file name. | |
| _subject | No | The record to act on: exactly one of sequence, accession (+source), sample (an id from list_samples) or file ({name, text} or {name, base64}); record_index picks one record of several. | |
| document | No | which trace to run on: a file name (`read_F.ab1`) or its project file id. Leave unset to use the trace tab on screen. A file id is project-specific, so a template ships this unset. | |
| min_ratio | No | how tall a second peak must be, as a fraction of the called peak, before the search will consider it as a second allele. Lowering it widens what is considered, which is not the same as calling more mixed bases. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| bases | Yes | how many bases the reading called | |
| mixedBases | Yes | how many positions were called as carrying two alleles. Reported as 0 rather than omitted when none were, because a missing field is not an answer | |
| meanQuality | Yes | the mean Phred of the reading, on the calibration table it names | |
| instrumentBases | Yes | how many the FILE carries, so a gate can see a de-novo reading change the read's length |