Entering edit mode
5.0 years ago
hsu
▴
40
I'm trying to extract results from DESeq2 anlysis using contrast function, my code is :
zyres_BFvsBS <- results(zinbde_sub, contrast = c("Group.Sub.Group", "BF", " BS"))
But I got this error:
Error in cleanContrast(object, contrast, expanded = isExpanded, listValues = listValues, : BF and BS should be levels of Group.Sub.Group such that Group.Sub.Group_BF_vs_A and Group.Sub.Group_.BS_vs_A are contained in 'resultsNames(object)'
I tried this code:
zinbde_sub$Group.Sub.Group <- factor(zinbde_sub$Group.Sub.Group, levels =c("A","BF","BS","CF","CS"))
But it's not working.
Do you have any suggestions? Thank you very much!
Can you post the results of
levels(zinbde_sub$Group.Sub.Group)
? Also please format your code properly.Please hughlight code/errors with markdown: