def clip_read(data):
 qual = data['quality_scores']
 (left, right) = return_merged_clips(data)
 seq = data['bases']
 qual = data['quality_scores']
 new_seq = seq[(left - 1):right]
 new_qual = qual[(left - 1):right]
 return (new_seq, new_qual)

def clip_read ( data ) : qual = data [ 'quality_scores' ] ( left , right ) = return_merged_clips ( data ) seq = data [ 'bases' ] qual = data [ 'quality_scores' ] new_seq = seq [ ( left - 1 ) : right ] new_qual = qual [ ( left - 1 ) : right ] return ( new_seq , new_qual )
given the data for one read it returns clipped seq and qual .