Entering edit mode
5.6 years ago
Liftedkris
▴
30
hello experts,
i am using EdgeR for my differential expression analysis. i want to define the contrast of interest but a bug appears with the following error message "unexpected input in "...…." i have gone through my command but i did not detect any typo or any error.
here is my command line
contrasts <- makeContrasts("30hpi" = group30hpi_infected – group30hpi_control,
"90hpi" = group90hpi_infected – group90hpi_control,
"180hpi" = group180hpi_infected – group180hpi_control,
levels = design)
Error: unexpected input in "contrasts <- makeContrasts("30hpi" = group30hpi_infected –"
please any help to solve this bug would be immensely appreciated
thanks all
I reformatted your question a bit to improve readability (code option
10101
in the formatting bar).An issue could be that the contrast names start with a number. Try naming them as e.g.
contr.30hpi, contr.90hpi, contr.180phi
or similar.Thanks for this suggestion but I have tried it but it still doesn’t work
Try to get rid of the double quotes in: "30hpi"=, "90hpi"=, etc., and follow instruction from ATpoint about not starting with a number. See if that works out.
thanks for the response but still does not work. it seems the problem is with the minus sign (-). i have been wondering what went wrong
In addition to the other suggestions (R really doesn't like variables and columns / row names starting with numbers), it seems to me the probable cause of the error is you are using paragraph marks
–
instead of minus signs-
to define the contrasts. Try:and so on.