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 when running the script of GRangesList(NU=NUMT$MT$NU$1[[1]], MT=NUMT$MT$MT$1[[1]]) #10

Open
FL512 opened this issue Aug 9, 2023 · 2 comments

Comments

@FL512
Copy link

FL512 commented Aug 9, 2023

Hi, thank you again for providing the link for numts.txt, which I have asked as an issue on June 29th.
Thanks to your kind instruction, I was able to download it and all commands ran well with your test dataset stored in extdata folder (chr1_numt_pe_HS25.sv.vcf).

Thus, I tried to analyze my vcf files of interest, but I got stuck.
My question today might be overlapped with previous comments #6 (Obtaining Known NuMTs for hg38 #6) but let me ask you again.

What I did was three things.

  1. Prepared hg38 coordinate of numtS.txt by myself and run with BSgenome.Hsapiens.UCSC.hg38.
  2. Stay with hg19 coordinate. To do so, I did a LiftOver against all my vcf files.
  3. Just in case, I have removed chr from my vcf since your vcf file does not have a prefix "chr".

Here are the details of aforementioned 1 - 3.

  1. My vcf was hg38, so I prepared a reference numts.txt for hg38 coordinate and read it.
    numtS <- read_table(system.file("extdata", "numtS_hg38.txt", package = "svaNUMT"), col_names = FALSE)
    Everything was ok before GRangeList.
    Unfortunately, this command gave an error.
    GRangesList(NU=NUMT$MT$NU$`1`[[1]], MT=NUMT$MT$MT$`1`[[1]])
    Error in FUN(X[[i]], ...) :
    no method or default for coercing “NULL” to “GRanges”

  2. As I mentioned above, I got the error in GRangesList. Thus, I decided to LiftOver all my vcf files and run with the default settings, which is to use numtS.txt and BSgenome.Hsapiens.UCSC.hg19.
    However, I got a same error when running the command of GRangesList.
    Error in FUN(X[[i]], ...) :
    no method or default for coercing “NULL” to “GRanges”

  3. I know this is a silly idea, but I wanted to make sure one thing. Your vcf file does not have a prefix "chr". Hence, I decided to remove by using a shell script as I shown below.
    cat {my vcf file} | sed -e 's/^chr//g' > {my vcf file_new}
    Unfortunately, nothing has changed, no luck.
    When I ran the code of GRangeList, I always get a same error.

What is wrong with my vcf?
It was annotated by gridss though.
Any kind of comments should be helpful.
Thank you!

@jackieduckie
Copy link
Contributor

Hi there, no method or default for coercing “NULL” to “GRanges” would indicate that your NUMT$MT$NU$1 or NUMT$MT$MT$1 is empty. If you are sure that there are NUMTs in the GRanges, probably start by checking the seqnames formats and if system.file("extdata", "numtS_hg38.txt", package = "svaNUMT") is valid. The seqname prefix can be converted with GenomeInfoDb::seqlevelsStyle().

@FL512
Copy link
Author

FL512 commented Aug 9, 2023

Thank you for your response and giving me an opportunity to step back to think about this error.
Actually, I realized that one script before GRangesList is the problem.
When I run with your test vcf file, I only see one warning message as I shown below.
NUMT <- numtDetect(gr, numtS, genomeMT, max_ins_dist = 20)
There is no MT sequence from known NUMT events detected.

With my vcf files, I get three warnings.
There is no NUMT event detected. Check whether 'chrM' or 'MT' is present in the VCF.
There is no MT sequence from known NUMT events detected.
There is no NUMT event detected satisfying the min.Align score.

I know chrM or MT is presented in my vcf.
Just in case, I gave it a try to use:
seqlevelsStyle(gr) <- "NCBI"
seqlevelsStyle<-`(GRanges(numtS), "UCSC")
and so on to see if I can solve this problem.
Unfortunately, I have still encountered the same error.

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