Problem with VCF filtering

54 views
Skip to first unread message

Louis Gauthier

unread,
Jul 7, 2016, 10:10:00 AM7/7/16
to lobSTR user group
Hi Melissa,

I'm using lobSTR on WGS Illumina data. I've successfully allelotyped my files and I'm now trying to filter the resulting VCFs.
Using the filtering script yields the following error:

Traceback (most recent call last):
  File "lobSTR_filter_vcf.py", line 161, in <module>
    if LogScore(sample["Q"]) < args.call_log_score:
  File "lobSTR_filter_vcf.py", line 33, in LogScore
    return -1*math.log10(1-score+SMALLNUM)
TypeError: unsupported operand type(s) for -: 'int' and 'NoneType'

Now this error is obviously thrown because my VCFs contain genotypes for which no call has been made (GT field is './.'), causing the variable 'score' to be set to 'None'.
Since the VCFs have been generated by lobSTR and I assume it logical that there would be at least some positions without a call, is it possible this might just be a missing verification in the code? i.e. check if a call has been made before trying to parse info for each field.

I wrote a working quick fix to debug the problem but I wouldn't want to mess with the code too much as I'm no python expert.
Everything else has been running (almost) flawlessly so far. Thanks in advance!

Louis 

CoCo

unread,
Oct 21, 2016, 9:36:44 AM10/21/16
to lobSTR user group
if sample["GT"]: -> if sample["GT"] != "./." :

Irene L

unread,
Mar 2, 2017, 6:04:55 AM3/2/17
to lobSTR user group
Thanks, this solved my problem!

takic...@gmail.com

unread,
Jun 20, 2017, 7:33:28 PM6/20/17
to lobSTR user group, mestr...@gmail.com
★★★★ GIVE AWAY ★★★★
30 million lumens awarded for the third Stellar Build Challenge
Free monthly Stellar lumens gifts have been shared now.
Let's follow and take your bonus

Let's start now before running out of free lumens.
Now Available 17 more invite claims
This message was sent by the Stellar Development Foundation,
PO Box 411486, San Francisco, CA 94141, USA.★★★
Reply all
Reply to author
Forward
0 new messages