lcdb / lcdb-wf

Robust, tested workflows for RNA-seq, ChIP-seq and other high-throughput sequencing analysis
https://lcdb.github.io/lcdb-wf
20 stars 17 forks source link

Add documentation for "Found duplicate names after removing pattern ^contr_[^_]+_" error #393

Closed menoldmt closed 11 months ago

menoldmt commented 11 months ago

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:

  1. User sets up contrasts and runs all results_## chunks with config=TRUE, as the default examples show.
  2. Invalidates the cache of at least one results_## chunk.
  3. Re-renders the .Rmd file.
  4. 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.
  5. 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.

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"