Skip to content

Commit

Permalink
fixed kmer analysis - bug was due to making a ref dict
Browse files Browse the repository at this point in the history
  • Loading branch information
ifiddes committed Jul 3, 2014
1 parent a3da28d commit 4f0a2cf
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
2 changes: 2 additions & 0 deletions .gitignore
@@ -1 +1,3 @@
tests/output/*
testLog.txt
testJobTree*
5 changes: 3 additions & 2 deletions nanopore/analyses/kmerAnalysis.py
Expand Up @@ -46,9 +46,10 @@ def convert_sam_record(self, record, target):
def run(self, kmer_size=5):
"""Run karen's pipeline.
"""
self.ref = dict(fastaRead(open(self.referenceFastaFile, "r")))
self.ref = getFastaDictionary(self.referenceFastaFile)
outf = open(os.path.join(self.getLocalTempDir(), "tab_delim_align"), "w")
sam = pysam.Samfile(self.samFile, "r" )
outf = open(os.path.join(self.outputDir, "test"), "w")
sam = pysam.Samfile(self.samFile, "r" )
for record in sam:
rseq = self.ref[sam.getrname(record.tid)]
seq, ref = self.convert_sam_record(record, rseq)
Expand Down

0 comments on commit 4f0a2cf

Please sign in to comment.