I have some STAR_aligned bam file. I want to add color tags to some reads in the file using pysam, in order to track them better in IGV.
Here is the code part which adds the tag:
red = '255,0,0' r = pysam.AlignedRead() r.tags += [('YC', red)]
This updates the file with new tag, which however does not work properly in IGV. I think some casting is missing here which I cannot think of.
Has anyone done this before? Thank for your help :)