Skill Tracer
Skills › Scientific Agent Skills › mageck › design.md

design.md

48 lines · skills/mageck/references/design.md at 5f2bc03

Open on GitHub
1# Contrasts and multi-condition designs
2
3For RRA, explicitly list treatment and control **sample labels**, preserving biological replicate
4identity. Do not sum independent cultures; do combine separate sequencing lanes of one library
5preparation at counting. The helper checks labels, disjoint groups, paired lengths, negative-control
6membership and whole-gene grouping, nonnegative integer counts, duplicate IDs and count/library
7equality. It cannot verify whether sample labels represent the biology described by the user.
8
9For a time course, genotype-by-treatment interaction or batch-adjusted comparison, MAGeCK MLE
10uses a design matrix. Consult the [official MLE tutorial](https://sourceforge.net/p/mageck/wiki/demo/)
11and the installed `mageck mle --help`. A small native MLE smoke test verifies named sample
12reordering and expected beta signs; realistic multi-factor designs remain untested here.
13An illustrative two-condition design is:
15```text
16Samples baseline treatment
17c1 1 0
18c2 1 0
19t1 1 1
20t2 1 1
21```
23Write an actual tab-delimited matrix with unique row labels matching count-table samples and unique
24coefficient names. In 0.5.9.5 a **named matrix file** selects and reorders count columns using those
25row labels; it must not also receive `--include-samples` or `--beta-labels`. Keep baseline rows first
26and preserve row order for reproducibility. For an inline matrix without row labels, rows instead
27follow `--include-samples`, or the count-table order when that option is absent.
29The first numeric column must be all ones. Include at least one baseline row with zeros in all
30remaining columns; do not treat MAGeCK MLE as an arbitrary regression accepting a centered or
31negative-valued design. Basic designs use 0/1 indicators. The
32[advanced tutorial](https://sourceforge.net/p/mageck/wiki/advanced_tutorial/) also permits positive
33time values under an explicit linear log-abundance assumption. All-zero columns and aliased
34factors make coefficients unidentifiable. Compute design rank, inspect condition/batch confounding,
35and preserve coefficient interpretation before running. A matrix cannot recover missing replication
36or separate perfectly confounded batch and treatment effects.
38```bash
39# Template; MLE runs directly, outside the count/test helper.
40mageck mle -k counts.count.txt -d design.tsv -n mle --norm-method median
41```
43For RRA, retain direction-specific gene FDR and log2 fold change. MLE reports coefficient-specific
44`beta`, permutation `fdr`, and `wald-fdr`; state which test was used, and do not relabel beta as an
45RRA median log2 fold change. Retain guide support, normalization, sample inclusion and exclusions.
46FDR is not an individual hit's probability of being false. Validate leading hits independently;
47a synthetic fixture does not calibrate the experiment. The native smoke used only one permutation
48round to check execution; use adequately resolved permutations for a real inferential analysis.

Contrasts and multi-condition designs

For RRA, explicitly list treatment and control sample labels, preserving biological replicate identity. Do not sum independent cultures; do combine separate sequencing lanes of one library preparation at counting. The helper checks labels, disjoint groups, paired lengths, negative-control membership and whole-gene grouping, nonnegative integer counts, duplicate IDs and count/library equality. It cannot verify whether sample labels represent the biology described by the user.

For a time course, genotype-by-treatment interaction or batch-adjusted comparison, MAGeCK MLE uses a design matrix. Consult the official MLE tutorial and the installed mageck mle --help. A small native MLE smoke test verifies named sample reordering and expected beta signs; realistic multi-factor designs remain untested here. An illustrative two-condition design is:

Samples  baseline  treatment
c1       1         0
c2       1         0
t1       1         1
t2       1         1

Write an actual tab-delimited matrix with unique row labels matching count-table samples and unique coefficient names. In 0.5.9.5 a named matrix file selects and reorders count columns using those row labels; it must not also receive --include-samples or --beta-labels. Keep baseline rows first and preserve row order for reproducibility. For an inline matrix without row labels, rows instead follow --include-samples, or the count-table order when that option is absent.

The first numeric column must be all ones. Include at least one baseline row with zeros in all remaining columns; do not treat MAGeCK MLE as an arbitrary regression accepting a centered or negative-valued design. Basic designs use 0/1 indicators. The advanced tutorial also permits positive time values under an explicit linear log-abundance assumption. All-zero columns and aliased factors make coefficients unidentifiable. Compute design rank, inspect condition/batch confounding, and preserve coefficient interpretation before running. A matrix cannot recover missing replication or separate perfectly confounded batch and treatment effects.

# Template; MLE runs directly, outside the count/test helper.
mageck mle -k counts.count.txt -d design.tsv -n mle --norm-method median

For RRA, retain direction-specific gene FDR and log2 fold change. MLE reports coefficient-specific beta, permutation fdr, and wald-fdr; state which test was used, and do not relabel beta as an RRA median log2 fold change. Retain guide support, normalization, sample inclusion and exclusions. FDR is not an individual hit's probability of being false. Validate leading hits independently; a synthetic fixture does not calibrate the experiment. The native smoke used only one permutation round to check execution; use adequately resolved permutations for a real inferential analysis.

Raw lines 1 to 48