Skip to content

Commit

Permalink
Merge pull request #15 from NelleV/doc
Browse files Browse the repository at this point in the history
Better documentation.
  • Loading branch information
NelleV committed Mar 16, 2016
2 parents 6e1ecec + 5e10d40 commit a97f508
Show file tree
Hide file tree
Showing 5 changed files with 77 additions and 2 deletions.
12 changes: 12 additions & 0 deletions CITATION
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
To reference iced in publication, please cite the following:

@Article{servant:hicpro,
Author="Servant, N. and Varoquaux, N. and Lajoie, B. R. and Viara, E.
and Chen, C. J. and Vert, J. P. and Heard, E. and Dekker, J. and
Barillot, E. ",
Title="{{H}i{C}-{P}ro: an optimized and flexible pipeline for {H}i-{C} data processing}",
Journal="Genome Biol.",
Year="2015",
Volume="16",
Pages="259"
}
16 changes: 16 additions & 0 deletions doc/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,22 @@ Contents:
:maxdepth: 2


References
==========

`HiC-Pro: an optimized and flexible pipeline for Hi-C data processing
<http://link.springer.com/article/10.1186/s13059-015-0831-x/fulltext.html>`_
\*N. Servant, N. Varoquaux, B.R. Lajoie, E. Viara, C.J. Chen, J.-P. Vert, E.
Heard, J. Dekker, E. Barillot, Genome Biology 2015

Contacts
========

If you have any questions or suggestions, please email nelle dot varoquaux at
ensmp dot fr, or open a ticket on `Github
<https://github.com/hiclib/pastis/issues>`_



Indices and tables
==================
Expand Down
6 changes: 6 additions & 0 deletions examples/utils/README.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
.. _utils_examples:

Utils
-------------

Examples concerning the :mod:`iced.utils` module.
4 changes: 2 additions & 2 deletions examples/utils/plot_extract_sample_map.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
m = ax.matshow(sub_counts, cmap="Blues", norm=colors.SymLogNorm(1),
origin="bottom",
extent=(0, len(sub_counts), 0, len(sub_counts)))
[ax.axhline(i, linewidth=1, color="#000000") for i in lengths.cumsum()]
[ax.axvline(i, linewidth=1, color="#000000") for i in lengths.cumsum()]
[ax.axhline(i, linewidth=1, color="#000000") for i in sub_lengths.cumsum()]
[ax.axvline(i, linewidth=1, color="#000000") for i in sub_lengths.cumsum()]
cb = fig.colorbar(m)
ax.set_title("Chromosomes I, IV and V of yeast")
41 changes: 41 additions & 0 deletions examples/utils/plot_intra_inter_contact_maps.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
import numpy as np
import matplotlib.pyplot as plt
from matplotlib import colors

from iced import datasets
from iced.utils import get_intra_mask
from iced.utils import get_inter_mask

"""
Extracting parts of a contact map.
This examples shows how to use a mask to plot only the inter or the intra
contact map.
"""

# Loading a sample dataset
counts, lengths = datasets.load_sample_yeast()
intra_mask = get_intra_mask(lengths)
inter_mask = get_inter_mask(lengths)

fig, axes = plt.subplots(ncols=2, figsize=(12, 6))
inter_counts = counts.copy()
inter_counts[intra_mask] = np.nan
intra_counts = counts.copy()
intra_counts[inter_mask] = np.nan

m = axes[0].matshow(intra_counts, cmap="Blues", norm=colors.SymLogNorm(1),
origin="bottom",
extent=(0, len(counts), 0, len(counts)))
m = axes[1].matshow(inter_counts, cmap="Blues", norm=colors.SymLogNorm(1),
origin="bottom",
extent=(0, len(counts), 0, len(counts)))

axes[0].set_title("Intra-chromosomal maps")
axes[1].set_title("Inter-chromosomal maps")

[axes[0].axhline(i, linewidth=1, color="#000000") for i in lengths.cumsum()]
[axes[0].axvline(i, linewidth=1, color="#000000") for i in lengths.cumsum()]
[axes[1].axhline(i, linewidth=1, color="#000000") for i in lengths.cumsum()]
[axes[1].axvline(i, linewidth=1, color="#000000") for i in lengths.cumsum()]

0 comments on commit a97f508

Please sign in to comment.