Skip to content

Commit

Permalink
Merge branch 'master' of https://github.com/steverozen/ICAMS
Browse files Browse the repository at this point in the history
  • Loading branch information
steverozen committed Jul 18, 2019
2 parents 46fdc5a + e23a3c2 commit 4cd31ad
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions R/VCF_to_catalog_functions.R
Expand Up @@ -243,7 +243,7 @@ ReadMutectVCF <- function(file) {
#'
#' @export
GetMutectVAF <-function(vcf) {
stopifnot(class(vcf) == "data.frame")
stopifnot("data.frame" %in% class(vcf))
if (!any(grepl("/1", unlist(vcf[1, ])))) {
stop("vcf does not appear to be a Mutect VCF, please check the data")
}
Expand All @@ -269,9 +269,9 @@ GetMutectVAF <-function(vcf) {
}

if (all(type1 %in% unlist(strsplit(vcf$FORMAT[1], ":")))) {
return(GetVAFs(type1, vcf$FORMAT, vcf[, 10]))
return(GetVAFs(type1, vcf$FORMAT, vcf[[10]]))
} else if (all(type2 %in% unlist(strsplit(vcf$FORMAT[1], ":")))) {
return(GetVAFs(type2, vcf$FORMAT, vcf[, 10]))
return(GetVAFs(type2, vcf$FORMAT, vcf[[10]]))
}
}

Expand Down Expand Up @@ -529,7 +529,7 @@ MakeVCFDBSdf <- function(DBS.range.df, SBS.vcf.dt) {
#'
#' @keywords internal
SplitStrelkaSBSVCF <- function(vcf.df, max.vaf.diff = 0.02) {
stopifnot(class(vcf.df) == "data.frame")
stopifnot("data.frame" %in% class(vcf.df))

# Record the total number of input variants for later sanity checking.
num.in <- nrow(vcf.df)
Expand Down

0 comments on commit 4cd31ad

Please sign in to comment.