bioin.motif.profile_motif¶
-
bioin.motif.profile_motif(motifs)[source]¶ The percentage of count number of nucleotides column wise from a motifs matrix.
Parameters: motifs (list) – 2D matrix, matrix of motifs in genome. Returns: Dictionary, the percentile count of each nucleotides in each column of the motifs matrix. Examples
Takes a list of strings motifs as input and then generate the count_motif(motifs), then divide each element of the count matrix by the number of rows in the count matrix, to obtain the profile_motif matrix (as a dictionary of lists.)
>>> motifs = ['AACGTA', 'CCCGTT', 'CACCTT', 'GGATTA', 'TTCCGG'] >>> profile_dict = profile_motif(motifs) >>> profile_dict {'A': [0.2, 0.4, 0.2, 0.0, 0.0, 0.4], 'C': [0.4, 0.2, 0.8, 0.4, 0.0, 0.0], 'G': [0.2, 0.2, 0.0, 0.4, 0.2, 0.2], 'T': [0.2, 0.2, 0.0, 0.2, 0.8, 0.4]}