Question: ChIPQC gives Bam file has 297 contigs Error: subscript contains out-of-bounds indices
1
gravatar for star
6 months ago by
star10
star10 wrote:

I like to use ChIPqc packages, so I used output of Bowtie2 (after deduplicating using Picards) as Bam file and used narrowPeak file as output of MACS2, but I faced with below Error.

sample = ChIPQCsample("align-path/undup_uniqu_SRR5339509_ENCSR890NXD_control_2.bam", peaks="peak path/GSM2534593_SRR5339509_H3K4me1_narrow_peaks.narrowPeak")

Bam file has 297 contigs
Error: subscript contains out-of-bounds indices
chipqc qc chip-seq • 151 views
ADD COMMENTlink modified 8 days ago by zhenfeng.liu110 • written 6 months ago by star10

I am running into the same error. Did you figure out the cause of the error?

ADD REPLYlink written 8 days ago by zhenfeng.liu110
Answer: ChIPQC gives Bam file has 297 contigs Error: subscript contains out-of-bounds in
0
gravatar for zhenfeng.liu1
8 days ago by
zhenfeng.liu110 wrote:

After some research, I think I've found the cause of this bug. In ChIPQC:::sampleQC function, there is code to check for read length with the first 1000 reads of the first chromosome. Code follows:

if (k == 1) {
    tocheckforreads <- 1000
    readlength = round(mean(width(temp[1:tocheckforreads])))

However, often the first chromosome is ChrM, a very small one. When there are less than 1000 reads on the first chromosome, this will throw a out-of-bounds error. This should a easy fix in the code. To get around this without changing the code, you can specify the chromosomes to check in ChIPQCsample, and not include ChrM.

ADD COMMENTlink written 8 days ago by zhenfeng.liu110
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 16.09
Traffic: 160 users visited in the last hour