From 6d5db63a3c426879f058d19c90272ff2c470431f Mon Sep 17 00:00:00 2001 From: Thierry Gosselin Date: Sat, 12 Mar 2016 23:36:11 +1300 Subject: [PATCH] edits --- R/assignment_ngs.R | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/R/assignment_ngs.R b/R/assignment_ngs.R index c2974cd..dc2d774 100644 --- a/R/assignment_ngs.R +++ b/R/assignment_ngs.R @@ -528,7 +528,9 @@ assignment_ngs <- function(data, as_data_frame() %>% rename(LOCUS = ID, CHROM = `#CHROM`) %>% mutate( - CHROM = stri_replace_all_fixed(CHROM, pattern = "un", replacement = "1") + CHROM = stri_replace_all_fixed(CHROM, pattern = "un", replacement = "1"), + POS = as.character(POS), + LOCUS = as.character(LOCUS) ) # Filter with whitelist of markers @@ -636,7 +638,9 @@ assignment_ngs <- function(data, select = tped.header.integer, col.names = tped.header.names, showProgress = TRUE, - data.table = FALSE) + data.table = FALSE) %>% + as_data_frame() %>% + mutate(LOCUS = as.character(LOCUS)) # Filter with whitelist of markers if (!is.null(whitelist.markers)) { @@ -784,7 +788,8 @@ assignment_ngs <- function(data, as_data_frame() %>% select(-Cnt) %>% rename(LOCUS = `Catalog ID`) %>% - tidyr::gather(INDIVIDUALS, GT, -LOCUS) + tidyr::gather(INDIVIDUALS, GT, -LOCUS) %>% + mutate(LOCUS = as.character(LOCUS)) # Filter with whitelist of markers if (!is.null(whitelist.markers)) {