def filter_sff_file(flowgrams, header, filter_list, out_fh):
 write_sff_header(header, out_fh)
 l = 0
 for f in flowgrams:
  passed = True
  for filter in filter_list:
   passed = (passed and filter(f))
   if (not passed):
    break
  if passed:
   out_fh.write((f.createFlowHeader() + '\n'))
   l += 1
 return l

def filter_sff_file ( flowgrams , header , filter_list , out_fh ) : write_sff_header ( header , out_fh ) l = 0 for f in flowgrams : passed = True for filter in filter_list : passed = ( passed and filter ( f ) ) if ( not passed ) : break if passed : out_fh . write ( ( f . createFlowHeader ( ) + '\n' ) ) l += 1 return l
filters all flowgrams in handle with filter .