9acffdf932d10e14764c201dd48455aa60b45a79 lrnassar Mon Jul 22 13:17:59 2019 -0700 Updating api.html with new /list/schema function #23777 diff --git src/hg/htdocs/goldenPath/help/api.html src/hg/htdocs/goldenPath/help/api.html index 3dcfe51..2708d25 100755 --- src/hg/htdocs/goldenPath/help/api.html +++ src/hg/htdocs/goldenPath/help/api.html @@ -199,30 +199,33 @@ target=_blank>list tracks from specified hub and genome - api.genome.ucsc.edu/list/tracks?hubUrl=http://hgdownload.soe.ucsc.edu/hubs/mouseStrains/hub.txt;genome=CAST_EiJ
  • list tracks from UCSC database genome - api.genome.ucsc.edu/list/tracks?genome=hg38
  • list chromosomes from UCSC database genome - api.genome.ucsc.edu/list/chromosomes?genome=hg38
  • list chromosomes from specified track in UCSC database genome - api.genome.ucsc.edu/list/chromosomes?genome=hg38;track=gold
  • list chromosomes from assembly hub genome -
    api.genome.ucsc.edu/list/chromosomes?hubUrl=http://hgdownload.soe.ucsc.edu/hubs/mouseStrains/hub.txt;genome=CAST_EiJ
  • list chromosomes from specified track in assembly hub genome -
    api.genome.ucsc.edu/list/chromosomes?hubUrl=hubUrl=http://hgdownload.soe.ucsc.edu/hubs/mouseStrains/hub.txt;genome=CAST_EiJ;track=assembly
  • +
  • list schema from specified track in UCSC database genome - +
    api.genome.ucsc.edu/list/schema?genome=hg38;track=knownGene
  • getData functions

    1. Get DNA sequence from specified chromosome in UCSC database genome -
      api.genome.ucsc.edu/getData/sequence?genome=hg38;chrom=chrM
    2. Get DNA sequence from specified chromosome and start,end coordinates in UCSC database genome -
      api.genome.ucsc.edu/getData/sequence?genome=hg38;chrom=chrM;start=4321;end=5678
    3. Get DNA sequence from a track hub where 'genome' is a UCSC database -
      api.genome.ucsc.edu/getData/sequence?hubUrl=http://hgdownload.soe.ucsc.edu/hubs/mouseStrains/hub.txt;genome=mm10;chrom=chrM;start=4321;end=5678
    4. Get DNA sequence from specified chromosome and start,end coordinates in an assembly hub genome - @@ -271,30 +274,40 @@
    5. Request track data from a restricted track. See FAQ -
      api.genome.ucsc.edu/getData/track?genome=hg19;track=decipherSnvs

    Practical examples

    Looking up the schema of a specific track

    +The easiest way to get the schema for a track is to use the /list/schema function. This +can be used on both file tracks and table tracks: + +

    +Request schema for the hg38 CRISPR 10K Targets track - +
    api.genome.ucsc.edu/list/schema?genome=hg38;track=crispr10KTargets

    + +

    +There is a second indirect way to get the schema which may be preferable in certain cases. When querying track data with the /getData/track function, the jsonOutputArrays can be used in conjunction to see the track schema. This includes a description of each field present in the track. The data will also be returned in JSON array type.

    Request data from hg38 gold track in array type -
    api.genome.ucsc.edu/getData/track?genome=hg38;track=gold;chrom=chrM;jsonOutputArrays=1

    Hide track container information with trackLeavesOnly parameter

    When using the /list/tracks function to see the available tracks in an assembly, it can be useful to return all tracks in the same hierarchical level. By default, composite and supertracks will have the subtracks nested below, however, the trackLeavesOnly=1 parameter