From 9dec783a82627f854f7f13b59b7f92c346bafee2 Mon Sep 17 00:00:00 2001 From: depristo Date: Mon, 18 May 2009 13:34:52 +0000 Subject: [PATCH] Actually writes out a good header now git-svn-id: file:///humgen/gsa-scr1/gsa-engineering/svn_contents/trunk@744 348d0f76-0448-11de-a6fe-93d51630548a --- python/SimulateReads.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/python/SimulateReads.py b/python/SimulateReads.py index 565ca8f15..19bd11b40 100755 --- a/python/SimulateReads.py +++ b/python/SimulateReads.py @@ -651,7 +651,8 @@ def main(): raise Exception('Does not support mutation density > 1 for mutations of class', OPTIONS.mutationType) readLen = OPTIONS.readLen - header = SAMHeader( "MarkD", readLen ) + fastaRecords = [seq for seq in readRef(OPTIONS.reference)] + header = SAMHeader( fastaRecords[0].id, len(fastaRecords[0].seq) ) SAMout = SAMIO( outputSAM, header, debugging=OPTIONS.debug ) mutationsout = open(root + '.mutations.txt', 'w') @@ -665,7 +666,7 @@ def main(): counter = 0 refLen = 0 - for ref in readRef(OPTIONS.reference): + for ref in fastaRecords: refLen = len(ref.seq) # write the crazy ref file info needed by samtools