-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* included 2 simulated datasets * updated documentation of `assignment_ngs` * vignette to get started with assigner, finally! * this is really starting to smell like a CRAN release * work on travis CI * work on pkgdown
- Loading branch information
1 parent
490f526
commit 5936459
Showing
83 changed files
with
1,395 additions
and
266 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -12,3 +12,4 @@ | |
^docs$ | ||
^pkgdown$ | ||
^_pkgdown\.yml$ | ||
^\.github |
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 |
---|---|---|
@@ -1,8 +1,8 @@ | ||
Package: assigner | ||
Type: Package | ||
Title: Assignment Analysis with RADseq Data | ||
Version: 0.5.5 | ||
Date: 2019-04-25 | ||
Version: 0.5.6 | ||
Date: 2019-05-01 | ||
Encoding: UTF-8 | ||
Authors@R: c( | ||
person("Thierry", "Gosselin", email = "[email protected]", role = c("aut", "cre")), | ||
|
@@ -40,6 +40,7 @@ Remotes: | |
github::thierrygosselin/radiator | ||
License: GPL (>=2) | ||
LazyLoad: yes | ||
LazyData: true | ||
VignetteBuilder: knitr | ||
RoxygenNote: 6.1.1 | ||
URL: http://thierrygosselin.github.io/assigner/, https://github.com/thierrygosselin/assigner | ||
|
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 |
---|---|---|
|
@@ -256,6 +256,8 @@ | |
# Return ------------------------ ---------------------------------------------- | ||
#' @return Depending on arguments selected, several folders and files are written: | ||
#' \enumerate{ | ||
#' \item \code{01_radiator_tidy_genomic} this is the result of importing the data | ||
#' with radiator import module \href{https://thierrygosselin.github.io/radiator/reference/tidy_genomic_data.html}{tidy_genomic_data}. | ||
#' \item \code{[email protected]}: For reproducibility, | ||
#' the function call, arguments and values used along the default arguments. | ||
#' \item \code{assignment.plot.pdf}: The assignment figure. | ||
|
@@ -306,7 +308,7 @@ | |
#' is used, for the iteration. | ||
#' } | ||
#' The output in your global environment is a list. To view the assignment results | ||
#' \code{$assignment} to view the ggplot2 figure \code{$plot.assignment}. | ||
#' \code{$assignment} to view the ggplot2 figure \code{$assignment.plot}. | ||
#' See example below. | ||
|
||
|
||
|
@@ -327,7 +329,7 @@ | |
#' assignment <- assignment.treefrog$assignment | ||
#' | ||
#' # To plot the assignment using ggplot2 and facet | ||
#' fig <- assignment.treefrog$plot.assignment | ||
#' fig <- assignment.treefrog$assignment.plot | ||
#' | ||
#' # To view the full range of y values = Assignment success(%): | ||
#' fig + ggplot2::scale_y_continuous(limits = c(0,100)) | ||
|
@@ -604,7 +606,7 @@ assignment_ngs <- function( | |
res.list$assignment <- res | ||
|
||
# Assignment plot ------------------------------------------------------------ | ||
res.list$plot.assignment <- plot_assignment(x = res, path.folder = directory) | ||
res.list$assignment.plot <- plot_assignment(x = res, path.folder = directory) | ||
|
||
# Return results -------------------------------------------------------------------- | ||
return(res.list) | ||
|
@@ -657,10 +659,7 @@ generate_subsamples <- function( | |
) | ||
|
||
# keep track of subsampling individuals and write to directory | ||
if (is.null(subsample)) { | ||
message("Subsampling: not selected") | ||
} else { | ||
message("Subsampling: selected") | ||
if (!is.null(subsample)) { | ||
readr::write_tsv( | ||
x = dplyr::bind_rows(subsample.list), | ||
path = file.path(path.folder, "subsampling_individuals.tsv"), | ||
|
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,62 @@ | ||
#' Simulated dataset to test assigner | ||
#' | ||
#' A dataset of genotypes containing 500 bi-allelic SNPs, simulated | ||
#' for 250 individuals, 5 populations. | ||
#' | ||
#' @format A tibble with 125000 rows (genotypes) and 4 variables: | ||
#' \describe{ | ||
#' \item{MARKERS}{SNPs markers} | ||
#' \item{POP_ID}{Populations/strata for the samples} | ||
#' \item{INDIVIDUALS}{Samples id)} | ||
#' \item{GT}{Genotypes coded \emph{a la genepop} format} | ||
#' } | ||
#' @details | ||
#' Dataset simulation caracteristics: | ||
#' \itemize{ | ||
#' \item num.pops: 5 | ||
#' \item num.loci: 1000 | ||
#' \item div.time: 25e3 | ||
#' \item ne: 200 | ||
#' \item nm: 0.5 | ||
#' \item theta: 0.2 | ||
#' \item mig.type: island | ||
#' \item mut.rate: 2.5e-4 | ||
#' \item mig.rate: 0.0025 | ||
#' } | ||
#' From this simulated dataset, 500 SNPs and 250 individuals (50 ind/pop) were | ||
#' randomly selected. | ||
#' @source The data was simulated with grur | ||
#' \url{https://thierrygosselin.github.io/grur/reference/simulate_rad.html} | ||
|
||
"data_assigner_sim_01" | ||
|
||
#' Simulated dataset to test assigner | ||
#' | ||
#' A dataset of genotypes containing 500 bi-allelic SNPs, simulated | ||
#' for 250 individuals, 5 populations. | ||
#' | ||
#' @format A tibble with 125000 rows (genotypes) and 4 variables: | ||
#' \describe{ | ||
#' \item{MARKERS}{SNPs markers} | ||
#' \item{POP_ID}{Populations/strata for the samples} | ||
#' \item{INDIVIDUALS}{Samples id} | ||
#' \item{GT}{Genotypes coded \emph{a la genepop} format} | ||
#' } | ||
#' @details | ||
#' Dataset simulation caracteristics: | ||
#' \itemize{ | ||
#' \item num.pops: 5 | ||
#' \item num.loci: 1000 | ||
#' \item div.time: 25e3 | ||
#' \item ne: 200 | ||
#' \item nm: 0.5 | ||
#' \item theta: 0.2 | ||
#' \item mig.type: island | ||
#' \item mut.rate: 2.5e-4 | ||
#' \item mig.rate: 0.0025 | ||
#' } | ||
#' From this simulated dataset, 500 SNPs and 250 individuals (50 ind/pop) were | ||
#' randomly selected. | ||
#' @source The data was simulated with grur | ||
#' \url{https://thierrygosselin.github.io/grur/reference/simulate_rad.html} | ||
"data_assigner_sim_02" |
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
Binary file not shown.
Binary file not shown.
Binary file not shown.
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.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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.