discover_flag_rates
Measure how often a corpus of maps carries a cryptic σ70 promoter, a cryptic splice site or a synthesis-breaking repeat MORE EXTREME THAN CHANCE, rather than how many it carries. Every map of a few kilobases spells promoters, splice donors and repeats, so a raw hit count measures length and composition; here each map's own extreme (its most negative promoter ΔG, its highest MaxEntScan donor and acceptor score, its longest homopolymer, tandem repeat, repeated stretch and hairpin arm) is scored against k-let-preserving shuffles of that same map, and the false discovery rate is controlled across the corpus within each statistic. No statistic uses a threshold: none of the three models publishes one, and a vendor's repeat limit is a product's capability, which check_manufacturability answers instead. The result is a per-statistic rate with an exact binomial interval, plus every map's own test. Cost is dominated by the σ70 scan at roughly a third of a second per map per shuffle, so a corpus of maps at the default 99 shuffles is minutes of work; drop flags to the statistics you need to make it cheaper.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| seed | No | seed for the shuffles. Each record draws from seed + its own index, so a record's answer does not depend on the rest of the corpus. Advanced. | |
| alpha | No | false discovery rate at which a record counts towards a flag's rate. | |
| flags | No | which statistics to run. Empty runs all seven. | |
| _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. | |
| shuffles | No | shuffles per record. The smallest p the null can give is 1 / (shuffles + 1), which is what bounds how small a corrected q can get. | |
| sequences | No | the corpus: wire upstream records here, or list library document names. Each is one record of the sweep. | |
| shuffle_k | No | k-let size the shuffles preserve. 2 holds every dinucleotide count, which is what all three statistics read. | |
| correction | No | Benjamini–Hochberg (independent or positively dependent tests) or Benjamini–Yekutieli (any dependence; less power). Values: BH (Benjamini–Hochberg), BY (Benjamini–Yekutieli). | BH |
| include_subject | No | also test the node's subject (the open or wired record). |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| hits | Yes | every record whose statistic beat chance, smallest p first | |
| rates | Yes | per statistic: records tested, records above chance, the rate and its exact 95% interval | |
| sweep | Yes | the full result, including the records tested | |
| tests | Yes | every (record, statistic) test: the observed statistic, the shuffles' mean, p, q and the Monte Carlo interval | |
| hitCount | Yes | how many (record, statistic) tests were called | |
| nullModel | Yes | the null the p-values stand on, stated with every run |