def getLens(filename):
 lens = []
 fa_instance = screed.open(filename)
 for record in fa_instance:
  lens.append(len(record['sequence']))
 return sorted(lens)

def getLens ( filename ) : lens = [ ] fa_instance = screed . open ( filename ) for record in fa_instance : lens . append ( len ( record [ 'sequence' ] ) ) return sorted ( lens )
parses fasta file using screed to create a sorted list of contig lengths .