Skip to content

Commit

Permalink
Fixing tutorial
Browse files Browse the repository at this point in the history
  • Loading branch information
lnrekerle committed Oct 10, 2023
1 parent 6b5d3ca commit 945cebc
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion docs/tutorial.rst
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ We can then view the data using the list commands.
[('NP_09876.5', 26)]
>>> tx_dict = cohort.list_data_by_tx('NM_1234.5')
>>> sorted(tx_dict['NM_1234.5'].items())
[(VariantEffect.FRAMESHIFT_VARIANT, 1), (VariantEffect.MISSENSE_VARIANT, 1)]
[('frameshift_variant', 1), ('missense_variant', 1)]

Using the counts, we can choose and run what analyses we want.
For instance, we can partition the patients into two groups based on presence/absence of a *frameshift* variant:
Expand Down
2 changes: 1 addition & 1 deletion src/genophenocorr/model/_cohort.py
Original file line number Diff line number Diff line change
Expand Up @@ -252,7 +252,7 @@ def list_data_by_tx(self, transcript=None):
for var in self.all_variants:
for trans in var.tx_annotations:
if trans.transcript_id in var_type_dict:
var_type_dict.get(trans.transcript_id).update(trans.variant_effects)
var_type_dict.get(trans.transcript_id).update([var_eff.name for var_eff in trans.variant_effects])
too_small = []
for tx_id, var_effect_counter in var_type_dict.items():
if len(var_effect_counter) <= 1:
Expand Down

0 comments on commit 945cebc

Please sign in to comment.