def getCounts(ref, countLs, key, altLs, oneKPopInfo, effField): """Rm indels, non-rare 1kg, and non-func vars.""" finalCountLs = [] effectVars = parseEffectVars(effField) for count, alt in zip(countLs, altLs): isRare = filterExac1kg.checkRare(oneKPopInfo, (alt,), ref, key) if isRare and len(alt) == 1 and len(ref) == 1 and alt in effectVars: finalCountLs.append(count) return finalCountLs
def getCounts(ref, countLs, key, altLs, oneKPopInfo, effField, gene, inGoodPos): """Rm indels, non-rare 1kg, and non-func vars. Indles are filtered by kaviar and cg. """ finalCountLs = [] effectVars = parseEffectVars(effField, gene) for count, alt in zip(countLs, altLs): if inGoodPos: isRare = filterExac1kg.checkRare(oneKPopInfo, (alt,), ref, key) if isRare and alt in effectVars: finalCountLs.append(count) return finalCountLs