predict_suretype: Run classification model using combination of Random Forest...

Description Usage Arguments Value Examples

View source: R/predict_suretype.R

Description

Cascade classification model with Random Forest in the first layer and Gaussian Discriminant Analysis in the second layer. This function analyzes the whole dataset comprised in .data in one batch. To minimize bias in the model, it is recommended to run suretype_model(.) and build a model per sample basic instead of the whole dataset.

Usage

1
predict_suretype(.data, rf_clf)

Arguments

.data

Input dataframe coming from scbasic() or compatible

rf_clf

Instance of classifier loaded using scload currently embodied in RF

Value

data frame decorated with SureTypeSC genotyping score

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
setwd(system.file(package='SureTypeSCR'))
samplesheet=system.file('files/GSE19247_example.csv',package='SureTypeSCR')
manifest=system.file('files/HumanCytoSNP-12v2_H.bpm',package='SureTypeSCR')
cluster=system.file('files/HumanCytoSNP-12v2_H.egt',package='SureTypeSCR')
clf=system.file('files/rf.clf',package='SureTypeSCR')


#Load data
df=scbasic(manifest,cluster,samplesheet)

# The Random Forest classifier
clf_instance <- scload(clf) 

#assign prediction results back to the original dataframe using margittr %<>% operator
#df %<>% predict_suretype(clf_instance) 

Meiomap/SureTypeSCR documentation built on Dec. 17, 2021, 3:22 a.m.