Question: Error Message When Typing >coverageObj = getcoverage(bambedObj, mapqthres = 30) in R
0
gravatar for ybonilla81
18 months ago by
ybonilla810
ybonilla810 wrote:

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 • 561 views
ADD COMMENTlink modified 18 months ago by Devon Ryan86k • written 18 months ago by ybonilla810
Please log in to add an answer.

Help
Access

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.
Powered by Biostar version 2.3.0
Traffic: 1168 users visited in the last hour