Skip to content

Commit

Permalink
export_vcf, but still not exported
Browse files Browse the repository at this point in the history
  • Loading branch information
dcgerard committed Aug 4, 2023
1 parent 8ebb5f6 commit 89d5fd0
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions R/multidog.R
Original file line number Diff line number Diff line change
Expand Up @@ -690,6 +690,9 @@ export_vcf <- function(obj, filename) {
requireNamespace("S4Vectors", quietly = TRUE) &&
requireNamespace("IRanges", quietly = TRUE)) {

## Get sample neames
indvec <- colnames(format_multidog(x = obj, varname = "postmean"))

ploidy <- unique(obj$snpdf$ploidy)
stopifnot(length(ploidy) == 1)
obj$inddf$alt <- obj$inddf$size - obj$inddf$ref
Expand Down Expand Up @@ -738,11 +741,11 @@ export_vcf <- function(obj, filename) {
strand=NULL,
seqinfo = NULL,
names = obj$snpdf$snp),
colData = as(matrix(nrow = nind, ncol = 0), "DataFrame"),
colData = DataFrame(row.names = indvec),
exptData = list(
header = VariantAnnotation::VCFHeader(
reference = character(),
samples = character(),
samples = indvec,
header = IRanges::DataFrameList(
fileformat = S4Vectors::DataFrame(row.names = "fileformat", Value = "VCFv4.3"),
fileDate = S4Vectors::DataFrame(row.names = "fileDate", Value = gsub("-", "", Sys.Date())),
Expand Down Expand Up @@ -777,4 +780,3 @@ export_vcf <- function(obj, filename) {
" \"GenomicRanges\", \"S4Vectors\", \"IRanges\"))\n"))
}
}

0 comments on commit 89d5fd0

Please sign in to comment.