From 99b5aaa8f5ba967943871d337f1a6f54554fdd8f Mon Sep 17 00:00:00 2001 From: Graham Date: Tue, 9 Jan 2024 16:25:55 -0800 Subject: [PATCH] BUGFIX: correct off-by-one error in BED output The BED-formatted output was not correctly reverting intron start coordinates to 0-based indexing as required by the BED format spec. Thanks to @MichaelHiller for bringing this to my attention. --- intronIC/intronIC.py | 1 + 1 file changed, 1 insertion(+) diff --git a/intronIC/intronIC.py b/intronIC/intronIC.py index 1752980..61c1b18 100755 --- a/intronIC/intronIC.py +++ b/intronIC/intronIC.py @@ -4251,6 +4251,7 @@ def output_format( attribs.insert(1, rounded_score) attribs.insert(2, dnts) elif out_type == 'BED': + attribs[1] -= 1 # revert start to 0-based indexing attribs.insert(3, label) if separator is not None: attribs = separator.join([str(a) for a in attribs])