generate_new_snp_ids: Get new snp ids for snps not found in ref db.

Description Usage Arguments Value Examples

Description

The function takes in the data frame after attaching snp ids from the ref. using get_snp_ids(). The function computes the length of missing snp_name. It assumes

Usage

1
generate_new_snp_ids(study_df, prefix_str = "dal_snp")

Arguments

prefix_str

a chacracter value used as prefix to numerical index of the snps, default is 'dal_snp'

study_dfthe

study dataframe/data.table

Value

a datatable with all missing snp ids changed to dal_snp1, dal_snp2,.... The column with the ids is snp_id

Examples

1
2
3
4
5
6
7
8
9
# combine_gwas_df <- dir_rbind("../genewiseR_data/raw_data/",
#header = F,col_names = c("chr","pos","allele","p_value"))

#ref_df <- read_tsv("../genewiseR_data/ref/indels.Bos_taurus.vcf", 
#comment = "##", progress = T, trim_ws = T, col_types = "cicccnnc")

#result_df <- get_snp_ids(combine_gwas_df, ref_df, out_file_path = "../genewiseR_data/tmp.tsv" )

#with_ids_dt <- generate_new_snp_ids(result_df)

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