2025-01-30 用R畫個(gè)5堿基的motif

library(ggseqlogo)

SNI? 截motif3的4-8位? E-value:?7.8e-016

prob_matrix <- matrix(c(

? ? 0.000000, 0.735709, 0.051225, 0.213066,? # Position 4

? ? 0.242762, 0.634744, 0.000000, 0.122494,? # Position 5

? ? 0.000000, 0.940609, 0.000000, 0.059391,? # Position 6

? ? 0.998515, 0.000000, 0.000000, 0.001485,? # Position 7

? ? 0.113586, 0.000742, 0.822569, 0.063103? # Position 8

), nrow = 5, byrow = TRUE)? # 5 positions

# Transpose the matrix so rows are bases and columns are positions

prob_matrix <- t(prob_matrix)

# Set row names for the bases

rownames(prob_matrix) <- c("A", "C", "G", "T")

# Create the sequence logo

ggseqlogo(prob_matrix, seq_type = "DNA", col_scheme = "nucleotide2")

Sham?截motif3的4-8位? E-value:?2.8e-002

prob_matrix <- matrix(c(

? 0.326969, 0.000000, 0.673031, 0.000000,? # Position 1

? 0.479714, 0.000000, 0.520286, 0.000000,? # Position 2

? 0.205251, 0.436754, 0.357995, 0.000000,? # Position 3

? 0.622912, 0.000000, 0.119332, 0.257757,? # Position 4

? 0.000000, 0.000000, 1.000000, 0.000000? # Position 5

), nrow = 5, byrow = TRUE)? # 5 positions

# Transpose the matrix so rows are bases and columns are positions

prob_matrix <- t(prob_matrix)

# Set row names for the bases

rownames(prob_matrix) <- c("A", "C", "G", "T")

ggseqlogo(prob_matrix, seq_type = "DNA", col_scheme = "nucleotide2")

sh 截motif3的2-6位? E-value:?1.1e-011

prob_matrix <- matrix(c(

? 0.000000, 0.936508, 0.000000, 0.063492,? # Position 1

? 1.000000, 0.000000, 0.000000, 0.000000,? # Position 2

? 0.000000, 0.000000, 1.000000, 0.000000,? # Position 3

? 0.000000, 0.626984, 0.373016, 0.000000,? # Position 4

? 0.000000, 0.904762, 0.000000, 0.095238? # Position 5

), nrow = 5, byrow = TRUE)? # 5 positions

# Transpose the matrix so rows are bases and columns are positions

prob_matrix <- t(prob_matrix)

# Set row names for the bases

rownames(prob_matrix) <- c("A", "C", "G", "T")

# Print the matrix to verify

print(prob_matrix)

ggseqlogo(prob_matrix, seq_type = "DNA", col_scheme = "nucleotide2")

?著作權(quán)歸作者所有,轉(zhuǎn)載或內(nèi)容合作請(qǐng)聯(lián)系作者
【社區(qū)內(nèi)容提示】社區(qū)部分內(nèi)容疑似由AI輔助生成,瀏覽時(shí)請(qǐng)結(jié)合常識(shí)與多方信息審慎甄別。
平臺(tái)聲明:文章內(nèi)容(如有圖片或視頻亦包括在內(nèi))由作者上傳并發(fā)布,文章內(nèi)容僅代表作者本人觀點(diǎn),簡(jiǎn)書系信息發(fā)布平臺(tái),僅提供信息存儲(chǔ)服務(wù)。

相關(guān)閱讀更多精彩內(nèi)容

友情鏈接更多精彩內(nèi)容