get_snp_ids: Get Snp IDs of the variants found in the study dataset....

Description Usage Arguments Value Examples

Description

Using the reference database/file and specifically columns chr_no, snp_pos in the db, the variants are assigned the snp_ids and NA is added to the variants not found in the database. You can use generate_new_snp_ids to get the ids of new variants foudn in your study using these conditions rows are joined between the two dataframes provided to this function

Usage

1
get_snp_ids(study_df, ref_df, out_file_path = NULL)

Arguments

ref_df

A dataframe object representing vcf file or txt file with annotation columns

data_path

A csv file path (absolute) with data about snps and stats from different studies

Value

returns a data table with all the ref. snp ids joined to each row

Examples

1
2
3
4
5
6
# combine_gwas_df <- dir_rbind("/Users/nehiljain/code/personal/genewiseR_data/raw_data/", 
# header = F,col_names = c("chr_no","snp_pos","allele","p_value"))

# ref_df <- read_tsv("~/code/personal/genewiseR_data/ref/indels.Bos_taurus.vcf", comment = "##", 
# progress = T, trim_ws = T)
# result_df <- get_snp_ids(combine_gwas_df, ref_df )

nehiljain/genewiseR documentation built on May 23, 2019, 1:31 p.m.