Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Column/Sample names not in alphabetical order may cause DE conditions/results to flip #2

Open
lijingbu opened this issue Jun 17, 2017 · 2 comments

Comments

@lijingbu
Copy link

Great work for EBSeq, it makes more Biological sense in our project comparing to DESeq2 and EdgeR.
Just found out this issue below. Hope it can be tested.
It works well if samples (column names) are in order with control first/ on the left, like:

A1, A2, A3, B1, B2, B3 when using samples A as the control group, B as the testing group.

However, it seems to reorder the samples' test order, when
B1, B2, B3, A1, A2, A3 when using B as control, test sample A against B. I got reversed results, as if I am still comparing B against A. Thus my DE results were reversed, having up-expressed genes listed in the down expressed list and vice vasa.

My example results of in EBSeqOut. Notice my attention was to compare CB2 against CM2, not compare CM2 to CB2. But it assigned the Condition order and factor levels in reverse order.

$ConditionOrder
Condition1 Condition2
"CB2" "CM2"

$Conditions
[1] CM2 CM2 CM2 CB2 CB2 CB2
Levels: CB2 CM2

@lengning
Copy link
Owner

Hi Lijing,
Thanks for your interest! You may try to input the condition factor as
factor(Cond, levels=c("CM2", "CB2"))
Best,
Ning

@lijingbu
Copy link
Author

Hi Ning,
Thanks for the reply.
It looks like the code was embedded in the EBTest.R script. In line 16 and 23. I simply run the function EBTest.R and got reversed factors.
Best,
Lijing

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants