510ca4e9bb7403703aee755e9d9d5b75698b21ed,deepvariant/labeler/haplotype_labeler.py,,deduplicate_haplotypes,#Any#,915
Before Change
Returns:
A subset of haplotype/genotype tuples, as a list, without duplicates.
haplotypes_and_genotypes = list(haplotypes_and_genotypes)
return [
(vh1, vg1)
for i, (vh1, vg1) in enumerate(haplotypes_and_genotypes)
if not any(vh1 == vh2 for (vh2, _) in haplotypes_and_genotypes[i + 1:])
]
After Change
Dict[Haplotypes, Genotypes].
retval = {}
for haplotypes, genotypes in haplotypes_to_genotypes_dict.items():
// Keep the last element in the dedup process. The reason is for the
// behavior to be the same as the previous implementation using list.
retval[haplotypes] = genotypes[-1]
return retval
// redacted
In pattern: SUPERPATTERN
Frequency: 3
Non-data size: 5
Instances Project Name: google/deepvariant
Commit Name: 510ca4e9bb7403703aee755e9d9d5b75698b21ed
Time: 2020-07-23
Author: pichuan@google.com
File Name: deepvariant/labeler/haplotype_labeler.py
Class Name:
Method Name: deduplicate_haplotypes
Project Name: streamlit/streamlit
Commit Name: 7a60bb5289b4ecb59a510f8ca666948c7f4c2e3d
Time: 2019-03-28
Author: thiagot@gmail.com
File Name: lib/streamlit/server.py
Class Name: Server
Method Name: loop_coroutine
Project Name: ray-project/ray
Commit Name: 7a78f4e95960bf8560b0547802f171e2b40e4f6b
Time: 2021-01-26
Author: zhisbug@users.noreply.github.com
File Name: python/ray/util/collective/collective_group/nccl_collective_group.py
Class Name: NCCLGroup
Method Name: destroy_group