.. Copyright (C) 2025 Andrea Raffo SPDX-License-Identifier: MIT Quickstart ========== StripePy is organized into a few subcommands: * `stripepy_download_help`: download a minified sample dataset suitable to quickly test StripePy. * `stripepy_call_help`: run the stripe detection algorithm and store the identified stripes in a ``.hdf5`` file. * `stripepy_view_help`: take the ``result.hdf5`` file generated by `stripepy_call_help` and extract stripes in BEDPE format. * `stripepy_plot_help`: generate various kinds of plots to inspect the stripes identified by `stripepy_call_help`. Walkthrough ----------- The following is a synthetic example of a typical run of StripePy. The steps outlined in this section assume that StripePy is running on a UNIX system. Some commands may need a bit of tweaking to run on Windows. 1) Download a sample dataset (optional) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ If you need to download the example matrix used here, you can do so by running: .. code-block:: console user@dev:/tmp$ stripepy download --name 4DNFI9GMP2J8 Feel free to use your own interaction matrix instead of ``4DNFI9GMP2J8.mcool``. Please make sure the matrix is in ``.cool``, ``.mcool``, or ``.hic`` format. A more extended description of the subcommand `stripepy_download_help` is found in `Downloading sample datasets <./downloading_sample_datasets>`. 2) Detect architectural stripes ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ The `stripepy_call_help` subcommand is the core of the analysis, designed to identify architectural stripes within contact maps. This process can be quite time-consuming, especially when working with large files. The path to your contact map file and the desired resolution are required to run the analysis. For instance, to analyse the ``4DNFI9GMP2J8.mcool`` file at a 10,000 bp resolution, you would use: .. code-block:: console user@dev:/tmp$ stripepy call 4DNFI9GMP2J8.mcool 10000 The command will output a single HDF5 file (e.g., ``4DNFI9GMP2J8.10000.hdf5``). Additional information is provided in `Detect architectural stripes <./detect_stripes>`. 3) Fetch stripes in BEDPE format ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ Stripe coordinates can be fetched from the ``.hdf5`` file using `stripepy_view_help`, as in .. code-block:: console user@dev:/tmp$ stripepy view 4DNFI9GMP2J8.10000.hdf5 > stripes.bedpe Further details can be found in `Fetch architectural stripes <./fetch_stripes>`. 4) Quickly visualize architectural stripes ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ It is often a good idea to visually inspect at least some of the stripes to make sure that the used parameters are suitable for the dataset that was given to `stripepy_call_help`. We provide a Jupyter notebook :download:`visualize_stripes_with_highlass.ipynb <../utils/visualize_stripes_with_highlass.ipynb>` to facilitate this visual inspection. The notebook expects the input file to be in ``.mcool`` format. More info available at `Visualize architectural stripes <./visualize_stripes>`. Generating plots ---------------- StripePy comes with a ``plot`` subcommand that can be used to visualize architectural stripes overlaid on top of the Hi-C matrix. `stripepy_plot_help` can also generate several graphs showing the general properties of the called stripes, see `Generating plots <./generate_plots>` for a complete overview. For instance, running .. code-block:: console user@dev:/tmp$ stripepy plot cm 4DNFI9GMP2J8.mcool 10000 /tmp/matrix_with_stripes.png --stripepy-hdf5 4DNFI9GMP2J8.10000.hdf5 --highlight-stripes will generate the following plot .. only:: not latex .. image:: assets/4DNFI9GMP2J8_chr14_34mbp-cm_plot_highlight_stripes.png .. only:: latex .. image:: assets/4DNFI9GMP2J8_chr14_34mbp-cm_plot_highlight_stripes.pdf