comparison small_rna_maps.py @ 28:14adf24603b6 draft

planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/small_rna_maps commit ebb322e2ed6989d2a7520e8c5ffc7a7477907aef
author artbio
date Thu, 25 Apr 2019 12:49:05 -0400
parents fe1a9cfaf5c3
children 8b5695592784
comparison
equal deleted inserted replaced
27:fe1a9cfaf5c3 28:14adf24603b6
87 map_dictionary[(chrom, positions[0]+1, 'F')].append( 87 map_dictionary[(chrom, positions[0]+1, 'F')].append(
88 read.query_alignment_length) 88 read.query_alignment_length)
89 else: 89 else:
90 for read in bam_object.fetch(chrom): 90 for read in bam_object.fetch(chrom):
91 positions = read.positions # a list of covered positions 91 positions = read.positions # a list of covered positions
92 if read.is_reverse: 92 map_dictionary[(chrom, positions[0]+1, 'F')].append(
93 map_dictionary[(chrom, positions[-1]+1, 'F')].append( 93 read.query_alignment_length)
94 read.query_alignment_length)
95 else:
96 map_dictionary[(chrom, positions[0]+1, 'F')].append(
97 read.query_alignment_length)
98 return map_dictionary 94 return map_dictionary
99 95
100 def grouper(self, iterable, clust_distance): 96 def grouper(self, iterable, clust_distance):
101 prev = None 97 prev = None
102 group = [] 98 group = []