Copy Number Detection with ExomeDepth.. parsing error of bam file
1
0
Entering edit mode
10.4 years ago
younhee.ko ▴ 10

Hello,

I am trying to use ExomeDepth tool for copy number analysis.

I have used the tophat in order to align my paired-end ngs data and got the accepted_hits.bam file. Here is the exact command I have used. (I refer the Differential gene and transcript expression analysis of RNA-seq experiment with TopHat and Cufflinks tool , nature protocol paper).

tophat -G gene.gtf -o patient1_thout --no-novel-juncs genome xxx_1.fq xxxx_2.fq

(In the genome.fa and genes.gtf files, chromosome is marked as "chr1" instead of 1.

This command return the xxx_accepted_hits.bam file into the patient1_thout directory..

To analyze the CNV, I have used the following command.

my.counts <- getBamCounts(bed.frame=exons.hg19, bam.file="xxx_accpeted_hits.bam", include.chr=TRUE)

then, I got the following error.

Error in value[[3L]](cond) :
  failed to open BamFile: failed to load BAM index
  file: xxxx_accepted_hits.bam
In addition: Warning message:
In doTryCatch(return(expr), name, parentenv, handler) :
  [bam_index_load] fail to load BAM index.

If I remove the include.chr option, which means that it is set as "FALSE". then, I can successfully run the command..

However, my object read counts would be equal to 0 over all ranges.. which is wrong.

I am not sure how can I fix it. Could you please someone help me?

Exome-Depth Copy-Number • 2.9k views
ADD COMMENT
1
Entering edit mode
10.4 years ago
User6891 ▴ 330

Maybe you should try to index your .bam file using samtools:

samtools index xxxx_accepted_hits.bam

The result should be a .bai file. You should place both .bam & .bai files in the same folder.

ADD COMMENT

Login before adding your answer.

Traffic: 2303 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