Skip to content

added Error documentation section to rnaseq-rmd.rst and hyperlnked to it in helpers.R error message #402

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 5 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 22 additions & 0 deletions docs/rnaseq-rmd.rst
Original file line number Diff line number Diff line change
Expand Up @@ -544,6 +544,28 @@ enrichment RMarkdown document.

The output of sessionInfo records the versions of packages used in the analysis.

Errors
------

This section addresses errors encountered during the RNA-Seq downstream analysis.

Error: "Found duplicate names after removing pattern ^contr_[^_]+_"

Cause:
- If no duplicate contrast names exist in your ``results_##`` chunks,
the error can arise from changes to previously cached chunks.
Even if the change is undone and the environment is cleared,
the error may persist. For example, changing ``contr_01``
in ``results_01`` to ``contr_05`` and then reknitting the file
will cause the R environment to contain both ``contr_01`` and
``contr_05`` patterns after that chunk is loaded, leading to
this error.

Solution:
- Clear all cache and R environment objects.
Quit R without saving the workspace, delete the .RData file,
remove the ``rnaseq_cache`` directory, open rnaseq.Rmd and re-knit.

Glossary
--------
.. glossary::
Expand Down
2 changes: 1 addition & 1 deletion lib/lcdbwf/R/helpers.R
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ collect_objects <- function(pattern, fixed=FALSE){
# If there was a wildcard in the pattern there is a risk that the modified
# names are no longer unique
if (length(unique(modified_names)) != length(var_names)){
stop(paste("Found duplicate names after removing pattern", pattern))
stop(paste("Found duplicate names after removing pattern", pattern, "see https://lcdb.github.io/lcdb-wf/rnaseq-rmd.html#Errors for details"))
}
names(obj_list) <- modified_names
return(obj_list)
Expand Down