Hello again,
after installing succesfully the packages and reproducing all examples, I would like to analyze my own mutation calls.
I have a problem importing my vcf file - sorry if these are naive questions but I am really new here.
> fl=readVcf("Ac216_H69_1_A549_mutect_confident_eff.vcf", "hg19")
Error in FUN(X[[2L]], ...) : subscript out of bounds
In addition: Warning message:
In .bcfHeaderAsSimpleList(header) :
duplicate keys in header will be forced to unique rownames
> traceback()
29: lapply(X = X, FUN = FUN, ...)
28: FUN(X[[1L]], ...)
27: FUN(X[[1L]], ...)
26: lapply(elt, sapply, "[[", 2)
25: lapply(elt, sapply, "[[", 2)
24: FUN(X[[3L]], ...)
23: lapply(X = split(X, group), FUN = FUN, ...)
22: tapply(keyval, tags, function(elt) {
keys <- lapply(elt, sapply, "[[", 1)
vals0 <- lapply(elt, sapply, "[[", 2)
vals <- Map("names<-", vals0, keys)
cols <- unique(unlist(keys))
entries <- Map(function(k) as.vector(sapply(vals, "[", k)),
cols)
desc <- which("DESCRIPTION" == toupper(names(entries)))
if (1L == length(desc))
entries[[desc]] <- gsub("\"", "", entries[[desc]])
id <- which("ID" == toupper(names(entries)))
if (length(id) > 0L) {
if (any(duplicated(entries[[id]])))
warning("duplicate ID's in header will be forced to unique ",
"rownames")
df <- DataFrame(entries[-id], row.names = make.unique(entries[[id]]))
}
else {
df <- DataFrame(entries)
}
df
})
21: tapply(keyval, tags, function(elt) {
keys <- lapply(elt, sapply, "[[", 1)
vals0 <- lapply(elt, sapply, "[[", 2)
vals <- Map("names<-", vals0, keys)
cols <- unique(unlist(keys))
entries <- Map(function(k) as.vector(sapply(vals, "[", k)),
cols)
desc <- which("DESCRIPTION" == toupper(names(entries)))
if (1L == length(desc))
entries[[desc]] <- gsub("\"", "", entries[[desc]])
id <- which("ID" == toupper(names(entries)))
if (length(id) > 0L) {
if (any(duplicated(entries[[id]])))
warning("duplicate ID's in header will be forced to unique ",
"rownames")
df <- DataFrame(entries[-id], row.names = make.unique(entries[[id]]))
}
else {
df <- DataFrame(entries)
}
df
})
20: .bcfHeaderAsSimpleList(header)
19: scanBcfHeader(bf)
18: scanBcfHeader(bf)
17: (function (file, mode)
{
bf <- open(BcfFile(file, character(0), ...))
on.exit(close(bf))
scanBcfHeader(bf)
})(dots[[1L]][[1L]])
16: mapply(FUN = f, ..., SIMPLIFY = FALSE)
15: .Method(..., f = f)
14: eval(expr, envir, enclos)
13: eval(.dotsCall, env)
12: eval(.dotsCall, env)
11: standardGeneric("Map")
10: Map(function(file, mode) {
bf <- open(BcfFile(file, character(0), ...))
on.exit(close(bf))
scanBcfHeader(bf)
}, file, ...)
9: scanBcfHeader(file, ...)
8: scanBcfHeader(file, ...)
7: scanVcfHeader(file)
6: scanVcfHeader(file)
5: .scanVcfToVCF(scanVcf(file, param = param, row.names = row.names),
file, genome, param)
4: .readVcf(file, genome, param = ScanVcfParam(), row.names = row.names,
...)
3: .local(file, genome, param, ...)
2: readVcf("Ac216_H69_1_A549_mutect_confident_eff.vcf", "hg19")
1: readVcf("Ac216_H69_1_A549_mutect_confident_eff.vcf", "hg19")
Thanks for sending the file.
scanVcfHeader() was not recognizing the (relatively) new header fields 'SAMPLE' and 'PEDIGREE'.
The problem originated in Rsamtools so for the fix you'll need both Rsamtools 1.19.4 and VariantAnnotation 1.13.4.
Thanks for reporting this bug!
Valerie