This is a test version of Biostars. For the public version, visit https://www.biostars.org.
Error Message When Typing >coverageObj = getcoverage(bambedObj, mapqthres = 30) in R

Hello, When I type in the following code in R through the CODEX package,

>coverageObj = getcoverage(bambedObj, mapqthres = 30) , I received the following error message: 
Error in .io_bam(.scan_bamfile, file, reverseComplement, yieldSize(file),  : 
  seqlevels(param) not in BAM header:
    seqlevels: ‘1’
    file: /home/rabia/Desktop/BRCA/normal.bam
    index: /home/rabia/Desktop/BRCA/normal.bam.

So far, my code looks like this:

> library(CODEX)
> setwd("/home/rabia/Desktop/BRCA")
> dirPath = c("/home/rabia/Desktop/BRCA")
> bamFile = list.files(dirPath, pattern = '*.bam$')
> bamdir = file.path(dirPath, bamFile)
> sampname = as.matrix(c("sorted_aln_pe_normal", "sorted_aln_pe_tumor"))
> bedFile = file.path(dirPath, "varscan_genomic_loci.bed")
> chr = 1
> bambedObj = getbambed(bamdir = bamdir, bedFile = bedFile, sampname = sampname, projectname = "CODEX_varscan", chr)
> bamdir = bambedObj$bamdir; sampname = bambedObj$sampname
> ref = bambedObj$ref; projectname = bambedObj$projectname; chr = bambedObj$chr
> coverageObj = getcoverage(bambedObj, mapqthres = 30)
Error in .io_bam(.scan_bamfile, file, reverseComplement, yieldSize(file),  : 
  seqlevels(param) not in BAM header:
    seqlevels: ‘1’
    file: /home/rabia/Desktop/BRCA/normal.bam
    index: /home/rabia/Desktop/BRCA/normal.bam

What modifications to my R code do you recommend me to do in order to proceed further in writing the CODEX code that uses the CODEX package while resolving the error?

Thank you in advance for assisting me with this inquiry.

-Yuri

r

0 answers

No answers yet.

Log in to answer this question.