[
  {
    "id": "hand-worked-fourfold",
    "title": "Treated sample expresses the target gene four times the control",
    "sourceType": "hand-worked",
    "source": {
      "citation": "Livak KJ, Schmittgen TD. Analysis of relative gene expression data using real-time quantitative PCR and the 2^-ΔΔCT method. Methods. 2001;25(4):402-408.",
      "doi": "10.1006/meth.2001.1262",
      "locator": "Equations for ΔCT, ΔΔCT and 2^-ΔΔCT",
      "arithmetic": "Control: mean target Ct 25.0 (25.0, 25.1, 24.9), reference 20.0, so ΔCt = 5.0. Treated: mean target Ct 23.0 (23.0, 23.1, 22.9), reference 20.0, so ΔCt = 3.0. ΔΔCt = 3.0 − 5.0 = −2.0; fold change = 2^2 = 4.0; log2 fold change = 2.0."
    },
    "input": {
      "sample": "trt",
      "entries": [
        {
          "sample": "ctrl",
          "gene": "TGT",
          "ct": 25
        },
        {
          "sample": "ctrl",
          "gene": "TGT",
          "ct": 25.1
        },
        {
          "sample": "ctrl",
          "gene": "TGT",
          "ct": 24.9
        },
        {
          "sample": "ctrl",
          "gene": "REF",
          "ct": 20
        },
        {
          "sample": "ctrl",
          "gene": "REF",
          "ct": 20
        },
        {
          "sample": "ctrl",
          "gene": "REF",
          "ct": 20
        },
        {
          "sample": "trt",
          "gene": "TGT",
          "ct": 23
        },
        {
          "sample": "trt",
          "gene": "TGT",
          "ct": 23.1
        },
        {
          "sample": "trt",
          "gene": "TGT",
          "ct": 22.9
        },
        {
          "sample": "trt",
          "gene": "REF",
          "ct": 20
        },
        {
          "sample": "trt",
          "gene": "REF",
          "ct": 20
        },
        {
          "sample": "trt",
          "gene": "REF",
          "ct": 20
        }
      ]
    },
    "expected": {
      "ddct": -2,
      "foldChange": 4,
      "log2fc": 2,
      "outliersRemoved": 0
    },
    "tolerance": {
      "ddct": 1e-9,
      "foldChange": 1e-9,
      "log2fc": 1e-9
    }
  },
  {
    "id": "hand-worked-control-is-one",
    "title": "The control sample compared with the control mean gives a fold change of 1",
    "sourceType": "hand-worked",
    "source": {
      "citation": "Livak KJ, Schmittgen TD. Analysis of relative gene expression data using real-time quantitative PCR and the 2^-ΔΔCT method. Methods. 2001;25(4):402-408.",
      "doi": "10.1006/meth.2001.1262",
      "arithmetic": "Control ΔCt = 25.0 − 20.0 = 5.0 and the control mean ΔCt is 5.0, so ΔΔCt = 0 and fold change = 2^0 = 1."
    },
    "input": {
      "sample": "ctrl",
      "entries": [
        {
          "sample": "ctrl",
          "gene": "TGT",
          "ct": 25
        },
        {
          "sample": "ctrl",
          "gene": "TGT",
          "ct": 25.1
        },
        {
          "sample": "ctrl",
          "gene": "TGT",
          "ct": 24.9
        },
        {
          "sample": "ctrl",
          "gene": "REF",
          "ct": 20
        },
        {
          "sample": "ctrl",
          "gene": "REF",
          "ct": 20
        },
        {
          "sample": "ctrl",
          "gene": "REF",
          "ct": 20
        },
        {
          "sample": "trt",
          "gene": "TGT",
          "ct": 23
        },
        {
          "sample": "trt",
          "gene": "REF",
          "ct": 20
        }
      ]
    },
    "expected": {
      "ddct": 0,
      "foldChange": 1,
      "log2fc": 0,
      "outliersRemoved": 0
    },
    "tolerance": {
      "ddct": 1e-9,
      "foldChange": 1e-9,
      "log2fc": 1e-9
    }
  },
  {
    "id": "edge-outlier-replicate",
    "title": "A stray replicate is dropped by the Tukey fence before averaging",
    "sourceType": "hand-worked",
    "source": {
      "citation": "Tukey JW. Exploratory Data Analysis. Addison-Wesley; 1977 (1.5 × IQR fences), applied as in the tool's computeReplicateStats with linear-interpolation quartiles.",
      "arithmetic": "Treated target Ct 23.0, 23.1, 22.9, 30.0; sorted 22.9, 23.0, 23.1, 30.0. Q1 at index 0.75 = 22.9 + 0.75 × 0.1 = 22.975; Q3 at index 2.25 = 23.1 + 0.25 × 6.9 = 24.825; IQR = 1.85; upper fence = 24.825 + 1.5 × 1.85 = 27.6, so 30.0 is removed. Mean of the rest = 23.0, ΔCt = 3.0, ΔΔCt = −2.0, fold change = 4.0."
    },
    "input": {
      "sample": "trt",
      "entries": [
        {
          "sample": "ctrl",
          "gene": "TGT",
          "ct": 25
        },
        {
          "sample": "ctrl",
          "gene": "TGT",
          "ct": 25.1
        },
        {
          "sample": "ctrl",
          "gene": "TGT",
          "ct": 24.9
        },
        {
          "sample": "ctrl",
          "gene": "REF",
          "ct": 20
        },
        {
          "sample": "trt",
          "gene": "TGT",
          "ct": 23
        },
        {
          "sample": "trt",
          "gene": "TGT",
          "ct": 23.1
        },
        {
          "sample": "trt",
          "gene": "TGT",
          "ct": 22.9
        },
        {
          "sample": "trt",
          "gene": "TGT",
          "ct": 30
        },
        {
          "sample": "trt",
          "gene": "REF",
          "ct": 20
        }
      ]
    },
    "expected": {
      "ddct": -2,
      "foldChange": 4,
      "log2fc": 2,
      "outliersRemoved": 1
    },
    "tolerance": {
      "ddct": 1e-9,
      "foldChange": 1e-9,
      "log2fc": 1e-9
    }
  }
]
