googlegenomics / gcp-variant-transforms

GCP Variant Transforms
Apache License 2.0
134 stars 55 forks source link

Adding a check in the less than method for the VariantCall class to ensure that in cases where there is a mix of arrays and scalar values that the comparison still works. #701

Open adaykin opened 2 years ago

adaykin commented 2 years ago

Adding a check in the less than method for the VariantCall class to ensure that in cases where there is a mix of arrays and scalar values that the comparison still works.

When running bq_to_vcf the lt method in VariantCall was attempting to compare a list to a single value (-1) that is getting set by using the MISSING_GENOTYPE_VALUE (set to -1) in the densify_variants._densify_variants method. This was causing an exception to occur.

Test: Added a unit test and ran a test manually on a dataset that was receiving the error mentioned above to make sure the bq_to_vcf could successfully generate a VCF file.