library(knitr) opts_chunk$set(fig.width = 12)
library(DCLEAR) library(phangorn) #library(parallel)
This vignettes illustrate how our team prepared a submission for subchallenge 3.
The 'csv_file' is a file path of evaluation for subchallenge 3 given from the competition. Change the like with the one you would like to predict.
csv_file <- 'Data/subC3/SubC3_10K_0001_mutation_table.csv' \dontrun{x <- read.table(csv_file, header = T, sep = ',', colClasses = "character")}
Initical state is '0', interval dropout is '-', point dropout is '' (point dropout was '' from the file, but we will replace it with ''), and mutational outcome states are 'A' to 'Z'.
\dontrun{states <- c('0', '-', '*', LETTERS)}
Read file and save it as 'phyDat' object.
\dontrun{tip_names <- x[, 1]} \dontrun{x <- x[,-1]} \dontrun{rownames(x) <- tip_names} \dontrun{x[ x == '' ] = '*' ## specified * as point dropout (point missing)} \dontrun{x = as.matrix(x)} \dontrun{x <- x %>% phyDat(type = 'USER', levels = states)} \dontrun{states2num = 1:length(states)} \dontrun{names(states2num) = states}
We tried weighted hamming I and II with large number of parameter combinations, and found weighted hamming I with weight below worked fairly well.
InfoW = 1:5 InfoW[1] = 1 ## Score InfoW[2] = .9 InfoW[3] = .4 InfoW[4:26] = 3
\dontrun{aTree2 <- x %>% dist_weighted_hamming(InfoW, FALSE) %>% fastme.ols()} \dontrun{write.tree(aTree2, "Kwak_Gongsub3_submission.nw")}
Thanks!
Any scripts or data that you put into this service are public.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.