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

modify clinvar star assignment for no interpretation variants #139

Merged
merged 2 commits into from
Aug 22, 2023
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next Next commit
modify clinvar star assignment for no interpretation variants
  • Loading branch information
rjcorb committed Aug 22, 2023
commit de0390acced5c38a81c93d2ef0b035827d658365
4 changes: 2 additions & 2 deletions AutoGVP/01-annotate_variants_CAVATICA_input.R
Original file line number Diff line number Diff line change
Expand Up @@ -160,7 +160,7 @@ clinvar_anno_vcf_df <- clinvar_anno_vcf_df %>%
str_detect(INFO, "CLNREVSTAT\\=reviewed_by_expert_panel") ~ "3",
str_detect(INFO, "CLNREVSTAT\\=practice_guideline") ~ "4",
str_detect(INFO, "CLNREVSTAT\\=criteria_provided,_conflicting_interpretations") ~ "1NR",
str_detect(INFO, "no_assertion") ~ "0",
str_detect(INFO, "no_assertion|no_interpretation") ~ "0",
TRUE ~ NA_character_
),
## extract the calls and put in own column
Expand Down Expand Up @@ -419,7 +419,7 @@ master_tab <- master_tab %>%
evidenceBP = coalesce(as.double(evidenceBP.x, evidenceBP.y)),
Intervar_evidence = coalesce(`InterVar: InterVar and Evidence.x`, `InterVar: InterVar and Evidence.y`),
# replace second final call with the second one because we did not use interVar results
final_call.x = if_else(Stars == "0", final_call.y, final_call.x)
final_call.x = if_else(Stars == "0" | is.na(Stars), final_call.y, final_call.x)
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

good catch!

)

## combine final calls into one choosing the appropriate final call
Expand Down
4 changes: 2 additions & 2 deletions AutoGVP/01-annotate_variants_custom_input.R
Original file line number Diff line number Diff line change
Expand Up @@ -172,7 +172,7 @@ clinvar_anno_vcf_df <- vroom(input_clinVar_file, comment = "#", delim = "\t", co
str_detect(INFO, "CLNREVSTAT\\=reviewed_by_expert_panel") ~ "3",
str_detect(INFO, "CLNREVSTAT\\=practice_guideline") ~ "4",
str_detect(INFO, "CLNREVSTAT\\=criteria_provided,_conflicting_interpretations") ~ "1NR",
str_detect(INFO, "no_assertion") ~ "0",
str_detect(INFO, "no_assertion|no_interpretation") ~ "0",
TRUE ~ NA_character_
),
## extract the calls and put in own column
Expand Down Expand Up @@ -434,7 +434,7 @@ master_tab <- master_tab %>%
Intervar_evidence = coalesce(`InterVar: InterVar and Evidence.x`, `InterVar: InterVar and Evidence.y`),

# replace second final call with the first one because we did not use clinvar results
final_call.x = if_else(Stars == "0", final_call.y, final_call.x),
final_call.x = if_else(Stars == "0" | is.na(Stars), final_call.y, final_call.x),
)

## combine final calls into one choosing the appropriate final call
Expand Down
Loading