Skip to content

Commit

Permalink
radiator 1.2.9 2024-01-25
Browse files Browse the repository at this point in the history
Bug fix stemming from genalex files and genind conversion
  • Loading branch information
thierrygosselin committed Jan 25, 2024
1 parent d2442e5 commit c92cc45
Show file tree
Hide file tree
Showing 227 changed files with 643 additions and 598 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.2.8
Date: 2023-04-03
Version: 1.2.9
Date: 2024-01-25
Encoding: UTF-8
Authors@R: c(
person("Thierry", "Gosselin", email = "[email protected]", role = c("aut", "cre")),
Expand Down
5 changes: 5 additions & 0 deletions NEWS.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
# radiator 1.2.9 2024-01-25

* Bug fix stemming from genalex files and genind conversion


# radiator 1.2.8 2023-04-03

* Several bug fix while reading VCF from ipyrad
Expand Down
22 changes: 22 additions & 0 deletions R/gds.R
Original file line number Diff line number Diff line change
Expand Up @@ -115,6 +115,28 @@ radiator_gds <- function(

# check <- markers.meta$MARKERS
# generate all the markers metadata


# test <- markers.meta %>%
# dplyr::distinct(MARKERS, .keep_all = TRUE) %>%
# separate_markers(
# data = .,
# sep = "__",
# markers.meta.all.only = TRUE,
# biallelic = TRUE,
# verbose = verbose)

# data.bk <- data
# data <- data.bk
# data <- markers.meta %>%
# dplyr::distinct(MARKERS, .keep_all = TRUE)
# sep = "__"
# markers.meta.all.only = TRUE
# markers.meta.lists.only = FALSE
# biallelic = TRUE
# generate.ref.alt = FALSE
# parallel.core = parallel::detectCores() - 1

markers.meta %<>%
dplyr::distinct(MARKERS, .keep_all = TRUE) %>%
separate_markers(
Expand Down
10 changes: 2 additions & 8 deletions R/genind.R
Original file line number Diff line number Diff line change
Expand Up @@ -141,12 +141,6 @@ tidy_genind <- function(
alt.alleles %<>% dplyr::filter(REF == "ALT") %$% MARKERS_ALLELES
if (length(alt.alleles) != n.snp) rlang::abort("Contact author problem with tidying the genind")

# test1 <- tibble::as_tibble(t(data@tab), rownames = "MARKERS") %>%
# dplyr::filter(MARKERS %in% alt.alleles) %>%
# dplyr::arrange(MARKERS)
# test2 <- tibble::as_tibble(t(data@tab[, alt.alleles]), rownames = "MARKERS") %>% dplyr::arrange(MARKERS)
# test3 <- tibble::as_tibble(t(data@tab[, seq(2, length(markers.meta), by = 2)]), rownames = "MARKERS") %>% dplyr::arrange(MARKERS)

data <- tibble::as_tibble(t(data@tab), rownames = "MARKERS") %>%
dplyr::filter(MARKERS %in% alt.alleles) %>%
dplyr::mutate(
Expand Down Expand Up @@ -174,12 +168,12 @@ tidy_genind <- function(

data <- radiator::rad_long(
x = data,
cols = "MARKERS",
cols = c("MARKERS", "VARIANT_ID"),
names_to = "INDIVIDUALS",
values_to = "GT_BIN"
) %>%
dplyr::left_join(strata, by = "INDIVIDUALS") %>%
dplyr::left_join(markers.meta, by = "MARKERS") %>%
dplyr::left_join(markers.meta, by = c("MARKERS", "VARIANT_ID")) %>%
dplyr::mutate(
INDIVIDUALS = radiator::clean_ind_names(INDIVIDUALS),
STRATA = radiator::clean_pop_names(STRATA)
Expand Down
3 changes: 2 additions & 1 deletion R/utils.R
Original file line number Diff line number Diff line change
Expand Up @@ -367,7 +367,8 @@ generate_markers_metadata <- function(
}

if (!tibble::has_name(markers.meta, "POS")) {
markers.meta %<>% dplyr::mutate(CHROM = rep(1L, n.markers))
# markers.meta %<>% dplyr::mutate(CHROM = rep(1L, n.markers)) # error 20240125?
markers.meta %<>% dplyr::mutate(POS = MARKERS)
if (verbose) message("POS info missing: dataset filled with MARKERS column")
}

Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ state and is being actively
developed.](http://www.repostatus.org/badges/latest/active.svg)](http://www.repostatus.org/#active)
[![minimal R
version](https://img.shields.io/badge/R%3E%3D-NA-6666ff.svg)](https://cran.r-project.org/)
[![packageversion](https://img.shields.io/badge/Package%20version-1.2.8-orange.svg)](commits/master)
[![Last-changedate](https://img.shields.io/badge/last%20change-2023--04--03-brightgreen.svg)](/commits/master)
[![packageversion](https://img.shields.io/badge/Package%20version-1.2.9-orange.svg)](commits/master)
[![Last-changedate](https://img.shields.io/badge/last%20change-2024--01--25-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
2 changes: 1 addition & 1 deletion docs/404.html

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

40 changes: 20 additions & 20 deletions docs/LICENSE.html

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

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

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

2 changes: 1 addition & 1 deletion docs/articles/index.html

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

4 changes: 2 additions & 2 deletions docs/articles/life_cycle.html

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

Loading

0 comments on commit c92cc45

Please sign in to comment.