Example #1
0
 def test_create_call_set(self):
     call_set = VariantCallSet.create_and_save(
         name="call_set",
         sample_id="C00123",
         variant_sets=self.variant_sets)
     cs = VariantCallSet.objects.get(name="call_set")
     assert call_set == cs
     assert cs.name == "call_set"
     assert cs.variant_sets[0].reference_set.name == "ref_set"
Example #2
0
 def _create_call_sets(self):
     for sample in self.vcf_reader.samples:
         try:
             cs = VariantCallSet.create_and_save(
                 name="_".join([sample, self.method]),
                 variant_sets=self.variant_sets,
                 sample_id=sample,
                 info={"variant_caller": self.method},
             )
         except NotUniqueError:
             raise ValueError(
                 "There is already a call set for sample %s with method %s "
                 % (sample, self.method))
         else:
             self.call_sets[sample] = cs