Added process_GenePop_data()
This commit is contained in:
parent
036ec00bbd
commit
00605016d6
1 changed files with 24 additions and 0 deletions
24
R/process_GenePop_data.R
Normal file
24
R/process_GenePop_data.R
Normal file
|
|
@ -0,0 +1,24 @@
|
|||
process_GenePop_data <- function(filename) {
|
||||
# Pre-processing GenePop data
|
||||
kunnossa <- testaaGenePopData(filename)
|
||||
data_popnames <- lueGenePopData(filename)
|
||||
data <- data_popnames$data
|
||||
popnames <- data_popnames$popnames
|
||||
|
||||
# Processing GenePop data
|
||||
c <- handleData(data, "genepop")
|
||||
Z_dist <- newGetDistances(c$newData, c$rowsFromInd)
|
||||
|
||||
# Forming and returning pre-processed data
|
||||
list(
|
||||
"data" = c$newData,
|
||||
"rowsFromInd" = c$rowsFromInd,
|
||||
"alleleCodes" = c$alleleCodes,
|
||||
"noalle" = c$noalle,
|
||||
"adjprior" = c$adjprior,
|
||||
"priorTerm" = c$priorTerm,
|
||||
"dist" = Z_dist$dist,
|
||||
"popnames" = popnames,
|
||||
"Z" = Z_dist$Z
|
||||
)
|
||||
}
|
||||
Loading…
Add table
Reference in a new issue