Skip to content

Commit

Permalink
add better filtration for reloading SNV/INDEL variants
Browse files Browse the repository at this point in the history
  • Loading branch information
hanars committed Mar 18, 2024
1 parent 4cdaa05 commit e14de3e
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions seqr/views/utils/variant_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -102,10 +102,13 @@ def update_project_saved_variant_json(project_id, family_guids=None, dataset_typ

def saved_variants_dataset_type_filter(dataset_type):
xpos_filter_key = 'xpos__gte' if dataset_type == Sample.DATASET_TYPE_MITO_CALLS else 'xpos__lt'
return {
'alt__isnull': dataset_type == Sample.DATASET_TYPE_SV_CALLS,
xpos_filter_key: get_xpos('M', 1),
}
dataset_filter = {xpos_filter_key: get_xpos('M', 1)}
if dataset_type == Sample.DATASET_TYPE_SV_CALLS:
dataset_filter['alt__isnull'] = True
else:
# Filter out manual variants with invalid characters, such as those used for STRs
dataset_filter['alt__regex'] = '^[ACGT]$'
return dataset_filter


def parse_saved_variant_json(variant_json, family):
Expand Down

0 comments on commit e14de3e

Please sign in to comment.