Skip to content

Commit

Permalink
# radiator 1.3.3 2024-05-15
Browse files Browse the repository at this point in the history
* Fix issue #188 related to coverage in DArT 1row and 2rows format
  • Loading branch information
thierrygosselin committed May 15, 2024
1 parent ab919f4 commit a2d63d5
Show file tree
Hide file tree
Showing 224 changed files with 936 additions and 912 deletions.
4 changes: 2 additions & 2 deletions DESCRIPTION
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
Package: radiator
Type: Package
Title: RADseq Data Exploration, Manipulation and Visualization using R
Version: 1.3.2
Date: 2024-04-30
Version: 1.3.3
Date: 2024-05-15
Encoding: UTF-8
Authors@R: c(
person("Thierry", "Gosselin", email = "thierrygosselin@icloud.com", role = c("aut", "cre")),
Expand Down
7 changes: 7 additions & 0 deletions NEWS.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,10 @@
# radiator 1.3.3 2024-05-15

* Fix issue #188 related to coverage in DArT 1row and 2rows format




# radiator 1.3.2 2024-04-30

* works with R 4.3.4
Expand Down
40 changes: 23 additions & 17 deletions R/gds.R
Original file line number Diff line number Diff line change
Expand Up @@ -971,7 +971,7 @@ extract_genotypes_metadata <- function(
#' baddly generated. It will say you have Read and allele Depth info, but you don't.
#' Default: \code{stacks.haplo.check = FALSE}.
#' @param dart.check (optional, logical) DArT have different reporting for coverage
#' information.
#' information. Will no longer report the average coverage stats from 1 and 2-rows DArT format.
#' Default: \code{dart.check = FALSE}.
# @keywords internal
#' @export
Expand Down Expand Up @@ -1000,15 +1000,21 @@ check_coverage <- function(gds, genotypes.metadata.check = FALSE, stacks.haplo.c
# DArT count and 1 and 2 rows have different information...
if (dart.check && "dart" %in% data.source) {
if (any(c("2rows", "1row") %in% data.source)) {
got.coverage <- extract_markers_metadata(
gds,
markers.meta.select = c("AVG_COUNT_REF", "AVG_COUNT_SNP"),
whitelist = TRUE
)
if (!is.null(got.coverage)) {
got.coverage <- c("AVG_COUNT_REF", "AVG_COUNT_SNP")
return(got.coverage)
}
# got.coverage <- extract_markers_metadata(
# gds,
# markers.meta.select = c("AVG_COUNT_REF", "AVG_COUNT_SNP"),
# whitelist = TRUE
# )
# if (!is.null(got.coverage)) {
# got.coverage <- c("AVG_COUNT_REF", "AVG_COUNT_SNP")
# return(got.coverage)
# }
message("Coverage statistics information for 2rows and 1row DArT format is ignored")
message("\nradiator cannot generate coverage statistics from source\npotential blacklisted individuals bias the statistics generated by DArT")
message("\nrequest DArT count format from DArT")

got.coverage <- NULL
return(got.coverage)
}#End DART 1row and 2 rows
}

Expand Down Expand Up @@ -2162,7 +2168,7 @@ generate_stats <- function(
# subsample = variant.select
# exhaustive = FALSE
# force.stats = TRUE
# # path.folder = NULL
# path.folder = NULL
# plot = TRUE
# digits = 6
# # file.date = NULL
Expand Down Expand Up @@ -2562,7 +2568,7 @@ generate_stats <- function(
}

if (individuals) {
# changing the margin doesnt work with seqarray, the GDS needs to be optimized by sample
# changing the margin doesn't work with seqarray, the GDS needs to be optimized by sample
# this operation is very costly in both time and disk space.
# faster to do matrix calculations by rows and sums
# Note to myself: the huge speed gain by using other packages robustbse, Rfast, etc.
Expand Down Expand Up @@ -2791,11 +2797,11 @@ generate_stats <- function(
# NOTE TO MYSELF need to work on including that one with DArT files...--------
#DArT 1 row and 2rows --------------------------------------------------------
# if ("dart" %in% data.source && any(c("2rows", "1row") %in% data.source)) {
# depth <- extract_markers_metadata(
# gds,
# markers.meta.select = c("AVG_COUNT_REF", "AVG_COUNT_SNP"),
# whitelist = TRUE
# )
# depth <- extract_markers_metadata(
# gds,
# markers.meta.select = c("AVG_COUNT_REF", "AVG_COUNT_SNP"),
# whitelist = TRUE
# )
# markers <- ind <- FALSE
#
# if (is.null(depth)) return(NULL)
Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@
[![Project Status: Active – The project has reached a stable, usable
state and is being actively
developed.](http://www.repostatus.org/badges/latest/active.svg)](http://www.repostatus.org/#active)
[![packageversion](https://img.shields.io/badge/Package%20version-1.3.2-orange.svg)](commits/master)
[![Last-changedate](https://img.shields.io/badge/last%20change-2024--04--30-brightgreen.svg)](/commits/master)
[![packageversion](https://img.shields.io/badge/Package%20version-1.3.3-orange.svg)](commits/master)
[![Last-changedate](https://img.shields.io/badge/last%20change-2024--05--15-brightgreen.svg)](/commits/master)
[![R-CMD-check](https://github.com/thierrygosselin/radiator/workflows/R-CMD-check/badge.svg)](https://github.com/thierrygosselin/radiator/actions)
[![DOI](https://zenodo.org/badge/DOI/10.5281/zenodo.3687060.svg)](https://doi.org/10.5281/zenodo.3687060)
<!-- badges: end -->
Expand Down
6 changes: 3 additions & 3 deletions docs/404.html

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

6 changes: 3 additions & 3 deletions docs/LICENSE.html

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

8 changes: 4 additions & 4 deletions docs/articles/get_started.html

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

Loading

0 comments on commit a2d63d5

Please sign in to comment.