Create_SNP_XGBoost_Object: Input a dataframe, generate an object for the SNP missing...

Description Usage Arguments Details Value Examples

View source: R/Create_SNP_XGBoost_Object_function.R

Description

Input a dataframe, generate an object for the SNP missing value imputation with xgboost.

Usage

1

Arguments

df

A dataframe of the SNPs which we need to impute missing values

size

A windows size which we control for our imputation. Default value is 50.

Details

This function takes in a matrix (p columns of SNPs, n rows of samples) with NAs and returns an object for our imputation function.

Value

a list of list of 2 contents:

1. NA_cols: column index with missing values

2. Multiple_SNP_Object: corresponding SNP_Objects for these SNPs

Examples

1
2
3
4
5
6
7
data("Test_df")
## This is a short matrix containing 100 SNPs with 20 samples.

xgboost_snp_obj <- Create_SNP_XGBoost_Object(Test_df)

# xgboost_snp_obj <- Create_SNP_XGBoost_Object(Test_df, size = 200)
# should return error message

GaoGN517/689_SNPFastImpute_Mac documentation built on Dec. 8, 2019, 12:33 a.m.