r3fang / SnapTools

A module for working with snap files in Python
Apache License 2.0
35 stars 21 forks source link

Fix MACS2 call under Python 3 #29

Open mruffalo opened 4 years ago

mruffalo commented 4 years ago

Under Python 3, the sequence (chromosome) names provided to MACS2 were retrieved as byte strings, then wrapped in str() before writing to disk. This resulted in sequence names like "b'chr1'", as in:

b'chr14'      46787083        46787310        AAACATCGAAGGACACCATCAAGT
b'chr3'       56262063        56262116        AAACATCGAAGGACACCATCAAGT
b'chr2'       103894442       103894639       AAACATCGAAGGACACCATCAAGT

Tested this fix under Python 2 and 3.