Skip to content

[QUESTION] Error in if (final_annotations[[cluster_id]] != discussion_results_map[[cluster_id]]) {: TRUE/FALSE values are required, missing values cannot be used #3

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
odxdld opened this issue Apr 21, 2025 · 3 comments
Labels
bug: fixed Bug fixed in latest update. 此错误已在最新更新中解决 bug: R Issues in the R package. R包中的错误或问题

Comments

@odxdld
Copy link

odxdld commented Apr 21, 2025

Question

LLM跑完了报错
错误于if (final_annotations[[cluster_id]] != discussion_results_map[[cluster_id]]) {:
需要TRUE/FALSE值的地方不可以用缺少值

Environment Information

  • mLLMCelltype Version:
  • Language: R
  • Language Version: R4.4.3
  • Operating System: Windows 11,
  • Used LLM Models: deepseek

What I've Tried

Code Example

# If applicable, provide a short code example

Additional Context

@cafferychen777
Copy link
Owner

Hi @odxdld,

Thank you for reporting this issue with mLLMCelltype.

Based on the error message you're encountering:

错误于if (final_annotations[[cluster_id]] != discussion_results_map[[cluster_id]]) {:
需要TRUE/FALSE值的地方不可以用缺少值

It appears that you're using only a single LLM model (DeepSeek) with the interactive_consensus_annotation function. This function is specifically designed for multi-model consensus and requires at least two different LLM models to work properly.

Solution

For single-model cell type annotation, please use the annotate_cell_types function instead:

results <- annotate_cell_types(
  input = your_marker_genes,
  tissue_name = "your_tissue_name",
  model = "deepseek-chat",  # or whichever DeepSeek model you're using
  api_keys = list(deepseek = "your_api_key"),
  top_gene_count = 10
)

The interactive_consensus_annotation function requires multiple models to compare predictions and facilitate discussions for controversial clusters. When only one model is used, there's no basis for comparison, which leads to the error you're seeing.

Additional Information

If you do want to use the consensus approach, you'll need to specify at least two different LLM models. For example:

consensus_results <- interactive_consensus_annotation(
  input = your_marker_genes,
  tissue_name = "your_tissue_name",
  models = c("deepseek-coder", "qwen-max-2025-01-25"),  # Use at least two models
  api_keys = list(
    deepseek = "your_deepseek_api_key",
    qwen = "your_qwen_api_key"
  ),
  top_gene_count = 10
)

Please let us know if you have any further questions or issues!

Best,

@cafferychen777
Copy link
Owner

您好 @odxdld

感谢您报告这个问题。请问问题现在解决了吗?

我已经看到您遇到的错误信息,这个问题看起来与使用interactive_consensus_annotation函数时模型配置有关。为了能更直接、更有效地帮助您解决这个问题,建议您可以加我微信 yycccc1217,这样我们可以进行更详细的沟通,我能更好地了解您的具体情况并提供解决方案。

通过微信我可以更方便地指导您完成正确的配置,或者根据您的具体使用场景提供更适合的解决方法。

希望能尽快解决您的问题!

@odxdld
Copy link
Author

odxdld commented Apr 28, 2025

您好 @odxdld

感谢您报告这个问题。请问问题现在解决了吗?

我已经看到您遇到的错误信息,这个问题看起来与使用interactive_consensus_annotation函数时模型配置有关。为了能更直接、更有效地帮助您解决这个问题,建议您可以加我微信 yycccc1217,这样我们可以进行更详细的沟通,我能更好地了解您的具体情况并提供解决方案。

通过微信我可以更方便地指导您完成正确的配置,或者根据您的具体使用场景提供更适合的解决方法。

希望能尽快解决您的问题!

非常感谢,我的问题已经解决

@cafferychen777 cafferychen777 changed the title [QUESTION] [QUESTION] Error in if (final_annotations[[cluster_id]] != discussion_results_map[[cluster_id]]) {: TRUE/FALSE values are required, missing values cannot be used Apr 28, 2025
@cafferychen777 cafferychen777 added bug: R Issues in the R package. R包中的错误或问题 bug: fixed Bug fixed in latest update. 此错误已在最新更新中解决 labels Apr 28, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug: fixed Bug fixed in latest update. 此错误已在最新更新中解决 bug: R Issues in the R package. R包中的错误或问题
Projects
None yet
Development

No branches or pull requests

2 participants