Skip to content

Commit

Permalink
# radiator v.0.0.15 2018-08-17
Browse files Browse the repository at this point in the history
* `genomic_converter`, `tidy_genomic_data`: bug fix when individuals are integers
* `fis_summary`: arguments updated
  • Loading branch information
thierrygosselin committed Aug 18, 2018
1 parent 710bdb0 commit 148bc67
Show file tree
Hide file tree
Showing 8 changed files with 28 additions and 53 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: 0.0.14
Date: 2018-08-04
Version: 0.0.15
Date: 2018-08-17
Encoding: UTF-8
Authors@R: c(
person("Thierry", "Gosselin", email = "[email protected]", role = c("aut", "cre")),
Expand Down
6 changes: 6 additions & 0 deletions NEWS.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
# radiator v.0.0.15 2018-08-17

* `genomic_converter`, `tidy_genomic_data`: bug fix when individuals are integers
* `fis_summary`: arguments updated


# radiator v.0.0.14 2018-08-04

* `filter_dart` and `filter_rad`: can now opt out of HWE filtering.
Expand Down
13 changes: 2 additions & 11 deletions R/summary.R
Original file line number Diff line number Diff line change
Expand Up @@ -389,14 +389,9 @@ fis_summary <- function(
vcf.metadata = TRUE,
whitelist.markers = NULL,
monomorphic.out = TRUE,
blacklist.genotype = NULL,
snp.ld = NULL,
common.markers = TRUE,
maf.thresholds = NULL,
maf.pop.num.threshold = 1,
maf.approach = "SNP",
maf.operator = "OR",
max.marker = NULL,
blacklist.id = NULL,
pop.levels = NULL,
pop.labels = NULL,
Expand All @@ -419,21 +414,17 @@ fis_summary <- function(
data = data,
vcf.metadata = TRUE,
blacklist.id = blacklist.id,
blacklist.genotype = blacklist.genotype,
whitelist.markers = whitelist.markers,
monomorphic.out = monomorphic.out,
max.marker = max.marker,
snp.ld = snp.ld,
common.markers = common.markers,
maf.thresholds = maf.thresholds,
maf.pop.num.threshold = maf.pop.num.threshold,
maf.approach = maf.approach,
maf.operator = maf.operator,
strata = strata,
pop.levels = pop.levels,
pop.labels = pop.labels,
pop.select = pop.select,
filename = NULL
filename = NULL,
verbose = FALSE
)
)

Expand Down
6 changes: 5 additions & 1 deletion R/tidy_genomic_data.R
Original file line number Diff line number Diff line change
Expand Up @@ -456,11 +456,15 @@ tidy_genomic_data <- function(
# Import blacklist id --------------------------------------------------------
if (!is.null(blacklist.id)) {# With blacklist of ID
if (is.vector(blacklist.id)) {
suppressMessages(blacklist.id <- readr::read_tsv(blacklist.id, col_names = TRUE))
suppressMessages(blacklist.id <- readr::read_tsv(
blacklist.id,
col_names = TRUE,
col_types = readr::cols(.default = readr::col_character())))
} else {
if (!tibble::has_name(blacklist.id, "INDIVIDUALS")) {
stop("Blacklist of individuals should have 1 column named: INDIVIDUALS")
}
blacklist.id <- dplyr::mutate_all(.tbl = blacklist.id, .funs = as.character)
}
# not for plink file, where it's done after.
# see plink section to understand
Expand Down
7 changes: 6 additions & 1 deletion R/tidy_vcf.R
Original file line number Diff line number Diff line change
Expand Up @@ -251,11 +251,15 @@ See this file for the list and count: duplicated.markers.tsv\n\n")
# Import blacklist id --------------------------------------------------------
if (!is.null(blacklist.id)) {# With blacklist of ID
if (is.vector(blacklist.id)) {
suppressMessages(blacklist.id <- readr::read_tsv(blacklist.id, col_names = TRUE))
suppressMessages(blacklist.id <- readr::read_tsv(
blacklist.id,
col_names = TRUE,
col_types = readr::cols(.default = readr::col_character())))
} else {
if (!tibble::has_name(blacklist.id, "INDIVIDUALS")) {
stop("Blacklist of individuals should have 1 column named: INDIVIDUALS")
}
blacklist.id <- dplyr::mutate_all(.tbl = blacklist.id, .funs = as.character)
}
blacklist.id$INDIVIDUALS <- radiator::clean_ind_names(blacklist.id$INDIVIDUALS)

Expand Down Expand Up @@ -877,6 +881,7 @@ strata_vcf <- function(strata, input, blacklist.id) {
))
} else {
strata.df <- strata
strata.df <- dplyr::mutate_all(.tbl = strata.df, .funs = as.character)
}
}

Expand Down
2 changes: 1 addition & 1 deletion R/write_vcf.R
Original file line number Diff line number Diff line change
Expand Up @@ -178,7 +178,7 @@ write_vcf <- function(data, pop.info = FALSE, filename = NULL) {
readr::write_delim(x = tibble::data_frame(file.date), path = filename, delim = " ", append = TRUE, col_names = FALSE)

# Source ---------------------------------------------------------------------
readr::write_delim(x = tibble::data_frame(stringi::stri_join("##source=radiator_v.", utils::packageVersion("radiator"))), path = filename, delim = " ", append = TRUE, col_names = FALSE)
readr::write_delim(x = tibble::data_frame(stringi::stri_join("##source=radiator_v.", as.character(utils::packageVersion("radiator")))), path = filename, delim = " ", append = TRUE, col_names = FALSE)

# Info field 1 ---------------------------------------------------------------
info1 <- as.data.frame('##INFO=<ID=NS,Number=1,Type=Integer,Description=\"Number of Samples With Data\">')
Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@ 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/radiator.svg)](https://zenodo.org/badge/latestdoi/14548/thierrygosselin/radiator)

[![packageversion](https://img.shields.io/badge/Package%20version-0.0.14-orange.svg)](commits/master)
[![Last-changedate](https://img.shields.io/badge/last%20change-2018--08--04-brightgreen.svg)](/commits/master)
[![packageversion](https://img.shields.io/badge/Package%20version-0.0.15-orange.svg)](commits/master)
[![Last-changedate](https://img.shields.io/badge/last%20change-2018--08--17-brightgreen.svg)](/commits/master)

------------------------------------------------------------------------

Expand Down
39 changes: 4 additions & 35 deletions man/fis_summary.Rd

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

0 comments on commit 148bc67

Please sign in to comment.