code: def get_frip(self, sample):
          
          import pandas as pd
          with open(sample.frip, "r") as handle:
              content = handle.readlines()
          reads_in_peaks = int(re.sub("\D", "", content[0]))
          mapped_reads = sample["readCount"] - sample["unaligned"]
          return pd.Series(reads_in_peaks / mapped_reads, index="FRiP")
docs: Calculates the fraction of reads in peaks for a given sample.
  
          :param pipelines.Sample sample: Sample object with "peaks" attribute.