def calc_bin_cov(scaffolds, cov):
bases = sum([cov[i][<NUM_LIT:0>] for i in scaffolds if i in cov])<EOL>length = sum([cov[i][<NUM_LIT:1>] for i in scaffolds if i in cov])<EOL>if length == <NUM_LIT:0>:<EOL><INDENT>return <NUM_LIT:0><EOL><DEDENT>return float(float(bases)/float(length))<EOL>
calculate bin coverage