Mercurial > repos > drosofff > parse_srbowtie_alignment
comparison smRtools.py @ 4:945878e8e287 draft
Uploaded
author | drosofff |
---|---|
date | Mon, 23 Jun 2014 05:15:24 -0400 |
parents | 27b40e4ccee2 |
children |
comparison
equal
deleted
inserted
replaced
3:27b40e4ccee2 | 4:945878e8e287 |
---|---|
302 '''return a dictionary of number of reads by size (the keys)''' | 302 '''return a dictionary of number of reads by size (the keys)''' |
303 dicsize = {} | 303 dicsize = {} |
304 for offset in self.readDict: | 304 for offset in self.readDict: |
305 for size in self.readDict[offset]: | 305 for size in self.readDict[offset]: |
306 dicsize[size] = dicsize.get(size, 0) + 1 | 306 dicsize[size] = dicsize.get(size, 0) + 1 |
307 for offset in range (min(dicsize.keys(), max(dicsize.keys()+1): | 307 for offset in range (min(dicsize.keys()), max(dicsize.keys())+1): |
308 dicsize[size] = dicsize.get(size, 0) # to fill offsets with null values | 308 dicsize[size] = dicsize.get(size, 0) # to fill offsets with null values |
309 return dicsize | 309 return dicsize |
310 | 310 |
311 def statsizes (self, upstream_coord=None, downstream_coord=None): | 311 def statsizes (self, upstream_coord=None, downstream_coord=None): |
312 ''' migration to memory saving by specifying possible subcoordinates | 312 ''' migration to memory saving by specifying possible subcoordinates |