ABC-Enhancer-Gene-Prediction icon indicating copy to clipboard operation
ABC-Enhancer-Gene-Prediction copied to clipboard

ValueError("Error counting BAM file: count <= 0") ValueError: Error counting BAM file: count <= 0 when trying to replicate the ABC score results of K562

Open NicoleYY77 opened this issue 11 months ago • 3 comments

Hi, I'm trying to use the public data as mentioned in the supplementary file: H3K27ac-ChIP: ENCFF384ZZM and DHS: wgEncodeUwDnaseK562AlnRep1.bam, wgEncodeUwDnaseK562AlnRep2.bam. And I also change the reference file to hg19 before running snakemake -j1. image

Feature H3K27ac completed but I got error with DHS: Generating /lustre03/project/6007512/nicoley/EPI_prediction/ABCmodel/ABC-Enhancer-Gene-Prediction/results/K562_hg19/Neighborhoods/Genes.DHS.wgEncodeUwDnaseK562AlnRep1.bam.CountReads.bedgraph Counting coverage for Genes.DHS.wgEncodeUwDnaseK562AlnRep1.bam Running command: awk 'BEGIN {FS=OFS="\t"} (substr($1, length($1)) == "X" || substr($1, length($1)) == "Y") { $4 *= 2 } 1' /lustre03/project/6007512/nicoley/EPI_prediction/ABCmodel/ABC-Enhancer-Gene-Prediction/results/K562_hg19/Neighborhoods/Genes.DHS.wgEncodeUwDnaseK562AlnRep1.bam.CountReads.bedgraph > /lustre03/project/6007512/nicoley/EPI_prediction/ABCmodel/ABC-Enhancer-Gene-Prediction/results/K562_hg19/Neighborhoods/Genes.DHS.wgEncodeUwDnaseK562AlnRep1.bam.CountReads.bedgraph.tmp && mv /lustre03/project/6007512/nicoley/EPI_prediction/ABCmodel/ABC-Enhancer-Gene-Prediction/results/K562_hg19/Neighborhoods/Genes.DHS.wgEncodeUwDnaseK562AlnRep1.bam.CountReads.bedgraph.tmp /lustre03/project/6007512/nicoley/EPI_prediction/ABCmodel/ABC-Enhancer-Gene-Prediction/results/K562_hg19/Neighborhoods/Genes.DHS.wgEncodeUwDnaseK562AlnRep1.bam.CountReads.bedgraph Traceback (most recent call last): File "/lustre03/project/6007512/nicoley/EPI_prediction/ABCmodel/ABC-Enhancer-Gene-Prediction/workflow/scripts/run.neighborhoods.py", line 209, in <module> main(args) File "/lustre03/project/6007512/nicoley/EPI_prediction/ABCmodel/ABC-Enhancer-Gene-Prediction/workflow/scripts/run.neighborhoods.py", line 204, in main processCellType(args) File "/lustre03/project/6007512/nicoley/EPI_prediction/ABCmodel/ABC-Enhancer-Gene-Prediction/workflow/scripts/run.neighborhoods.py", line 171, in processCellType annotate_genes_with_features( File "/lustre03/project/6007512/nicoley/EPI_prediction/ABCmodel/ABC-Enhancer-Gene-Prediction/workflow/scripts/neighborhoods.py", line 126, in annotate_genes_with_features genes = count_features_for_bed( ^^^^^^^^^^^^^^^^^^^^^^^ File "/lustre03/project/6007512/nicoley/EPI_prediction/ABCmodel/ABC-Enhancer-Gene-Prediction/workflow/scripts/neighborhoods.py", line 512, in count_features_for_bed df = count_single_feature_for_bed( ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/lustre03/project/6007512/nicoley/EPI_prediction/ABCmodel/ABC-Enhancer-Gene-Prediction/workflow/scripts/neighborhoods.py", line 567, in count_single_feature_for_bed total_counts = count_total(feature_bam) ^^^^^^^^^^^^^^^^^^^^^^^^ File "/lustre03/project/6007512/nicoley/EPI_prediction/ABCmodel/ABC-Enhancer-Gene-Prediction/workflow/scripts/neighborhoods.py", line 703, in count_total total_counts = count_bam_mapped(infile) ^^^^^^^^^^^^^^^^^^^^^^^^ File "/lustre03/project/6007512/nicoley/EPI_prediction/ABCmodel/ABC-Enhancer-Gene-Prediction/workflow/scripts/neighborhoods.py", line 670, in count_bam_mapped raise ValueError("Error counting BAM file: count <= 0") ValueError: Error counting BAM file: count <= 0

I checked macs2_peaks.narrowPeak.sorted.averageAccessibility.Counts.bed file and it does have lots of 0 counts, I'm confused that why this happen? the examples run successfully, did I miss any steps? and how should I fix this problem? Really appreciate for any help!!

NicoleYY77 avatar Mar 18 '24 20:03 NicoleYY77