# Accessing fields in structure type

**URL:** <https://discuss.hail.is/t/accessing-fields-in-structure-type/316>\
**Category:** Help \[0.1\]\
**Created:** [October 12, 2017, 1:13pm UTC](https://discuss.hail.is/t/accessing-fields-in-structure-type/316 "2017-10-12T13:13:06Z")\
**Posts on this page:** 1\
**Showing post:** 2

<div class="post-metadata">

**Author:** ![tpoterba](https://yyz2.discourse-cdn.com/flex036/user_avatar/discuss.hail.is/tpoterba/32/61_2.png) [@tpoterba](https://discuss.hail.is/u/tpoterba)\
**Post date:** [October 12, 2017, 1:37pm UTC](https://discuss.hail.is/t/accessing-fields-in-structure-type/316/2 "2017-10-12T13:37:49Z")

</div>

This is a bit more complicated because it’s not just a structure, it’s an `Array[Struct{...}]`.

If you want to just select the one canonical transcript per variant, then here’s a bit of discourse on that:  
[Parsing VEP output](http://discuss.hail.is/t/parsing-vep-output/41/5)

If you wanted to remove variants where `lof` was None for every transcript, then here’s the code to do that:

```python
print(vds.filter_intervals(Interval.parse('22'))
.filter_variants_expr('va.vep.transcript_consequences.forall(tc => isMissing(tc.lof))')
.count_variants())

```

You might want to see the distribution of values for all transcripts:

```python
print(vds.filter_intervals(Interval.parse('22'))
.query_variants('variants.flatMap(v => va.vep.transcript_consequences.map(tc => tc.lof)).counter()'))

```

---

_[View the full topic](https://discuss.hail.is/t/accessing-fields-in-structure-type/316)._
