In rnaseq.Rmd, there are many ways to attempt to add a previously existing contrast name to res_list. By accidentally attempting to do so, users encounter a single error that may be misleading in some cases. Here is an example of such a case:
User sets up contrasts and runs all results_## chunks with config=TRUE, as the default examples show.
Invalidates the cache of at least one results_## chunk.
Re-renders the .Rmd file.
The results_## chunk with invalidated cache runs again, and there is an attempt to add an object with an already been used name to res_list. This triggers a false duplicate contrast name error, as the mechanism checking for duplicates does not recognize if the same contrast is being rerun or if a new object with an already been used name is being added to res_list.
The user encounters the error message: "Found duplicates after removing the pattern ^contr[^]+_", which is misleading in this case where there are no visible duplicate contrast names.
Solution:
Update the documentation to clarify that rerunning a results_## chunk will trigger the Found duplicates error.
Problem:
In rnaseq.Rmd, there are many ways to attempt to add a previously existing contrast name to res_list. By accidentally attempting to do so, users encounter a single error that may be misleading in some cases. Here is an example of such a case:
Solution:
Update the documentation to clarify that rerunning a results_## chunk will trigger the Found duplicates error.
Improve the error message to include: "Don't have duplicate contrast names? Read here: https://lcdb.github.io/lcdb-wf/rnaseq-rmd.html#downstream-detailed#duplicates-found-after-removing"