def send_flowgram_to_socket(identifier, flowgram, socket, trim=False):
 if trim:
  flowgram = flowgram.getQualityTrimmedFlowgram()
 if (not hasattr(flowgram, 'spaced_flowgram')):
  spaced_flowgram_seq = ' '.join(map(str, flowgram.flowgram))
  flowgram.spaced_flowgram = spaced_flowgram_seq
 else:
  spaced_flowgram_seq = flowgram.spaced_flowgram
 data = ('%s %d %s\n' % (identifier, len(flowgram), spaced_flowgram_seq))
 save_send(socket, data)

def send_flowgram_to_socket ( identifier , flowgram , socket , trim = False ) : if trim : flowgram = flowgram . getQualityTrimmedFlowgram ( ) if ( not hasattr ( flowgram , 'spaced_flowgram' ) ) : spaced_flowgram_seq = ' ' . join ( map ( str , flowgram . flowgram ) ) flowgram . spaced_flowgram = spaced_flowgram_seq else : spaced_flowgram_seq = flowgram . spaced_flowgram data = ( '%s %d %s\n' % ( identifier , len ( flowgram ) , spaced_flowgram_seq ) ) save_send ( socket , data )
send one flowgram over a socket .