Deseq2
1
1
Entering edit mode
11 weeks ago
sk_24 ▴ 10

Does Deseq2 work if I have samples with more than 2 conditions?

PyDeseq2 Deseq2 • 556 views
ADD COMMENT
0
Entering edit mode
11 weeks ago
ATpoint 89k

The minimum is two conditions and at least one group with 2 replicates. Everything beyond that is basically possible, given you're not trying to model linear combinations of something.

Consider some effort please for your questions.

ADD COMMENT
0
Entering edit mode

ATpoint I am using PyDeseq2 package and tried running it for 4 conditions; A,B,C and D (each condition is a sample treated with different drug and has 4 biological replicates each) and following is the code for the same:

counts = pd.read_csv("counts.txt", sep="\t")

columns_array = counts.columns.to_list()

conditions_array = ["A","A","A","A","B","B","B","B","C","C","C","C","D","D","D","D"]

metadata_df = pd.DataFrame({"condition": conditions_array}, index=columns_array)

dds = DeseqDataSet(
    counts=counts.T,
    metadata=metadata_df,
    design_factors=["condition"]
)

dds.deseq2()

print(dds)

ds = DeseqStats(dds, contrast=["condition", "A", "D"])

Running this contrast command gives me the following error

KeyError: "The tested level ('A') should correspond to one of the levels of 'condition'"
ADD REPLY

Login before adding your answer.

Traffic: 3017 users visited in the last hour
Help About
FAQ
Access RSS
API
Stats

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6