-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'baps-format' into develop
* baps-format: Increment version number to 0.0.0.9025 Skips `greedyMix()` example until #24 is fixed Updated documentation (#24) Fails for FAST input to `greedyMix()` (#24) Fixed calculation og `ninds` (#24) Bugfixes to `indMix()` and subfunctions (#24) Improved handling of BAPS format (#24) Fixed calculation of `ninds` `ekat` (#24) Added processing of BAPS format
- Loading branch information
Showing
14 changed files
with
134 additions
and
57 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
process_BAPS_data <- function(file, partitionCompare) { | ||
if (!is.null(partitionCompare)) { | ||
cat('Data:', file, '\n') | ||
} | ||
data <- read.table(file) | ||
ninds <- testaaOnkoKunnollinenBapsData(data) # for testing purposes? | ||
if (ninds == 0) { | ||
warning('Incorrect Data-file.') | ||
return(NULL) | ||
} | ||
popnames <- NULL # Dropped specification of population names (from BAPS 6) | ||
|
||
result <- handleData(data, format = "BAPS") | ||
data <- result$newData | ||
rowsFromInd <- result$rowsFromInd | ||
alleleCodes <- result$alleleCodes | ||
noalle <- result$noalle | ||
adjprior <- result$adjprior | ||
priorTerm <- result$priorTerm | ||
result <- newGetDistances(data, rowsFromInd) | ||
Z <- result$Z | ||
dist <- result$dist | ||
|
||
# Forming and saving pre-processed data | ||
processed_data <- list( | ||
data = data, | ||
rowsFromInd = rowsFromInd, | ||
alleleCodes = alleleCodes, | ||
noalle = noalle, | ||
adjprior = adjprior, | ||
priorTerm = priorTerm, | ||
dist = dist, | ||
popnames = popnames, | ||
Z = Z | ||
) | ||
return(processed_data) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Oops, something went wrong.