suretype_model: Create model and perform classification with RF-GDA in one...

Description Usage Arguments Value Examples

View source: R/suretype_model.R

Description

Function is almost always used with in connection with group_by(invidiual) and nest() to create a classification model per group (typically one individual)

Usage

1
suretype_model(df,individual, clf,.sclist=NULL)))

Arguments

df

Basic dataframe with precalculated M and A features

individual

sample name to be classified

clf

path to the classifier - currently support for Random Forest

.sclist

samples to be processed stored in list(), default is NULL

meaning all samples in df will be classified

Value

returns data frame with two columns corresponding to the classification results: rfgda_score and rf_score, while rfgda_score is score calculated by cascade RF-GDA algorithm and rf_score is score calculated by RF.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
  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")
  
  #df_model = df %>%
  #calculate_ma() %>%
  #group_by(individual) %>%
  #nest() %>%
  #mutate(model=map(data , function(df) suretype_model(df,individual, clf,.sclist=list('gsm477563')))

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