From 4dcb6eff3431d436ee5ef6495d10e80f3864db62 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Karel=20B=C5=99inda?= Date: Mon, 26 Feb 2018 17:51:58 -0500 Subject: [PATCH] Don't modify SAM headers fixes #18 --- samsift/samsift.py | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/samsift/samsift.py b/samsift/samsift.py index ab505af..4fd2ee1 100755 --- a/samsift/samsift.py +++ b/samsift/samsift.py @@ -265,17 +265,17 @@ def run(self): #print("@PG", "ID:{}".format(PROGRAM), "PN:{}".format(PROGRAM), "VN:{}".format(VERSION), "CL:{}".format(" ".join(sys.argv)), sep="\t") header=in_sam.header - pg={ - "ID":PROGRAM, - "PN":PROGRAM, - "VN":VERSION, - "CL":" ".join(map(lambda x:"'{}'".format(x),sys.argv)), - } - - try: - header['PG'].insert(0,pg) - except KeyError: - header['PG']=[pg] + #pg={ + # "ID":PROGRAM, + # "PN":PROGRAM, + # "VN":VERSION, + # "CL":" ".join(map(lambda x:"'{}'".format(x),sys.argv)), + # } + + #try: + # header['PG'].insert(0,pg) + #except KeyError: + # header['PG']=[pg] with pysam.AlignmentFile(self.out_sam_fn, self.pysam_out_mode, header=header) as out_sam: self.out_sam=out_sam