Skip to content

Error in coverage: seqnames required #3

@amitjavilaventura

Description

@amitjavilaventura

Hello,

Thank you for your nice package.

I have been using megadepth for some time and I have never had a problem. Nevertheless, today I tried to compute the coverage of a bigwig file in a bed region and it gave me the following error.

Error in h(simpleError(msg, call)) : 
  error in evaluating the argument 'x' in selecting a method for function 'as.data.frame': seqnames required

Since this error was given by a custom function internally using megadepth::get_coverage(), I decided to try the example given in the megadepth vignette.

Here is my code:

library(megadepth)
example_bw <- system.file("tests", "test.bam.all.bw",
                          package = "megadepth", mustWork = TRUE
)
annotation_file <- system.file("tests", "testbw2.bed",
                               package = "megadepth", mustWork = TRUE
)
get_coverage(
  example_bw,
  op = "mean",
  annotation = annotation_file
)

And here is the error:

unsorted interval: chr10	4359156	4359188
, falling back to slower matching (doesn't affect BAM processing)
For potentially faster BigWig reading performance, please sort your argument to --annotations (BED) file via sort -k1,1 -k2,2n and re-run megadepth.
building whole annotation region map done
2 chromosomes for annotated regions read
1 chromosomes for annotated regions read, collapsed
total number of annotations in collapsed: 1
Processing /home/amitjavila/R/x86_64-pc-linux-gnu-library/4.2/megadepth/tests/test.bam.all.bw
Error in asMethod(object) : seqnames required

I don't know what can be happening.

If you can help me solve this, it would be great.

Thank you very much.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions