You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi! I am trying to use the krisp_vcf command but I am running into the below error message over and over again no matter how I alter my VCF file.
$ krisp_vcf krisp_metadata.csv Race_1.masked.fa --vcf SNPs_exclude_nonetype_merged_DNAs.vcf.gz --groups NA2 NA3 NA4 NA5 NA6 OTHR --out_csv krisp_SNPs_diagnostic_variants.csv
Traceback (most recent call last):
File "/home/holmesj/data/miniconda3/envs/py311/bin/krisp_vcf", line 8, in
sys.exit(main())
^^^^^^
File "/home/holmesj/genomics/2-MISC-BY-USER/Janesse/krisp/src/krisp/krisp_vcf/krisp_vcf.py", line 1393, in main
run_all()
File "/home/holmesj/genomics/2-MISC-BY-USER/Janesse/krisp/src/krisp/krisp_vcf/krisp_vcf.py", line 1383, in run_all
for result in report_diag_region(args.vcf, contig, groups, reference, args,
File "/home/holmesj/genomics/2-MISC-BY-USER/Janesse/krisp/src/krisp/krisp_vcf/krisp_vcf.py", line 1193, in report_diag_region
for region in find_diag_region(variants, groups, reference, **kwargs):
File "/home/holmesj/genomics/2-MISC-BY-USER/Janesse/krisp/src/krisp/krisp_vcf/krisp_vcf.py", line 791, in find_diag_region
for region in windower:
File "/home/holmesj/genomics/2-MISC-BY-USER/Janesse/krisp/src/krisp/krisp_vcf/krisp_vcf.py", line 204, in sliding_window
for index, variant in enumerate(variants):
File "/home/holmesj/genomics/2-MISC-BY-USER/Janesse/krisp/src/krisp/krisp_vcf/find_diag_var.py", line 196, in from_vcf
out = cls(var, groups, check_groups=False, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/holmesj/genomics/2-MISC-BY-USER/Janesse/krisp/src/krisp/krisp_vcf/find_diag_var.py", line 169, in init
self.allele_counts = self._allele_counts(variant, self.groups,
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/holmesj/genomics/2-MISC-BY-USER/Janesse/krisp/src/krisp/krisp_vcf/find_diag_var.py", line 304, in _allele_counts
output[group] = GroupedVariant._count_genotypes(variant,
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/holmesj/genomics/2-MISC-BY-USER/Janesse/krisp/src/krisp/krisp_vcf/find_diag_var.py", line 256, in _count_genotypes
min_depth = sum(data['AD']) * min_freq
^^^^^^^^^^^^^^^
TypeError: unsupported operand type(s) for : 'int' and 'NoneType'
According to Google, "The NoneType object is a special type in Python that represents the absence of a value. In other words, NoneType is the type for the None object, which is an object that contains no value or defines a null value. It is used to indicate that a variable or expression does not have a value or has an undefined value."
So, I tried to filter out any undefined/missing data with the following command (I specified to keep MQ values as I received a previous error message saying "KeyError: 'invalid FORMAT: MQ"):
Even after the data is filtered, I still keep getting the "TypeError: unsupported operand type(s) for : 'int' and 'NoneType'" message whenever I use the above krisp_vcf command. I am at a loss for how to fix this error. Can anyone provide some advice on what I am doing wrong?
The text was updated successfully, but these errors were encountered:
Hi! I am trying to use the krisp_vcf command but I am running into the below error message over and over again no matter how I alter my VCF file.
$ krisp_vcf krisp_metadata.csv Race_1.masked.fa --vcf SNPs_exclude_nonetype_merged_DNAs.vcf.gz --groups NA2 NA3 NA4 NA5 NA6 OTHR --out_csv krisp_SNPs_diagnostic_variants.csv
Traceback (most recent call last):
File "/home/holmesj/data/miniconda3/envs/py311/bin/krisp_vcf", line 8, in
sys.exit(main())
^^^^^^
File "/home/holmesj/genomics/2-MISC-BY-USER/Janesse/krisp/src/krisp/krisp_vcf/krisp_vcf.py", line 1393, in main
run_all()
File "/home/holmesj/genomics/2-MISC-BY-USER/Janesse/krisp/src/krisp/krisp_vcf/krisp_vcf.py", line 1383, in run_all
for result in report_diag_region(args.vcf, contig, groups, reference, args,
File "/home/holmesj/genomics/2-MISC-BY-USER/Janesse/krisp/src/krisp/krisp_vcf/krisp_vcf.py", line 1193, in report_diag_region
for region in find_diag_region(variants, groups, reference, **kwargs):
File "/home/holmesj/genomics/2-MISC-BY-USER/Janesse/krisp/src/krisp/krisp_vcf/krisp_vcf.py", line 791, in find_diag_region
for region in windower:
File "/home/holmesj/genomics/2-MISC-BY-USER/Janesse/krisp/src/krisp/krisp_vcf/krisp_vcf.py", line 204, in sliding_window
for index, variant in enumerate(variants):
File "/home/holmesj/genomics/2-MISC-BY-USER/Janesse/krisp/src/krisp/krisp_vcf/find_diag_var.py", line 196, in from_vcf
out = cls(var, groups, check_groups=False, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/holmesj/genomics/2-MISC-BY-USER/Janesse/krisp/src/krisp/krisp_vcf/find_diag_var.py", line 169, in init
self.allele_counts = self._allele_counts(variant, self.groups,
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/holmesj/genomics/2-MISC-BY-USER/Janesse/krisp/src/krisp/krisp_vcf/find_diag_var.py", line 304, in _allele_counts
output[group] = GroupedVariant._count_genotypes(variant,
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/holmesj/genomics/2-MISC-BY-USER/Janesse/krisp/src/krisp/krisp_vcf/find_diag_var.py", line 256, in _count_genotypes
min_depth = sum(data['AD']) * min_freq
^^^^^^^^^^^^^^^
TypeError: unsupported operand type(s) for : 'int' and 'NoneType'
According to Google, "The NoneType object is a special type in Python that represents the absence of a value. In other words, NoneType is the type for the None object, which is an object that contains no value or defines a null value. It is used to indicate that a variable or expression does not have a value or has an undefined value."
So, I tried to filter out any undefined/missing data with the following command (I specified to keep MQ values as I received a previous error message saying "KeyError: 'invalid FORMAT: MQ"):
$vcftools --gzvcf SNPs_filtered_merged_DNAs.vcf.gz --max-missing 1.00 --recode --recode-INFO MQ --stdout | bgzip -c > SNPs_exclude_nonetype_merged_DNAs.vcf.gz
Even after the data is filtered, I still keep getting the "TypeError: unsupported operand type(s) for : 'int' and 'NoneType'" message whenever I use the above krisp_vcf command. I am at a loss for how to fix this error. Can anyone provide some advice on what I am doing wrong?
The text was updated successfully, but these errors were encountered: