Manually creating custom graphsΒΆ

[1]:
from itpseq import DataSet
import matplotlib.pyplot as plt

data = DataSet('tetracenomycin/')
data
[1]:
DataSet(data_path=PosixPath('tetracenomycin'),
        reference=Sample(noa:[1, 2, 3]),
        samples=[Sample(noa:[1, 2, 3]),
                 Sample(tcx:[1, 2, 3], ref: noa)],
        )
[2]:
tcx = data.samples['tcx']
tcx
[2]:
Sample(tcx:[1, 2, 3], ref: noa)
[3]:
# plotting a E-site vs P-site heatmap for different values of min_peptide
fig, axes = plt.subplots(ncols=5, figsize=(20, 5))

for ax, pep_size in zip(axes.flat, range(1, 6)):
    tcx.hmap('E', 'P', min_peptide=pep_size, ax=ax, vmax=1.2)
    ax.set_title(f'Minimum peptide size: {pep_size}')
plt.tight_layout()
../_images/notebooks_manual_graph_tutorial_3_0.png