This is a test version of Biostars. For the public version, visit https://www.biostars.org.
bamCoverage --MNase error : function a paired end library is required.

HI,

I have an ATAC bam generated by 10X CellRanger ARC which was further processed to get the read mapped in proper pair as follows;

samtools view -b -f 0X2 -@40 Cellranger_output/sorted.atac.noscafoold.bam > test.bam

Then I run bamCoverage with --MNase option as follows;

bamCoverage -b test.bam \  -bs 1 \  --MNase \  
-b  blacklist/blacklist.bam \  
--effectiveGenomeSize 2913022398 \ 
 --exactScaling \  
-e \  
-p 20 \  
-of "bigwig" \  -o sorted.atac.noscafoold.bam.mod.bigwig

And I run into this error;

 *Error*: For the --MNAse function a paired end library is required.

Blacklist.bam was generated as follows;

bedToBam -i ENCFF356LFX.merged.mod.bed -g ../gencode/GRCh38.primary_assembly.genome.fa.fai > test.bam

What am I missing ?

deeptools

1 answer

Well in this example, this appears off:

-b blacklist/blacklist.bam \

I wouldn't expect a blacklist to be in bam format, and if you are trying to supply a blacklist, you should supply it as -bl or --blackListFileName

The -e flag seems unnecessary when using the --MNase flag, but I'm not sure it would cause any problem.

As rfran010 pointed out, I screwed up the script big tme. The right one is as follows;

bamCoverage \ 
-b Cellranger_output/sorted.atac.noscafoold.bam \  
--bs1 \  
--MNase \  
--blackListFileName  blacklist/ENCFF356LFX.merged.bed\  
--effectiveGenomeSize 2913022398 \  
--exactScaling \  
-e \  
-p 20 \
 -of "bigwig" \  -o sorted.atac.noscafoold.bam.mod.bigwig

This run is completed just fine;

bamFilesList: ['Cellranger_output/sorted.atac.noscafoold.bam'] 
binLength: 1 
numberOfSamples: None 
blackListFileName: ['blacklist/ENCFF356LFX.merged.bed'] 
skipZeroOverZero: False bed_and_bin: 
False genomeChunkSize: 
None defaultFragmentLength: 147 
numberOfProcessors: 20 
verbose: 
False region: 
None bedFile: 
None minMappingQuality: 
None ignoreDuplicates: 
False chrsToSkip: [] 
stepSize: 1 
center_read: 
False samFlag_include: None 
samFlag_exclude: None 
minFragmentLength: 130 
maxFragmentLength: 200 
zerosToNans: False 
smoothLength: None 
save_data: False 
out_file_for_raw_data: None 
maxPairedFragmentLength: 200

Log in to answer this question.