crested.tl.modisco.create_pattern_matrix#
- crested.tl.modisco.create_pattern_matrix(classes, all_patterns, normalize=False, pattern_parameter='seqlet_count')#
Create a pattern matrix from classes and patterns, with optional normalization.
- Parameters:
all_patterns (
dict
[str
,dict
[str
,str
|list
[float
]]]) – dictionary containing pattern data.normalize (
bool
(default:False
)) – Flag to indicate whether to normalize the rows of the matrix.pattern_parameter (
str
(default:'seqlet_count'
)) – Parameter which is used to indicate the pattern’s importance. Either average contribution score (‘contrib’), or number of pattern instances (‘seqlet_count’, default) and its log (‘seqlet_count_log’).
- Return type:
- Returns:
The resulting pattern matrix, optionally normalized.