Improved documentation
This commit is contained in:
parent
d2fb3bf90a
commit
b2d1b830cd
1 changed files with 15 additions and 15 deletions
|
|
@ -46,12 +46,12 @@ greedyMix <- function(
|
||||||
} else {
|
} else {
|
||||||
input_type_name <- paste0(format, "-format")
|
input_type_name <- paste0(format, "-format")
|
||||||
}
|
}
|
||||||
# ----------------------------------------------------------------------
|
|
||||||
# Treating BAPS-formatted files
|
|
||||||
# ----------------------------------------------------------------------
|
|
||||||
if (length(input_type_name) == 0) {
|
if (length(input_type_name) == 0) {
|
||||||
stop('Invalid alternative')
|
stop('Invalid alternative')
|
||||||
} else if (input_type_name == 'BAPS-format') {
|
} else if (input_type_name == 'BAPS-format') {
|
||||||
|
# ------------------------------------------------------------------
|
||||||
|
# Treating BAPS-formatted files
|
||||||
|
# ------------------------------------------------------------------
|
||||||
if (!is(tietue, "character")) {
|
if (!is(tietue, "character")) {
|
||||||
pathname_filename <- uigetfile(
|
pathname_filename <- uigetfile(
|
||||||
"*.txt", "Load data in BAPS-format"
|
"*.txt", "Load data in BAPS-format"
|
||||||
|
|
@ -65,7 +65,7 @@ greedyMix <- function(
|
||||||
# fprintf(1,'Data: %s\n',[pathname filename]);
|
# fprintf(1,'Data: %s\n',[pathname filename]);
|
||||||
# end
|
# end
|
||||||
|
|
||||||
data <- read.delim(pathname_filename) # ASK: what is the delimiter?
|
data <- read.delim(pathname_filename) # TODO: discover delimiter
|
||||||
ninds <- testaaOnkoKunnollinenBapsData(data) # testing
|
ninds <- testaaOnkoKunnollinenBapsData(data) # testing
|
||||||
if (ninds == 0) stop('Incorrect Data-file')
|
if (ninds == 0) stop('Incorrect Data-file')
|
||||||
|
|
||||||
|
|
@ -128,10 +128,10 @@ greedyMix <- function(
|
||||||
save(c, file = kokonimi)
|
save(c, file = kokonimi)
|
||||||
rm(c)
|
rm(c)
|
||||||
}
|
}
|
||||||
# ----------------------------------------------------------------------
|
|
||||||
# Treating GenePop-formatted files
|
|
||||||
# ----------------------------------------------------------------------
|
|
||||||
} else if (input_type_name == 'GenePop-format') {
|
} else if (input_type_name == 'GenePop-format') {
|
||||||
|
# ------------------------------------------------------------------
|
||||||
|
# Treating GenePop-formatted files
|
||||||
|
# ------------------------------------------------------------------
|
||||||
if (!is(tietue, "character")) {
|
if (!is(tietue, "character")) {
|
||||||
filename_pathname <- uigetfile(
|
filename_pathname <- uigetfile(
|
||||||
filter = '*.txt',
|
filter = '*.txt',
|
||||||
|
|
@ -181,10 +181,10 @@ greedyMix <- function(
|
||||||
save(c, file = kokonimi)
|
save(c, file = kokonimi)
|
||||||
rm(c)
|
rm(c)
|
||||||
}
|
}
|
||||||
# ----------------------------------------------------------------------
|
|
||||||
# Handling Pre-processed data
|
|
||||||
# ----------------------------------------------------------------------
|
|
||||||
} else if (input_type_name == 'Preprocessed data') {
|
} else if (input_type_name == 'Preprocessed data') {
|
||||||
|
# ------------------------------------------------------------------
|
||||||
|
# Handling Pre-processed data
|
||||||
|
# ------------------------------------------------------------------
|
||||||
file_in <- uigetfile(
|
file_in <- uigetfile(
|
||||||
filter = '*.txt',
|
filter = '*.txt',
|
||||||
title = 'Load pre-processed data in GenePop-format'
|
title = 'Load pre-processed data in GenePop-format'
|
||||||
|
|
@ -285,9 +285,9 @@ greedyMix <- function(
|
||||||
|
|
||||||
# ASK remove (graphical part)?
|
# ASK remove (graphical part)?
|
||||||
# if (fixedK) {
|
# if (fixedK) {
|
||||||
# #logml_npops_partitionSummary <- indMix_fixK(c) # TODO translate?
|
# #logml_npops_partitionSummary <- indMix_fixK(c) # ASK translate?
|
||||||
# } else {
|
# } else {
|
||||||
# #logml_npops_partitionSummary <- indMix(c) # TODO translate?
|
# #logml_npops_partitionSummary <- indMix(c) # ASK translate?
|
||||||
# }
|
# }
|
||||||
# if (logml_npops_partitionSummary$logml == 1) return()
|
# if (logml_npops_partitionSummary$logml == 1) return()
|
||||||
|
|
||||||
|
|
@ -303,7 +303,7 @@ greedyMix <- function(
|
||||||
# popnames, fixedK
|
# popnames, fixedK
|
||||||
# ) # TODO translate
|
# ) # TODO translate
|
||||||
|
|
||||||
# viewMixPartition(PARTITION, popnames) # TODO translate function
|
# viewMixPartition(PARTITION, popnames) # ASK translate? On graph folder
|
||||||
|
|
||||||
talle <- questdlg(
|
talle <- questdlg(
|
||||||
quest = paste(
|
quest = paste(
|
||||||
|
|
@ -316,7 +316,7 @@ greedyMix <- function(
|
||||||
if (talle %in% c('Yes', 'y')) {
|
if (talle %in% c('Yes', 'y')) {
|
||||||
filename_pathname <- uiputfile('.mat','Save results as')
|
filename_pathname <- uiputfile('.mat','Save results as')
|
||||||
|
|
||||||
# ==========================================================================
|
# ======================================================================
|
||||||
cond <- (sum(filename_pathname$name) == 0) |
|
cond <- (sum(filename_pathname$name) == 0) |
|
||||||
(sum(filename_pathname$path) == 0)
|
(sum(filename_pathname$path) == 0)
|
||||||
if (cond) {
|
if (cond) {
|
||||||
|
|
@ -334,7 +334,7 @@ greedyMix <- function(
|
||||||
file.remove('baps4_output.baps')
|
file.remove('baps4_output.baps')
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
# ==========================================================================
|
# ======================================================================
|
||||||
|
|
||||||
c$PARTITION <- PARTITION
|
c$PARTITION <- PARTITION
|
||||||
c$COUNTS <- COUNTS
|
c$COUNTS <- COUNTS
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue