Skip to content
This repository was archived by the owner on Nov 17, 2023. It is now read-only.

Commit 3ad5688

Browse files
authored
Merge pull request #159 from VariantEffect/protein_counts
allow amino acid score-only datasets
2 parents 15aa5be + 3632962 commit 3ad5688

File tree

1 file changed

+10
-6
lines changed

1 file changed

+10
-6
lines changed

dataset/forms/scoreset.py

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -639,18 +639,22 @@ def clean(self):
639639
score_data: MaveDataset = cleaned_data.get("score_data")
640640
count_data: MaveDataset = cleaned_data.get("count_data")
641641

642-
if score_data and count_data:
643-
self.allow_aa_sequence = (
644-
score_data.index_column == constants.hgvs_pro_column
645-
and count_data.index_column == constants.hgvs_pro_column
646-
)
647-
648642
meta_data = cleaned_data.get("meta_data", {})
649643

650644
has_score_data = (score_data is not None) and (not score_data.is_empty)
651645
has_count_data = (count_data is not None) and (not count_data.is_empty)
652646
has_meta_data = (meta_data is not None) and len(meta_data) > 0
653647

648+
if has_score_data and has_count_data:
649+
self.allow_aa_sequence = (
650+
score_data.index_column == constants.hgvs_pro_column
651+
and count_data.index_column == constants.hgvs_pro_column
652+
)
653+
elif has_score_data:
654+
self.allow_aa_sequence = (
655+
score_data.index_column == constants.hgvs_pro_column
656+
)
657+
654658
if has_meta_data:
655659
self.instance.extra_metadata = meta_data
656660

0 commit comments

Comments
 (0)