Skip to content

Commit

Permalink
fix #2 by renaming strand column that is generated as part of granges…
Browse files Browse the repository at this point in the history
… object
  • Loading branch information
RHReynolds committed Jun 9, 2021
1 parent 75c8a69 commit 60c39c0
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions R/convert_rs_to_loc.R
Original file line number Diff line number Diff line change
Expand Up @@ -91,9 +91,14 @@ convert_loc_to_rs <- function(df, dbSNP){

combined <-
df_gr %>%
dplyr::rename(SNP = RefSNP_id, CHR = seqnames, BP = pos) %>%
dplyr::rename(
SNP = RefSNP_id,
CHR = seqnames,
BP = pos,
# Rename strand column just in case this is a column in the inputted df
gr_strand = strand) %>%
dplyr::right_join(df, by = c("CHR", "BP")) %>%
dplyr::select(-strand, -alleles_as_ambig)
dplyr::select(-gr_strand, -alleles_as_ambig)

return(combined)

Expand Down

0 comments on commit 60c39c0

Please sign in to comment.