def _reads_in_peaks(bam_file, peaks_file, sample):
    """Calculate number of reads in peaks"""
    if not peaks_file:
        return {}
    rip = number_of_mapped_reads(sample, bam_file, bed_file = peaks_file)
    return {"metrics": {"RiP": rip}}
def _reads_in_peaks ( bam_file , peaks_file , sample ) : if not peaks_file : return { } rip = number_of_mapped_reads ( sample , bam_file , bed_file = peaks_file ) return { "metrics" : { "RiP" : rip } }
Calculate number of reads in peaks