{
  "$schema": "https://jbrowse.org/jb2/schema/v5/config.json",
  "assemblies": [
    {
      "name": "hg38",
      "aliases": ["GRCh38"],
      "sequence": {
        "type": "ReferenceSequenceTrack",
        "trackId": "hg38-ReferenceSequenceTrack",
        "adapter": {
          "type": "BgzipFastaAdapter",
          "uri": "https://jbrowse.org/genomes/GRCh38/fasta/hg38.prefix.fa.gz"
        }
      },
      "refNameAliases": {
        "adapter": {
          "type": "RefNameAliasAdapter",
          "uri": "https://s3.amazonaws.com/jbrowse.org/genomes/GRCh38/hg38_aliases.txt"
        }
      },
      "cytobands": {
        "adapter": {
          "type": "CytobandAdapter",
          "uri": "https://jbrowse.org/genomes/GRCh38/cytoBand.txt"
        }
      },
      "geneticCodes": {
        "chrM": 2
      }
    }
  ],
  "tracks": [
    {
      "type": "FeatureTrack",
      "trackId": "ncbi_refseq_hg38",
      "name": "NCBI RefSeq genes",
      "assemblyNames": ["hg38"],
      "category": ["Annotation"],
      "adapter": {
        "type": "Gff3TabixAdapter",
        "gffGzLocation": {
          "uri": "https://jbrowse.org/ucsc/hg38/ncbiRefSeq.gff.gz",
          "locationType": "UriLocation"
        },
        "index": {
          "indexType": "CSI",
          "location": {
            "uri": "https://jbrowse.org/ucsc/hg38/ncbiRefSeq.gff.gz.csi",
            "locationType": "UriLocation"
          }
        }
      }
    },
    {
      "type": "AlignmentsTrack",
      "trackId": "na12878_read_depth",
      "name": "NA12878 depth (1000 Genomes, 30x)",
      "assemblyNames": ["hg38"],
      "adapter": {
        "type": "CramAdapter",
        "cramLocation": {
          "uri": "https://s3.amazonaws.com/1000genomes/1000G_2504_high_coverage/data/ERR3239334/NA12878.final.cram"
        },
        "craiLocation": {
          "uri": "https://s3.amazonaws.com/1000genomes/1000G_2504_high_coverage/data/ERR3239334/NA12878.final.cram.crai"
        }
      },
      "displays": [
        {
          "type": "LinearMarkDisplay",
          "displayId": "na12878_read_depth-LinearMarkDisplay",
          "encoding": { "y": { "axis": { "title": "Read depth" } } },
          "marks": [
            {
              "mark": "bar",
              "transform": [
                {
                  "type": "coverage"
                }
              ],
              "encoding": {
                "color": { "value": "#c8d8ee" }
              }
            }
          ]
        }
      ]
    },
    {
      "type": "AlignmentsTrack",
      "trackId": "na12878_read_marks",
      "name": "NA12878 insert size (1000 Genomes, 30x)",
      "assemblyNames": ["hg38"],
      "adapter": {
        "type": "CramAdapter",
        "cramLocation": {
          "uri": "https://s3.amazonaws.com/1000genomes/1000G_2504_high_coverage/data/ERR3239334/NA12878.final.cram"
        },
        "craiLocation": {
          "uri": "https://s3.amazonaws.com/1000genomes/1000G_2504_high_coverage/data/ERR3239334/NA12878.final.cram.crai"
        }
      },
      "displays": [
        {
          "type": "LinearMarkDisplay",
          "displayId": "na12878_read_marks-LinearMarkDisplay",
          "encoding": { "y": { "axis": { "title": "Insert size (bp)" } } },
          "marks": [
            {
              "mark": "point",
              "transform": [
                {
                  "type": "filter",
                  "expr": "jexl:feature.template_length > 0 && feature.template_length < 8000"
                }
              ],
              "encoding": {
                "y": "template_length",
                "color": {
                  "field": "score",
                  "scale": {
                    "type": "linear",
                    "domainMin": 0,
                    "domainMax": 60,
                    "range": ["#bdbdbd", "#1f4e9a"]
                  },
                  "legend": { "title": "Mapping quality" }
                }
              }
            }
          ]
        }
      ]
    },
    {
      "type": "FeatureTrack",
      "trackId": "na12878_chr20_pairs",
      "name": "NA12878 chr20, pairs over 1 kb",
      "assemblyNames": ["hg38"],
      "adapter": {
        "type": "BedTabixAdapter",
        "bedGzLocation": {
          "uri": "https://jbrowse.org/demos/read_marks/NA12878.chr20.discordant_pairs.bed.gz"
        },
        "index": {
          "location": {
            "uri": "https://jbrowse.org/demos/read_marks/NA12878.chr20.discordant_pairs.bed.gz.csi"
          }
        }
      },
      "displays": [
        {
          "type": "LinearMarkDisplay",
          "displayId": "na12878_chr20_pairs-LinearMarkDisplay",
          "encoding": { "y": { "axis": { "title": "Insert size (bp)" } } },
          "marks": [
            {
              "mark": "point",
              "transform": [
                {
                  "type": "filter",
                  "expr": "jexl:feature.tlen < 20000"
                }
              ],
              "encoding": {
                "y": "tlen",
                "color": {
                  "field": "score",
                  "scale": {
                    "type": "linear",
                    "domainMin": 0,
                    "domainMax": 60,
                    "range": ["#bdbdbd", "#1f4e9a"]
                  },
                  "legend": { "title": "Mapping quality" }
                }
              }
            }
          ]
        }
      ]
    },
    {
      "type": "FeatureTrack",
      "trackId": "na12878_chr20_pair_counts",
      "name": "NA12878 chr20, pairs of 2 to 10 kb per bin",
      "assemblyNames": ["hg38"],
      "adapter": {
        "type": "BedTabixAdapter",
        "bedGzLocation": {
          "uri": "https://jbrowse.org/demos/read_marks/NA12878.chr20.discordant_pairs.bed.gz"
        },
        "index": {
          "location": {
            "uri": "https://jbrowse.org/demos/read_marks/NA12878.chr20.discordant_pairs.bed.gz.csi"
          }
        }
      },
      "displays": [
        {
          "type": "LinearMarkDisplay",
          "displayId": "na12878_chr20_pair_counts-LinearMarkDisplay",
          "encoding": {
            "y": {
              "scale": { "domainMin": 0, "domainMax": 60 },
              "axis": { "title": "Pairs per bin" }
            }
          },
          "marks": [
            {
              "mark": "bar",
              "transform": [
                {
                  "type": "filter",
                  "expr": "jexl:feature.tlen > 2000 && feature.tlen < 10000"
                },
                {
                  "type": "bin",
                  "step": "auto"
                },
                {
                  "type": "aggregate",
                  "ops": [
                    {
                      "op": "count"
                    }
                  ]
                }
              ],
              "encoding": {
                "color": { "value": "#d62728" }
              }
            }
          ]
        }
      ]
    }
  ],
  "defaultSession": {
    "name": "NA12878 reads as marks",
    "views": [
      {
        "type": "LinearGenomeView",
        "assembly": "hg38",
        "loc": "chr20:32,925,000-32,955,000",
        "tracks": [
          "ncbi_refseq_hg38",
          "na12878_read_depth",
          "na12878_read_marks"
        ]
      }
    ]
  }
}
