def _run_filter_pipeline(self, variants, expected, reference_names=None): filtered_variants = ( self.pipeline | Create(variants) | 'FilterVariants' >> filter_variants.FilterVariants(reference_names=reference_names)) assert_that(filtered_variants, asserts.variants_equal_to_ignore_order(expected)) self.pipeline.run()
def test_merge_variants(self): variant_merger = move_to_calls_strategy.MoveToCallsStrategy( '^A1$', False, False) variant_list, merged_variant = self._get_sample_merged_variants() unmerged_variant_list = self._get_sample_unmerged_variants() pipeline = TestPipeline() merged_variants = ( pipeline | Create(variant_list + unmerged_variant_list, reshuffle=False) | 'MergeVariants' >> merge_variants.MergeVariants(variant_merger)) assert_that(merged_variants, asserts.variants_equal_to_ignore_order([merged_variant] + unmerged_variant_list)) pipeline.run()