Skip to content

Commit

Permalink
test v0.3.1
Browse files Browse the repository at this point in the history
  • Loading branch information
andyjslee committed Aug 6, 2024
1 parent 932c4c9 commit 0402dce
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
5 changes: 5 additions & 0 deletions python/vstolib/vcf/clairs.py
Original file line number Diff line number Diff line change
Expand Up @@ -151,6 +151,7 @@ def parse_clairs_callset(
# Update the following variables if they are currently unknown but can be inferred:
# total_read_count
# alternate_allele_fraction
# reference_allele_read_count
if alternate_allele_read_count >= 0 and \
reference_allele_read_count >= 0 and \
total_read_count == -1:
Expand All @@ -159,6 +160,10 @@ def parse_clairs_callset(
total_read_count > 0 and \
alternate_allele_fraction == -1.0:
alternate_allele_fraction = float(alternate_allele_read_count) / float(total_read_count)
if alternate_allele_read_count >= 0 and \
total_read_count > 0 and \
reference_allele_read_count <= 0:
reference_allele_read_count = total_read_count - alternate_allele_read_count

# Append variant call to variants list
variant_call_id = '%s_%s_%s_%i_%s_%s:%i_%s:%i' % (
Expand Down
4 changes: 3 additions & 1 deletion python/vstolib/vcf/common.py
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,9 @@ def get_attribute_types(variant_calling_method: str) -> Dict:
"""
Get the attribute type dictionary for a variant calling method.
"""
if variant_calling_method == VariantCallingMethods.CUTESV:
if variant_calling_method == VariantCallingMethods.CLAIRS:
return VariantCallingMethods.AttributeTypes.CLAIRS
elif variant_calling_method == VariantCallingMethods.CUTESV:
return VariantCallingMethods.AttributeTypes.CUTESV
elif variant_calling_method == VariantCallingMethods.DEEPVARIANT:
return VariantCallingMethods.AttributeTypes.DEEPVARIANT
Expand Down

0 comments on commit 0402dce

Please sign in to comment.