Skip to content
This repository was archived by the owner on Jan 24, 2024. It is now read-only.

Update modeling.R#203

Open
stemangiola wants to merge 4 commits intosqjin:masterfrom
stemangiola:master
Open

Update modeling.R#203
stemangiola wants to merge 4 commits intosqjin:masterfrom
stemangiola:master

Conversation

@stemangiola
Copy link

@stemangiola stemangiola commented May 20, 2021

In my dataset, the third dimension is 1, so drop=F avoids software crash.

Could you also please advise whether this is sometimes expected?

}

prob <- prob[,,pairLR.name.use]
prob <- prob[,,pairLR.name.use, drop=FALSE]
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is not necessary as we have if (length(dim(prob)) == 2) below.

R/modeling.R Outdated
prob.pathways.sig <- prob.pathways[,,pathways.sig, drop=FALSE]
idx <- sort(apply(prob.pathways.sig, 3, sum), decreasing=TRUE, index.return = TRUE)$ix
pathways.sig <- pathways.sig[idx]
prob.pathways.sig <- prob.pathways.sig[, , idx]
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you also change line 381 prob.pathways.sig <- prob.pathways.sig[, , idx] to prob.pathways.sig <- prob.pathways.sig[, , idx, drop=FALSE]

@sqjin
Copy link
Owner

sqjin commented May 20, 2021

@stemangiola Thanks for your contribution. I made two comments. Can you please edit them and then I will merge these pull requests.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants