bxlab / bx-python

Tools for manipulating biological data, particularly multiple sequence alignments
MIT License
145 stars 53 forks source link

Use chain.from_iterable in bed_coverage.py #64

Closed cool-RR closed 4 years ago

cool-RR commented 4 years ago

This is a faster and more idiomatic way of using itertools.chain. Instead of computing all the items in the iterable and storing them in memory, they are computed one-by-one and never stored as a huge list. This can save on both runtime and memory space.

nsoranzo commented 4 years ago

Thanks again for the PR, I've opened a PR with the alternative implementation in #65.