Skip to content

Commit

Permalink
# assigner 0.5.6 2019-05-01
Browse files Browse the repository at this point in the history
* 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
thierrygosselin committed May 1, 2019
1 parent 490f526 commit 5936459
Show file tree
Hide file tree
Showing 83 changed files with 1,395 additions and 266 deletions.
Binary file modified .DS_Store
Binary file not shown.
1 change: 1 addition & 0 deletions .Rbuildignore
Original file line number Diff line number Diff line change
Expand Up @@ -12,3 +12,4 @@
^docs$
^pkgdown$
^_pkgdown\.yml$
^\.github
5 changes: 3 additions & 2 deletions DESCRIPTION
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")),
Expand Down Expand Up @@ -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
Expand Down
10 changes: 10 additions & 0 deletions NEWS.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,13 @@
# assigner 0.5.6 2019-05-01

* 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


# assigner 0.5.5 2019-04-25

* cosmetic changes to the package: using `pkgdown`
Expand Down
13 changes: 6 additions & 7 deletions R/assignment_ngs.R
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down Expand Up @@ -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.


Expand All @@ -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))
Expand Down Expand Up @@ -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)
Expand Down Expand Up @@ -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"),
Expand Down
62 changes: 62 additions & 0 deletions R/data.R
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"
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ Status](https://travis-ci.org/thierrygosselin/assigner.svg?branch=master)](https
state and is being actively
developed.](http://www.repostatus.org/badges/latest/active.svg)](http://www.repostatus.org/#active)
[![DOI](https://zenodo.org/badge/14548/thierrygosselin/assigner.svg)](https://zenodo.org/badge/latestdoi/14548/thierrygosselin/assigner)
[![packageversion](https://img.shields.io/badge/Package%20version-0.5.5-orange.svg)](commits/master)
[![packageversion](https://img.shields.io/badge/Package%20version-0.5.6-orange.svg)](commits/master)
[![Last-changedate](https://img.shields.io/badge/last%20change-2019--05--01-brightgreen.svg)](/commits/master)
<!-- badges: end -->

Expand Down
4 changes: 4 additions & 0 deletions _pkgdown.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,13 +23,17 @@ navbar:
href: index.html
- text: Features
href: FEATURES.html
- text: Get started
href: articles/get_started.html
- text: Reference
href: reference/index.html
- text: Articles
href: articles/index.html
menu:
- text: Life cycle
href: articles/life_cycle.html
- text: Get started
href: articles/get_started.html
- text: Fst analysis
href: articles/fst_confidence_intervals.html
- text: Using whitelists in assignment
Expand Down
Binary file added data/.DS_Store
Binary file not shown.
Binary file added data/data_assigner_sim_01.rda
Binary file not shown.
Binary file added data/data_assigner_sim_02.rda
Binary file not shown.
8 changes: 7 additions & 1 deletion docs/FEATURES.html

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 7 additions & 1 deletion docs/articles/assignment.whitelists.html

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Binary file added docs/articles/assignment_loo_test4.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/articles/assignment_thl_test1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/articles/assignment_thl_test1_full_range.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/articles/assignment_thl_test2.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/articles/assignment_thl_test3.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
8 changes: 7 additions & 1 deletion docs/articles/fst_confidence_intervals.html

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit 5936459

Please sign in to comment.