{
  "name": "samtools merge sort-order options by input sort order (samtools 1.25)",
  "description": "Maps each input sort order to the samtools merge option that must accompany it, the samtools sort option that produces that order, and whether samtools index can index the result; compiled from the samtools-merge, samtools-sort and samtools-index manual pages.",
  "page": "https://casrai.org/guides/samtools-merge",
  "publisher": "CASRAI",
  "license": "https://creativecommons.org/licenses/by/4.0/",
  "dateModified": "2026-11-16T21:58:11Z",
  "temporalCoverage": "2026",
  "spatialCoverage": null,
  "columns": [
    {
      "name": "Input sort order",
      "unit": "",
      "description": ""
    },
    {
      "name": "samtools merge option",
      "unit": "",
      "description": ""
    },
    {
      "name": "samtools sort option that produces it",
      "unit": "",
      "description": ""
    },
    {
      "name": "Indexable with samtools index",
      "unit": "",
      "description": ""
    }
  ],
  "rows": [
    {
      "Input sort order": "Coordinate (default)",
      "samtools merge option": "none",
      "samtools sort option that produces it": "none (default)",
      "Indexable with samtools index": "Yes"
    },
    {
      "Input sort order": "Read name, natural (a7b before a12b)",
      "samtools merge option": "-n",
      "samtools sort option that produces it": "-n",
      "Indexable with samtools index": "No"
    },
    {
      "Input sort order": "Read name, lexicographic (x12 before x7)",
      "samtools merge option": "-N",
      "samtools sort option that produces it": "-N",
      "Indexable with samtools index": "No"
    },
    {
      "Input sort order": "Tag value, then position",
      "samtools merge option": "-t TAG",
      "samtools sort option that produces it": "-t TAG",
      "Indexable with samtools index": "No"
    },
    {
      "Input sort order": "Tag value, then name",
      "samtools merge option": "-t TAG with -n",
      "samtools sort option that produces it": "-t TAG with -n",
      "Indexable with samtools index": "No"
    }
  ],
  "sources": [
    {
      "title": "samtools-merge(1) manual page",
      "url": "https://www.htslib.org/doc/samtools-merge.html",
      "accessed": "2026-11-14"
    },
    {
      "title": "samtools-sort(1) manual page",
      "url": "https://www.htslib.org/doc/samtools-sort.html",
      "accessed": "2026-11-14"
    },
    {
      "title": "samtools-index(1) manual page",
      "url": "https://www.htslib.org/doc/samtools-index.html",
      "accessed": "2026-11-14"
    }
  ]
}