-
Notifications
You must be signed in to change notification settings - Fork 0
feat: added cauris mutations #21
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
base: main
Are you sure you want to change the base?
Conversation
df_input[["type", "locus_tag", "mutation_name"]] = df_input["BCSQ"].str.split( | ||
|
||
# split on comma to separate multiple entries on single line | ||
df_input['BCSQ'] = df_input['BCSQ'].str.split(",") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sometimes bcftools csq outputs multiple aa changes on a single line, separated by a comma. This is now accounted for
# Get number of columns. Ususally 7 or 9 with the second to last containing aa mutation | ||
# This differs per reference | ||
nr_col = df_input_long["BCSQ"].str.split("|", expand=True).shape[1] | ||
aa_mutation_col = nr_col -2 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Assumption: aa mutation is listed in second to last column. This holds true for both reference genome annotations we use, but should be checked when implementing new reference genome annotations
@@ -190,7 +204,7 @@ def filter_for_known_mutations( | |||
Dataframe with only known mutations | |||
""" | |||
df_known_mutations = df_resistance_with_impact_renamed[ | |||
df_resistance_with_impact_renamed["impact"].notnull() | |||
df_resistance_with_impact_renamed["impact"].notnull() | df_resistance_with_impact_renamed["drug"].notnull() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Also output a mutations as "known" if only the drug column has info, but impact column is empty
No description provided.