Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error in coverage: seqnames required #3

Open
amitjavilaventura opened this issue Oct 11, 2022 · 3 comments
Open

Error in coverage: seqnames required #3

amitjavilaventura opened this issue Oct 11, 2022 · 3 comments

Comments

@amitjavilaventura
Copy link

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.

@lcolladotor
Copy link
Member

Hi!

Thanks for your interest in our software.

Thanks for the PR / issue. A close family of mine was diagnosed with cancer, so my availability is limited right now.

It might take me a few weeks to reply properly.

Best,
Leo

@amitjavilaventura
Copy link
Author

amitjavilaventura commented Oct 18, 2022 via email

@lcolladotor
Copy link
Member

Can you look at this @dzhang32? Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants