Troubleshooting

OrthoFinder Troubleshooting: Diagnose the First Failure Without Losing Evidence

OrthoFinder troubleshooting is most effective when it preserves the distinction between the first failure and the errors that follow it. A missing input, unavailable dependency, exhausted resource, or malformed intermediate file can each produce a cascade of later messages. Repeatedly restarting the whole analysis may consume time while hiding the original cause. A disciplined diagnosis localizes the failed stage, preserves the relevant evidence, and tests one plausible explanation at a time.

Capture the failure before changing anything

Preserve the command, standard output, error output, log, and scheduler report when available. Record the time and the last stage that completed. Copying only the final line of a long error message can omit the command or file that actually failed. Keep enough context to reconstruct the sequence of events without collecting unrelated private data.

Also record whether the run was interrupted manually, terminated by the scheduler, or exited with an application error. These outcomes can look similar in an incomplete results folder but require different responses. A stopped process is not necessarily evidence of a biological data problem, and an existing output directory is not proof that all intended stages completed.

Classify the failure by its immediate mechanism

Input failures concern missing files, invalid records, or unexpected identifiers. Dependency failures concern tools that cannot execute correctly. Resource failures concern memory, disk, processor allocation, or time limits. Interpretation failures occur when the workflow completes but the outputs do not mean what the researcher assumed. Identifying the category narrows the next diagnostic step.

The categories can interact. A malformed exceptionally large sequence may trigger unusual resource behavior, while a permissions problem may prevent a dependency from writing its output. Classification should guide investigation rather than replace it. Follow the evidence from the first failed command and test the proposed cause in a controlled setting.

Worked example: a scheduler termination

Imagine a hypothetical cluster analysis that ends after 24 hours with a results directory containing search outputs but no completed final trees. The scheduler report shows that the wall time limit was reached. The immediate explanation is termination by the scheduling system, not proof that the input proteins are invalid or that the inference method is scientifically unsuitable.

Review which stage was active, how much progress had been made, and whether the installed version supports continuing from the preserved state. Estimate a revised resource request using the observed workload. Changing the sequence dataset and reinstalling every tool would introduce new variables without addressing the demonstrated cause of the interruption.

Construct the smallest informative reproduction

A reduced reproduction should retain the property suspected of causing failure. If one family fails during alignment, keep the relevant sequences and command. If the problem depends on file paths or batch activation, reproduce those conditions. An arbitrary tiny dataset that removes the critical feature may run successfully without explaining the original issue.

Keep the reduced test separate from the original results. Record which files were copied and which transformations were applied. If the failure disappears, compare the execution context and input properties systematically. The goal is to distinguish causes, not merely obtain one successful command that cannot be related back to the problematic run.

Restart only from a validated state

Restart options and required paths depend on the installed release and the completed stage. Read the local help and any continuation instructions printed by that version. Do not assume that an older command using a particular working directory applies unchanged. Preserve required intermediate files until the restart strategy has been confirmed.

Check that reused data belong to the intended input collection and settings. Search results from one prepared proteome set should not be silently reused after records have been renamed or replaced. A restart can save substantial computation, but only when the preserved state remains compatible with the analysis being continued.

Investigate unusual outputs as carefully as crashes

A completed run with an implausible family expansion, a surprising species placement, or an exceptionally low assignment fraction needs a different diagnostic workflow from an execution failure. Start with identifiers, annotation provenance, and the relevant tables and trees. Determine whether the pattern is localized or widespread before changing global settings.

Unusual biological results should neither be accepted immediately nor discarded because they are unexpected. Form competing explanations and identify observations that discriminate among them. A surprising tree might reflect real history, contamination, incomplete sequence coverage, or inference uncertainty. The diagnostic record should show why a particular interpretation became more plausible.

Case analysis: localizing an alignment failure

Consider a simulated analysis in which searches and grouping complete, but one alignment task exits unsuccessfully. Other families align without error. The failure is localized, so the first useful question concerns the particular input and command rather than the entire species dataset. Preserve that family file and the exact invocation before changing configuration.

Inspect the file for empty records, unusual symbols, duplicated identifiers, exceptional length, and unexpected sequence count. These checks are hypotheses about possible failure mechanisms, not proof that any unusual property is invalid. A real multidomain protein can be long, and a genuinely expanded family can contain many members.

Run the relevant dependency on a copied diagnostic input within the same execution environment. If it fails again, compare the dependency’s own error with the workflow log. If it succeeds, investigate differences in working directory, concurrent workload, permissions, or resource allocation that were present during the original analysis.

Suppose the standalone task succeeds only when memory is increased. That observation supports a resource explanation for the reduced case, but the full workflow still requires validation under its intended concurrency. Several individually manageable tasks can exceed a shared memory allocation when launched together. Correct the relevant resource boundary and repeat the controlled test.

Once the failure is resolved, confirm that the affected family proceeds through the downstream stages and that the final result includes it as expected. Preserve the diagnostic history in a short note. This converts an operational interruption into a documented, understandable event without introducing unexplained changes to the biological dataset.

Further analysis

Disk capacity and file permissions deserve separate checks. A directory can be writable initially and still fail later when storage fills or a quota is reached. Record available capacity, quota status, and the location of temporary files. A generic write error becomes more informative when these conditions are known.

When a dependency command fails, attempt the smallest equivalent invocation within the same environment, using copied diagnostic inputs. If it fails independently, focus on that tool or its immediate inputs. If it succeeds, investigate how the full workflow differs in paths, environment variables, concurrency, or resource limits.

Maintain a short intervention log during diagnosis. Each entry should state the hypothesis, the single change made, and the result of repeating the test. This prevents circular troubleshooting and makes it possible to reverse a change that did not help. It also provides a useful record if another researcher takes over.

After correcting a problem, repeat the relevant validation rather than assuming the absence of the old error proves complete success. Confirm that expected downstream stages finish and that the resulting files are readable. A fix can move the failure to a later stage, so acceptance should follow the intended workflow boundary.

Troubleshooting can introduce its own reproducibility problem if successful changes are not recorded. A dependency path fixed interactively may not persist in a new terminal or a scheduled job. After identifying a solution, encode it in the documented environment setup and verify it from a fresh execution context.

Input validation should distinguish a malformed file from an unfamiliar but legitimate biological sequence. Unusual amino acid composition, extensive repeats, or great length may be real. A diagnostic filter that removes every exceptional record can make a workflow finish while silently changing the biological question. Investigate before excluding.

If several families fail at the same stage, compare their shared properties and the execution conditions. A common dependency error suggests a different cause from independent failures associated with exceptionally large inputs. The distribution of failures is evidence that can guide a more efficient diagnostic experiment.

For incomplete outputs, avoid guessing whether a file is final from its presence alone. Check logs, completion markers where provided, and table readability. A process can create a filename before finishing its contents. Reusing a partial file without validation can turn an operational interruption into a difficult downstream inconsistency.

Once the workflow completes, preserve a concise resolution note describing the failure mechanism, corrective action, and validation result. This makes recurrence easier to recognize and helps a collaborator distinguish an established fix from an untested suggestion.

The objective is a reliable analysis with an understandable history, rather than a sequence of undocumented interventions that happens to produce output.

FAQs

Should I delete the results directory and start again?

Not as the first diagnostic step. Preserve the failed state and its logs, then determine whether the cause can be reproduced and whether valid stages can be reused. Deleting evidence can force unnecessary recomputation and make the original failure harder to understand.

Does a successful small test rule out memory problems?

No. A small test establishes behavior for that workload. Larger sequence collections or unusually large families can require different resources. Compare measured memory use and the scheduler termination reason before deciding whether the full run failed because of capacity.

What information makes a diagnostic report useful?

Provide the software version, exact command, execution environment, relevant error context, failed stage, and a minimal input when appropriate. Explain what was expected and what occurred. Remove unrelated private information while retaining the details necessary to reproduce the specific problem.

Conclusion

Good troubleshooting preserves evidence and reduces uncertainty through controlled tests. Identifying the first failure, separating execution categories, and validating restart compatibility prevents many unproductive reruns. The same disciplined approach applies to surprising biological outputs: investigate the relevant records and competing explanations before altering the experiment or converting an anomaly into a scientific claim.

A resolved failure should improve the project record as well as restore execution. Capturing the cause and the successful validation turns a one time interruption into reusable knowledge, reduces uncertainty during later reruns, and helps protect the biological analysis from undocumented technical changes introduced during an urgent attempt to finish. Retain diagnostic evidence.