0
$\begingroup$

I have a list of patients in rows and oncogenic signalling pathways in columns of two independent matrices

One for responders to a drug

one for non-responders to the same drugs

If a patient gets mutation in pathway X we give that 1 otherwise 0

I want to know if pathway X is significantly altered between two groups

I have tried 3 things

wilcox.test(group1$pathwayX, group2$pathwayX)
t.test(group1$pathwayX, group2$pathwayX)
fisher.test(x = matrix(
  c(
    group1_sample_size,
    pathwayX_mutated_samples,
    group2_sample_size,
    pathwayX_mutated_samples
  ),
  nrow = 2
)

)

Basically I have two boolean matrices for each group

And I am not sure using which statistical test I can say which pathway is significantly altered between two groups

My matrices look like this

> dput(group1)
structure(list(Patients = c("1wSYmiuGzvofpfOc.vep.txt_1", "1XqEovQ3rURyS484.vep.txt_1", 
"4LVYCdsQtYjPtJ30.vep.txt_1", "4Psp3OZJbxhm7eyi.vep.txt_1", "7eyiaAprbwfQ5kPa.vep.txt_1", 
"aPbIONzUeWGcIyYx.vep.txt_1", "CdsQtYjPtJ30deI1.vep.txt_1", "ChVkSH31lKuEpIlt.vep.txt_1", 
"Dw7gtgWhjohDwtVG.vep.txt_1", "dxhRH7mCrsZU39G8.vep.txt_1", "ecKEzoTVnJNxoijw.vep.txt_1", 
"hiwgJvkWdxhRH7mC.vep.txt_1", "iwgJvkWdxhRH7mCr.vep.txt_1", "JFc0QILAAMvog6JI.vep.txt_1", 
"M2p1x5z56nffDw7g.vep.txt_1", "r8m244SuOFhqgawP.vep.txt_1", "rKRbXg9sAfx5XMx8.vep.txt_1", 
"seBGMXR0ypMJRNZ7.vep.txt_1", "SKsnsuD9my3Monah.vep.txt_1", "X6mBq2k2pJ07trvD.vep.txt_1", 
"XqEovQ3rURyS484P.vep.txt_1", "ZyduXLr8m244SuOF.vep.txt_1"), 
    BER = c(0L, 0L, 0L, 0L, 1L, 0L, 0L, 0L, 1L, 0L, 0L, 0L, 0L, 
    0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L), CPF = c(1L, 0L, 0L, 
    0L, 1L, 0L, 0L, 1L, 0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L, 0L, 
    0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 1L, 0L, 0L, 0L, 
    0L, 1L, 0L, 0L), DR = c(0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 
    0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L), AM = c(0L, 
    0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 
    0L, 0L, 0L, 0L, 0L, 0L), NHEJ = c(0L, 0L, 0L, 0L, 0L, 0L, 
    0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 
    0L)), class = "data.frame", row.names = c(NA, -22L))
>

> dput(group2)
structure(list(Patients = c("2SKsnsuD9my3Mona.vep.txt_1", "4Pyv3CFxV1xnub78.vep.txt_1", 
"8X6mBq2k2pJ07trv.vep.txt_1", "aoZMTHJebqIv4XPB.vep.txt_1", "eI178OJnaJgJiChV.vep.txt_1", 
"iwyHwDFnhwBqHpiY.vep.txt_1", "LVYCdsQtYjPtJ30d.vep.txt_1", "MK8h6Uxg5STxmlmN.vep.txt_1", 
"my3MonahnRNHQhbN.vep.txt_1", "N9GNhyyCA4Psp3OZ.vep.txt_1", "nElUB6DzV88gyC1w.vep.txt_1", 
"NhCGkrdpoVpprdse.vep.txt_1", "prbwfQ5kPa4ecKEz.vep.txt_1", "q2k2pJ07trvDG9H9.vep.txt_1", 
"QET6cz3jXOC7SlKu.vep.txt_1", "Shf9VbopNhCGkrdp.vep.txt_1", "sUaOlXVV1yR708qY.vep.txt_1", 
"U39G8Uh315OvccWS.vep.txt_1", "u8NXDOCcDVQ1HVvt.vep.txt_1", "UaOlXVV1yR708qY8.vep.txt_1", 
"ub78GwNVpYlhZVTC.vep.txt_1", "uqQ4GGWJZrq7U17D.vep.txt_1", "WGcIyYxkF73l0q6q.vep.txt_1", 
"x8X6mBq2k2pJ07tr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, 0L, 0L, 0L, 0L, 0L, 0L, 0L
), OD = c(0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 
0L, 0L, 0L, 0L, 1L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L), p53 = c(1L, 
0L, 0L, 0L, 0L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 0L, 1L, 1L, 
1L, 0L, 0L, 0L, 1L, 1L, 0L, 0L, 1L), TLS = c(0L, 0L, 0L, 0L, 
0L, 0L, 0L, 0L, 1L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 
0L, 0L, 0L, 0L, 0L, 0L), TM = c(0L, 1L, 0L, 1L, 0L, 0L, 0L, 0L, 
0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 
0L, 0L), UR = c(0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 1L, 0L, 0L, 0L, 
0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L), DR = c(0L, 
0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 
0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L), AM = c(0L, 0L, 0L, 0L, 0L, 
0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 
0L, 0L, 0L, 0L, 0L)), class = "data.frame", row.names = c(NA, 
-26L))
>
$\endgroup$
0
$\begingroup$

I am not 100% sure if I am seeing this correctly, but it looks like you have several binary (or at least categorical level) predictor variables and one categorical level outcome variable (the pathway 0/1)..

If this above about your design is correct, you can use loglinear analysis to test for significance.

I hope this helps!

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.