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'"
• 0 views
•
link