Note
Go to the end to download the full example code.
Read alignment track with split parts joined by thinner lines#
Create a SplicedReadTrack to show the
alignment in a BAM file, the spliced parts will be rendered as thinner lines.

[<Axes: title={'center': 'chr22'}, ylabel='RNA-seq'>]
from pygv.viewer import GenomeViewer
from pygv.tracks.bam_track import SplicedReadTrack
gv = GenomeViewer()
track = SplicedReadTrack(
"../examples/data/s03.chr22.bam",
name="RNA-seq")
track.sampling_ratio = 0.3
track.color_reads_by = "first of pair strand"
track.line_width = 0.3
gv.add_track(track)
gv.plot("chr22", 40349785, 40353365)
Total running time of the script: (0 minutes 0.181 seconds)