This might be a rare situation, but I think there might be a bug here. We have a VCF where a given variant's position is 1. Within the Feature, it seems to get parsed into 0-based, meaning feature.get('start') should return zero.
This falls into:
get(field: string): any {
return field === 'samples'
? this.variant.SAMPLES
: this.data[field] || this.variant[field]
}
This might be a rare situation, but I think there might be a bug here. We have a VCF where a given variant's position is 1. Within the Feature, it seems to get parsed into 0-based, meaning feature.get('start') should return zero.
This falls into:
https://github.com/GMOD/jbrowse-components/blob/b71dc3d862d4078e93c3d3331c90e37e48d51f3b/plugins/variants/src/VcfFeature/index.ts#L46
while this.data['start'] is zero, it falls back into this.variant[field], which is undefined.
The result is that the downstream code attempting to calculate width here: https://github.com/GMOD/jbrowse-components/blob/b71dc3d862d4078e93c3d3331c90e37e48d51f3b/plugins/svg/src/SvgFeatureRenderer/components/util.ts#L137.
I can side-step this, but wanted to report the potential bug