Commits

Anonymous committed 59e7efa

bugfix

Comments (0)

Files changed (1)

scripts/bam2xgmml.py

       weight = 0.5
       xa_tags = [rtag[1] for rtag in r.tags if rtag[0] == 'XA']
       if len(xa_tags):
-        weight /= len(xa_tags.split(';'))
+        weight /= len(xa_tags[0].split(';'))
       chrom_r1 = pysam.Samfile.getrname(bamh, r.tid)
       chrom_r2 = pysam.Samfile.getrname(bamh, r.mrnm)
       pos_r1 = r.pos
       weight = 0.5
       xa_tags = [rtag[1] for rtag in r.tags if rtag[0] == 'XA']
       if len(xa_tags):
-        weight /= len(xa_tags.split(';'))
+        weight /= len(xa_tags[0].split(';'))
       chrom_r1 = pysam.Samfile.getrname(bamh, r.tid)
       chrom_r2 = pysam.Samfile.getrname(bamh, r.mrnm)
       pos_r1 = r.pos