@@ -634,51 +634,4 @@ Then we can define the data and tell the server how to render it.
634634 ts.track(" heatmap" , height = 250 ).opts(valueScaleMax = 0.5 ),
635635 )
636636
637- .. image :: img/eggholder-function.png
638-
639-
640- Plugin Tracks
641- """""""""""""
642-
643- The **higlass-python ** package also provides a way to include custom tracks in
644- your view configuration. These tracks are defined in a separate (JavaScript)
645- package, and can be included in Python in with some additional setup.
646-
647- The ``PluginTrack `` provides a mechanism to hook into the schema validation
648- as well as provide the plugin source for the renderer. The ``plugin_url `` is a
649- special field which points to the JavaScript source code.
650-
651- A plugin can be created by subclassing ``hg.PluginTrack `` and specifying the ``type ``
652- and ``plugin_url ``. For example,
653-
654- .. code-block :: python
655-
656- import higlass as hg
657-
658- from typing import ClassVar, Literal
659-
660- class PileupTrack (hg .PluginTrack ):
661- type : Literal[" pileup" ] = " pileup"
662- plugin_url: ClassVar[str ] = " https://unpkg.com/higlass-pileup/dist/higlass-pileup.min.js"
663-
664- # Specify the track-specific data
665- pileup_data = {
666- " type" : " bam" ,
667- " url" : " https://pkerp.s3.amazonaws.com/public/bamfile_test/SRR1770413.sorted.bam" ,
668- " chromSizesUrl" : " https://pkerp.s3.amazonaws.com/public/bamfile_test/GCF_000005845.2_ASM584v2_genomic.chrom.sizes" ,
669- " options" : {" maxTileWidth" : 30000 },
670- }
671-
672- # Create and use the custom track
673- pileup_track = PileupTrack(data = pileup_data, height = 180 ).opts(
674- axisPositionHorizontal = " right" ,
675- axisLabelFormatting = " normal" ,
676- showCoverage = True ,
677- colorScale = [
678- " #2c7bb6" ," #92c5de" ," #ffffbf" ," #fdae61" ," #808080" , " #DCDCDC" ,
679- ],
680- )
681-
682- hg.view((pileup_track, " center" ))
683-
684- .. image :: img/jupyter-pileup-no-code.png
637+ .. image :: img/eggholder-function.png
0 commit comments