tfwillems / HipSTR

Genotype and phase short tandem repeats using Illumina whole-genome sequencing data
GNU General Public License v2.0
94 stars 31 forks source link

Error filtering diploid STR calls: filter_vcf.py #51

Closed SteveSemick closed 6 years ago

SteveSemick commented 6 years ago

Dear HipSTR authors,

I recently ran into this error (below) while filtering the output from HipSTR. Oddly, I did not encounter this error when running the suggested filtering code for haploid chromosomes. Please let me know if you have seen this error before or have any insight.

Thank you for your time.

Best, Steve

The call:

python ${HIPSTR}filter_vcf.py --vcf concat_diploid_calls_sorted.vcf.gz --min-call-qual 0.9 --max-call-flank-indel 0.15 --max-call-stutter 0.15 | bgzip -c > concat_diploid_calls_filt.vcf.gz 

The error:

Traceback (most recent call last):
  File "/users/ssemick/HipSTR/scripts/filter_vcf.py", line 216, in <module>
    main()
  File "/users/ssemick/HipSTR/scripts/filter_vcf.py", line 120, in main
    filter_reason = filter_call(sample, args)
  File "/users/ssemick/HipSTR/scripts/filter_vcf.py", line 11, in filter_call
    if sample['DP'] < filters.DEPTH:
TypeError: '<' not supported between instances of 'NoneType' and 'int'

To prepare the input file, I had run the following code:

vcf-sort -c concat_diploid_calls.vcf.gz | bgzip -c > concat_diploid_calls_sorted.vcf.gz
tabix -p vcf concat_diploid_calls_sorted.vcf.gz
tfwillems commented 6 years ago

Hi Steve,

Sorry about this issue and thanks for the detailed report. Can you verify that you're using the most recent version of HipSTR (v0.6.1)? We've encountered this issue, but it's been fixed in recent releases. If you are indeed using the most recent version, happy to help walk through how we can debug it.

Best, Thomas

SteveSemick commented 6 years ago

I had been using an installation from May 31st 2017.

I installed the latest version and ran the same code. The problem appears to be solved. Thanks for your help Thomas.

Best, Steve