Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion DESCRIPTION
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Package: BIGr
Title: Breeding Insight Genomics Functions for Polyploid and Diploid Species
Version: 0.7.0
Version: 0.8.0
Authors@R: c(person(given='Alexander M.',
family='Sandercock',
email='sandercock.alex@gmail.com',
Expand Down
11 changes: 9 additions & 2 deletions R/updog2vcf.R
Original file line number Diff line number Diff line change
Expand Up @@ -126,9 +126,16 @@ updog2vcf <- function(multidog.object, output.file, updog_version = NULL, RefAlt

#CHROM and POS from SNP ID
new_df <- mout$snpdf %>%
separate(snp, into = c("CHROM", "POS"), sep = "_") %>%
extract(
snp,
into = c("CHROM", "POS"),
regex = "^(.*)_([^_]*)$"
) %>%
Comment on lines +129 to +133
mutate(
POS = sub("^0+", "", POS),
POS = if_else(POS == "", "0", POS)
) %>%
Comment on lines +134 to +137
select(CHROM, POS)
new_df$POS <- sub("^0+", "", new_df$POS)

#Make the VCF df
vcf_df <- data.frame(
Expand Down