iced.utils.extract_sub_contact_map

iced.utils.extract_sub_contact_map(counts, lengths, chromosomes)

Extract the contact map associated to a given list of chromosome

Parameters:

counts : ndarray (n, n)

lengths : ndarray (L, )

chromosomes : list of ids

Returns:

sub_counts, sub_lengths : (ndarray, ndarray)

Examples

>>> from iced import datasets
>>> from iced.utils import extract_sub_contact_map
>>> counts, lengths = datasets.load_sample_yeast()
>>> scounts, slengths = extract_sub_contact_map(counts, lengths, [0, 2])
>>> print len(counts), len(scounts)
... 
350 56