Get a list of column responding to a given characteristic.
Parameters: |
|
---|---|
Returns: | a list of column, each column represented by a tuple which first element is the column number in the alignment and second element is the list of boundaries in this column. |
Example
ali = Alignment('ALL', crm.get_alignment('ALL'),
crm.experiments, score)
ali.get_column(3)
# [(3, [>55<, ,>56<, >55<, >58<])]
# now we want boundaries with high scores
cond1 = lambda x: x['score'] > 5
# and we want boundaries to be detected in Experiments exp1 and exp2
cond2=lambda x: x['exp'] in ['exp1', 'exp2']
ali.get_column(cond1=cond1, cond2=cond2, min_num=2)
# [(33, [>268<, >192<, >-<, >-<]),
# (46, [>324<, >323<, >335<, >329<]),
# (51, [>348<, >335<, >357<, >347<]),
# (56, [>374<, >358<, >383<, >-<]),
# (64, [>397<, >396<, >407<, >-<]),
# (77, [>444<, >442<, >456<, >-<])]
Specific class of TADs, used only within Alignment objects. It is directly inheriting from python dict. a TAD these keys:
- ‘start’: position of the TAD
- ‘end’: position of the TAD
- ‘score’: of the prediction of boundary
- ‘brk’: same as ‘end’
- ‘pos’: in the alignment (column number)
- ‘exp’: Experiment this TAD belongs to
- ‘index’: of this TAD within all TADs in the Experiment
Return the probability that original alignment is better than an alignment of randomized boundaries.
Parameters: |
|
---|
Generates random TADs over a chromosome of a given size according to a given distribution of lengths of TADs.
Parameters: |
|
---|---|
Returns: | list of TADs |