xchrom.tl.ism_norm

xchrom.tl.ism_norm(peak_ism, peak_bed, fasta_file, seq_len)[source]

Normalized the ISM scores for the four nucleotides at each position such that they summed to zero

Parameters:
  • peak_ism (np.ndarray) – ISM matrix, shape (n_peaks, n_cells, seq_len, 4)

  • peak_bed (str) – Path to BED file containing peak coordinates

  • fasta_file (str) – Path to genome FASTA file

  • seq_len (int) – Sequence length, default 1344

Returns:

  • np.ndarray – Normalized ISM matrix, shape (n_peaks, n_cells, seq_len, 4)

  • list – List of peak coordinates

Examples

>>> ism_norm, seqs_coords = ism_norm(peak_ism, peak_bed, fasta_file, seq_len)
>>> print(f"Normalized ISM matrix shape: {ism_norm.shape}")
>>> print(f"Peak coordinates: {seqs_coords}")