This is a test version of Biostars. For the public version, visit https://www.biostars.org.
Error running getBamCounts from ExomeDepth

Hi all, I have a problem when running Exomedepth when executing getBamCounts:

> require(ExomeDepth) 

> data(exons.hg19) 

> options(stringsAsFactors=FALSE)

> bamlist = read.table('bam.list')$V1 

> counts = getBamCounts(bed.frame = exons.hg19, bam.files = bamlist)

The output error is:

Error in as.vector(x, mode) :
  '.SigArgs' is shorter than '.SigLength' says it should be

> sessionInfo()

R version 3.3.2 (2016-10-31)
Platform: x86_64-pc-linux-gnu (64-bit)
Running under: Ubuntu 14.04.5 LTS

locale:
 [1] LC_CTYPE=en_US.UTF-8       LC_NUMERIC=C
 [3] LC_TIME=en_US.UTF-8        LC_COLLATE=en_US.UTF-8
 [5] LC_MONETARY=en_US.UTF-8    LC_MESSAGES=en_US.UTF-8
 [7] LC_PAPER=en_US.UTF-8       LC_NAME=C
 [9] LC_ADDRESS=C               LC_TELEPHONE=C
[11] LC_MEASUREMENT=en_US.UTF-8 LC_IDENTIFICATION=C

attached base packages:
[1] stats     graphics  grDevices utils     datasets  methods   base

other attached packages:
[1] ExomeDepth_1.1.10 optparse_1.3.2

loaded via a namespace (and not attached):
 [1] lattice_0.20-24            IRanges_2.8.1
 [3] Rsamtools_1.26.1           Biostrings_2.42.0
 [5] bitops_1.0-6               GenomicAlignments_1.10.0
 [7] grid_3.3.2                 GenomeInfoDb_1.10.1
 [9] stats4_3.3.2               zlibbioc_1.20.0
[11] XVector_0.14.0             getopt_1.20.0
[13] S4Vectors_0.12.0           Matrix_1.1-2
[15] aod_1.3                    BiocParallel_1.8.1
[17] tools_3.3.2                Biobase_2.34.0
[19] parallel_3.3.2             BiocGenerics_0.20.0
[21] GenomicRanges_1.26.1       SummarizedExperiment_1.4.0
exomedepth r cnv

Could you print the bamlist variable?

The bamlist variable looks like this

str(bamlist)
chr [1:23] "file1.bam" "file2.bam" "file3.bam"

The vignette says that bam.files argument has to be "character, list of BAM files to extract read count data from". I have also tried using a list, but it still not working.

Is the chromosome notation in your bam files the same as in exons.hg19?

Both bam files have the chromosome notation without 'chr', e.g. "1", "2"...

And you bamfiles are indexed, i.e. file1.bam.bai?

(If this doesn't explain it I have no idea what's wrong)

Yes, they are indexed in the same dir than the bam files are located as fileX.bam.bai

Well I'm out of ideas, you could try traceback() after getting the error to trace the error. Besides that, perhaps your best guess is contacting the author of the package.

The traceback() output is:

17: as.vector(x, mode)

16: as.vector(x, mode = "integer")

15: .local(x, ...)

14: as.integer(seqnames(x))

13: as.integer(seqnames(x))

12: get_out_of_bound_index(x)

11: valid.GenomicRanges.seqinfo(x, suggest.trim = TRUE)

10: valid.func(object)

9: validityMethod(as(object, superClass))

8: anyStrings(validityMethod(as(object, superClass)))

7: validObject(.Object)

6: initialize(value, ...)

5: initialize(value, ...)

4: new(Class, seqnames = seqnames, ranges = ranges, strand = strand, elementMetadata = mcols, seqinfo = seqinfo)

3: new_GRanges("GRanges", seqnames = seqnames, ranges = ranges, strand = strand, mcols = mcols, seqlengths = seqlengths, seqinfo = seqinfo)

2: GenomicRanges::GRanges(seqnames = bed.frame$seqnames, IRanges::IRanges(start = bed.frame$start + 1, end = bed.frame$end))

1: getBamCounts(bed.frame = exons.hg19, bam.files = bamlist)

Anyway, I am contacting the author of the package. Thanks for replying.

Well I am not sure. Definitely something to do with the chromosome names, as it's a seqnames pbm. What reference genome did you use exactly?

0 answers

No answers yet.

Log in to answer this question.