This is a test version of Biostars. For the public version, visit https://www.biostars.org.
IDR on blacklisted region-filtered narrowPeak

Hi guys,

I am having a problem performing IDR on my blacklist region-filtered file.

After I called my narrow peaks using MACS2, I used bedtools to filter the blacklisted regions from my narrowPeak file. I then used IDR these filtered files to get the IDR scores and peaks. However, whenever I run my idr code, it gives me an error message:

UnicodeDecodeError: 'utf-8' codec can't decode byte 0x8b in position 1: invalid start byte

I think there is something wrong with the filtered files, since using unfiltered files as my IDR input gives me exactly what I expected.

This is my code for getting rid of the blacklisted region:

for i in Sample*.narrowPeak
do
  bedtools intersect -v -a ${i} -b mm10.blacklist.bed.gz | gzip > filtered_${i}
done

Thanks!

chip-seq atac-seq idr

1 answer

It seems you are trying to input a gzipped file to a software that doesn't accept it. Why do't you try:

  bedtools intersect -v -a ${i} -b mm10.blacklist.bed.gz > filtered_${i}

Thank you so much! This fixed it. Cheers!

Log in to answer this question.