def count_seqs_from_file(fasta_file, parser=parse_fasta):
 result = 0
 lens = []
 for record in parser(fasta_file):
  result += 1
  lens.append(len(record[1]))
 if (result == 0):
  return (result, None, None)
 else:
  return (result, mean(lens), std(lens))

def count_seqs_from_file ( fasta_file , parser = parse_fasta ) : result = 0 lens = [ ] for record in parser ( fasta_file ) : result += 1 lens . append ( len ( record [ 1 ] ) ) if ( result == 0 ) : return ( result , None , None ) else : return ( result , mean ( lens ) , std ( lens ) )
return number of sequences in fasta_file fasta_file: an open file object .