Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/benb/remove_hardcoded_datasettyp…
Browse files Browse the repository at this point in the history
…e_allele_validation' into sv-locus-alleles
  • Loading branch information
jklugherz committed Mar 5, 2025
2 parents b87bd2e + e4f2b80 commit 0addb5b
Showing 1 changed file with 8 additions and 4 deletions.
12 changes: 8 additions & 4 deletions v03_pipeline/lib/reference_datasets/reference_dataset.py
Original file line number Diff line number Diff line change
Expand Up @@ -104,6 +104,12 @@ def version(self, reference_genome: ReferenceGenome) -> str:
)
return version

def dataset_types(
self,
reference_genome: ReferenceGenome,
) -> frozenset[DatasetType]:
return CONFIG[self][reference_genome][DATASET_TYPES]

@property
def enums(self) -> dict | None:
return CONFIG[self].get(ENUMS)
Expand Down Expand Up @@ -143,10 +149,8 @@ def get_ht(
if enum_selects:
ht = ht.transmute(**enum_selects)
ht = filter_contigs(ht, reference_genome)
# Reference Datasets are DatasetType agnostic, but these
# methods (in theory) support SV/GCNV. SNV_INDEL
# is passed as a proxy for non-SV/GCNV.
validate_allele_type(ht, DatasetType.SNV_INDEL)
for dataset_type in self.dataset_types(reference_genome):
validate_allele_type(ht, dataset_type)
validate_no_duplicate_variants(ht, reference_genome, DatasetType.SNV_INDEL)
# NB: we do not filter with "filter" here
# ReferenceDatasets are DatasetType agnostic and that
Expand Down

0 comments on commit 0addb5b

Please sign in to comment.