5884b9f213c7d339352dda9c40a6466ce3e12a1c gperez2 Wed Jul 16 11:58:33 2025 -0700 Updating the bedMethyl/bigMethyl Track Format page, refs #36002 diff --git src/hg/htdocs/goldenPath/help/bedMethyl.html src/hg/htdocs/goldenPath/help/bedMethyl.html index 2b70c9ebc3f..491b668a7a5 100755 --- src/hg/htdocs/goldenPath/help/bedMethyl.html +++ src/hg/htdocs/goldenPath/help/bedMethyl.html @@ -1,51 +1,180 @@ -
-The bedMethyl format allows display of methylation sites. +The bedMethyl +format is an extension of the standard BED 9 format used +to display DNA methylation site data in a genome browser. This format is useful for base-resolution +methylation data generated by bisulfite sequencing or direct methylation detection methods such as +long-read sequencing. By including both methylation level and support (coverage), bedMethyl +provides a detailed view of methylation across the genome.
--The bedMethyl format is line-oriented. BedMethyl data are preceded by a -track definition line, which adds a number of options for -controlling the default display of this track.
+The bedMethyl format includes the information of a BED 9 along with additional fields:
+
+
+
The items are colored from 0% +methylated modified (blue) to +100% (red). Hovering over an item or +clicking it shows the additional details found in bedMethyl.
+ + +-Following the track definition line are the track data in 18 column BED format:
+In this example, you will create a bedMethyl custom track using bedMethyl data for the hg38 assembly. +
+
+track type=bedMethyl name="bedmethyl example" description="bedMethyl custom track" visibility="pack"
+chr21 5010053 5010054 h 0 + 5010053 5010054 255,0,0 1 0.00 0 0 1 0 0 0 0
+chr21 5010053 5010054 m 0 + 5010053 5010054 255,0,0 1 0.00 1 0 0 0 0 0 0
+chr21 5010215 5010216 h 0 + 5010215 5010216 255,0,0 1 30.00 0 0 1 0 0 0 0
+chr21 5010215 5010216 m 0 + 5010215 5010216 255,0,0 1 30.00 1 0 0 0 0 0 0
+chr21 5010331 5010332 h 0 + 5010331 5010332 255,0,0 1 70.00 0 0 1 0 0 0 0
+chr21 5010331 5010332 m 0 + 5010331 5010332 255,0,0 1 70.00 1 0 0 0 0 0 0
+chr21 5010335 5010336 h 0 + 5010335 5010336 255,0,0 1 100.00 0 0 1 0 0 0 0
+chr21 5010335 5010336 m 0 + 5010335 5010336 255,0,0 1 100.00 1 0 0 0 0 0 0
+
chromA chromStartA chromEndA dataValueA
-chromB chromStartB chromEndB dataValueB
+
+The bigMethyl format is the indexed version of bedMethyl using bedToBigBed. +See bigBed format. The bigMethyl format is more efficient to display in +the Genome Browser, and it offers more trackDb options, which will allow for customization. The +following autoSql definition is an example on how to specify bigMethyl files. -
bedToBigBed
utility is run with the
+-as=bigMethyl.as
option.
+
+table bigMethyl
+"bigMethyl bedMethyl"
+(
+ string chrom; "Reference sequence chromosome or scaffold"
+ uint chromStart; "Start position in chrom"
+ uint chromEnd; "End position in chrom"
+ string name; "dbSNP Reference SNP (rs) identifier or :"
+ uint score; "Score from 0-1000, derived from p-value"
+ char[1] strand; "Unused. Always '.'"
+ uint thickStart; "Start position in chrom"
+ uint thickEnd; "End position in chrom"
+ uint color; "Red (positive effect) or blue (negative). Brightness reflects pvalue"
+ string nValidCov; "Valid Coverage"
+ double percMod; "Percent Modified"
+ uint nMod; "Number of calls with a modified base"
+ uint nCanon; "Number of calls with a canonical base"
+ uint nOther; "Number of calls with a modified base, other modification"
+ uint nDelete; "Number of reads with a deletion at this reference position"
+ uint nFail; "Number of calls where the probability of the call was below the threshold"
+ uint nDiff; "Number of reads with a base other than the canonical base for this modification"
+ uint nNoCall; "Number of reads aligned to this reference position, with the correct canonical base, but without a base modification call"
+)
+The first 9 fields of this bigMethyl format are the same as the first 9 fields of the standard +BED format.
+ + +-All options are placed in a single line separated by spaces:
-track type=bedMethyl name=track_label description=center_label
-
+In this example, you will create a bigMethyl file to display as a custom track.
+bedToBigBed
+ utility.bedToBigBed
utility to create a bigMethyl file from your sorted bedMethyl file, using
+the bedMethyl.bed file and chrom.sizes files created above.
+bedToBigBed -as=bigMethyl.as -type=bed9+9 bedMethyl.bed hg38.chrom.sizes bigMethyl.bb
-Note: if you copy/paste the above example, you must remove the line breaks.
+track type=bigMethyl name="bigMethyl Example" description="A bigMethyl file" bigDataUrl=http://genome.ucsc.edu/goldenPath/help/examples/bigMethyl.bb visibility=pack
-The track type is REQUIRED, and must be bedMethyl:
-type=bedMethyl
+Custom tracks can also be loaded via one URL line.
+This link loads the same bigMethyl.bb track and sets additional display parameters from Example 2 in the URL:
+http://genome.ucsc.edu/cgi-bin/hgTracks?ignoreCookie=1&db=hg38&position=chr21:5,010,030-5,010,408&hgct_customText=track%20type=bigMethyl%20name=Example %20bigDataUrl=http://genome.ucsc.edu/goldenPath/help/examples/bigMethyl.bb %20visibility=pack
+
+If you would like to share your bigMethyl data track with a colleague, learn how to create a URL +link to your data by looking at Example #6 on the +custom track help page.
--BedMethyl track data values can be integer or real, positive or negative values. The -chromosome coordinates are zero-based, half-open. -This means that the first chromosome position is 0, and the last position in a chromosome -of length N would be N - 1. The positions listed in the input data must be in -numerical order, and only the specified positions will be graphed. bedMethyl format has eighteen -columns of data:
chrom chromStart chromEnd dataValue
+Because the bigMethyl files are an extension of bigBed files, which are indexed binary files, it can
+be difficult to extract data from them. UCSC has developed the following programs to assist
+in working with bigBed formats, available from the
+binary utilities directory.
+bigBedToBed
— converts a bigBed file to ASCII BED format.bigBedSummary
— extracts summary information from a bigBed file.bigBedInfo
— prints out information about a bigBed file.-
-Note:
-The above example is a custom track that includes a track type=
line that is
-specific for loading the data in the browser. This line will cause a raw bedMethyl data file to fail
-validation by other tools, such as validateFiles
, outside of the browser.
bedToBigBed
program, check your input
+file for data coordinates that extend past the the end of the chromosome. If these are present, run
+the bedClip
program
+(available here) to remove the problematic
+row(s) in your input file before running the bedToBigBed
program.
+