Error Message When Typing >coverageObj = getcoverage(bambedObj, mapqthres = 30) in R
0
0
Entering edit mode
6.9 years ago
ybonilla81 • 0

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 • 1.6k views
ADD COMMENT

Login before adding your answer.

Traffic: 2260 users visited in the last hour
Help About
FAQ
Access RSS
API
Stats

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6