Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improve attribute data structure for gtf_scan #177

Open
jdcla opened this issue Sep 12, 2024 · 0 comments
Open

Improve attribute data structure for gtf_scan #177

jdcla opened this issue Sep 12, 2024 · 0 comments

Comments

@jdcla
Copy link

jdcla commented Sep 12, 2024

Currently gtf_scan returns the attribute column as a list of structs that each have two fields ('key' and 'value'). Unfortunately, this setup makes it hard to unnest this data in a tabular format. Having the data either fully unnested or in a more helpful structure would be more convenient.

For example, it might make more sense to have the attributes listed in a single struct, where the field names equal the 'key' values, making it possible to retrieve an item using polars directly ('e.g. pl.col('attributes').struct.field('gene_id')). Now, the list has to be iterated and searched for a specific key, denoting an expensive operation.

Lastly, when multiple values for a specific key (e.g. tag) are present (listed as a list ccds, basic), these are currently divided in their own struct tuple.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant