broadinstitute / oncotator

Other
67 stars 32 forks source link

New 1000genome_db datasource in Jan262015 corpus crashes VCF output renderer #291

Closed alexramos closed 9 years ago

alexramos commented 9 years ago
2015-02-07 13:14:59,399 ERROR [oncotator.output.VcfOutputRenderer:214] Traceback (most recent call last):
  File "/Users/aramos/repos/oncotator/venv/lib/python2.7/site-packages/Oncotator-1.5.0.0-py2.7.egg/oncotator/output/VcfOutputRenderer.py", line 206, in _renderSortedTsv
    recordBuilder = self._parseRecordBuilder(m, recordBuilder, dataManager, inferGenotypes)
  File "/Users/aramos/repos/oncotator/venv/lib/python2.7/site-packages/Oncotator-1.5.0.0-py2.7.egg/oncotator/output/VcfOutputRenderer.py", line 268, in _parseRecordBuilder
    recordBuilder.addInfo(sampleName, ID, num, dataType, val, isSplit)
  File "/Users/aramos/repos/oncotator/venv/lib/python2.7/site-packages/Oncotator-1.5.0.0-py2.7.egg/oncotator/output/RecordBuilder.py", line 292, in addInfo
    val = self._map(MutUtils.str2bool, self._fixVal(val, isSplit))  # convert the value to boolean
  File "/Users/aramos/repos/oncotator/venv/lib/python2.7/site-packages/Oncotator-1.5.0.0-py2.7.egg/oncotator/output/RecordBuilder.py", line 98, in _map
    return [func(v) if v not in bad else None for v in iterable]
  File "/Users/aramos/repos/oncotator/venv/lib/python2.7/site-packages/Oncotator-1.5.0.0-py2.7.egg/oncotator/utils/MutUtils.py", line 195, in str2bool
    return v.lower() in ("yes", "true", "t", "1", "y")
AttributeError: 'NoneType' object has no attribute 'lower'
alexramos commented 9 years ago

This is happening because the new 1000g phase3 datasource has a new INFO field "IMPRECISE" that is of type 'Flag'. It seems that the vcf flag type is not handled properly by RecordBuilder.py