乐于分享
好东西不私藏

Biomni源码拆解|AI如何自动注释单细胞类型?

Biomni源码拆解|AI如何自动注释单细胞类型?

点击蓝字 关注我们

上一期提到Biomni有20个功能块代码,包括主函数代码Biomni\biomni\tool\和介绍(description)代码Biomni\biomni\tool\tool_descriptionl。

  • 以"genomics.py(基因组与前沿单细胞)"的annotate_celltype_scRNA功能为例进行介绍。

"description"代码:

     {        "description""Annotate cell types based on gene markers and transferred "        "labels using LLM. After leiden clustering, annotate clusters "        "using differentially expressed genes and optionally "        "incorporate transferred labels from reference datasets.",        "name""annotate_celltype_scRNA",        "optional_parameters": [            {                "default""leiden",                "description""Clustering method to use for cell type annotation",                "name""cluster",                "type""str",            },            {                "default""claude-3-5-sonnet-20241022",                "description""Language model instance for cell type prediction",                "name""llm",                "type""str",            },            {                "default"None,                "description""Transferred cell type composition for each cluster",                "name""composition",                "type""pd.DataFrame",            },        ],        "required_parameters": [            {                "default"None,                "description""Name of the AnnData file containing scRNA-seq data",                "name""adata_filename",                "type""str",            },            {                "default"None,                "description""Directory containing the data files",                "name""data_dir",                "type""str",            },            {                "default"None,                "description"'Information about the scRNA-seq data (e.g., "homo sapiens, brain tissue, normal")',                "name""data_info",                "type""str",            },            {                "default"None,                "description""Path to the data lake",                "name""data_lake_path",                "type""str",            },        ],    },

主函数代码:

第一阶段:加载数据与提取 Marker 基因

做什么:

  1. 使用 scanpy 读取单细胞 .h5ad 文件。

  2. 调用 sc.tl.rank_genes_groups,使用 Wilcoxon 秩和检验(单细胞分析中最经典的差异表达算法),计算每一个 Leiden 聚类群里,哪些基因的表达量显著高于其他群。

  3. 取出前 20 个表达最显著且得分大于 0(gene_scores > 0)的基因,存入 markers 字典中。这就是给 LLM 准备的“物理证据”

def annotate_celltype_scRNA(    adata_filename,    data_dir,    data_info,    data_lake_path,    cluster="leiden",    llm="claude-3-5-sonnet-20241022",    composition=None,):    """Annotate cell types based on gene markers and transferred labels using LLM.    After leiden clustering, annotate clusters using differentially expressed genes    and optionally incorporate transferred labels from reference datasets.    Parameters    ----------    - adata_filename(str): Name of the AnnData file containing scRNA-seq data    - data_dir(str): Directory containing the data files    - data_info(str): Information about the scRNA-seq data(e.g., "homo sapiens, brain tissue, normal")    - data_lake_path(str): Path to the data lake    - llm(str): Language model instance for cell type prediction, such as 'claude-3-haiku-20240307'    - composition(pd.DataFrame, optional): Transferred cell type composition for each cluster    Returns:    - str: Steps performed and file paths where results were saved    """    def _cluster_info(cluster_id, marker_genes, composition_df=None):        """Format cluster information for LLM prompt."""        if composition_df is None:            return f"The enriched genes in this cluster are: {', '.join(marker_genes)}."        info = [            f"The enriched genes in this cluster are: {', '.join(marker_genes)}.",            f"For a starting point, the transferred reference cell type composition {cluster_id} is:",        ]        cluster_comp = []        for celltype, proportion in composition_df.loc[cluster_id].items():            if proportion > 0:                cluster_comp.append(f"{celltype}:{proportion:.2f}")        return "\n".join(info) + "" + "; ".join(cluster_comp) + "\n"    from langchain_core.prompts import PromptTemplate    # from langchain.chains import LLMChain    steps = []    steps.append(f"Loading AnnData from {data_dir}/{adata_filename}")    adata = sc.read_h5ad(f"{data_dir}/{adata_filename}")    steps.append(f"Identifying marker genes for clusters defined by {cluster} clustering.")    sc.tl.rank_genes_groups(adata, groupby="leiden", method="wilcoxon", use_raw=False)    genes = pd.DataFrame(adata.uns["rank_genes_groups"]["names"]).head(20)    scores = pd.DataFrame(adata.uns["rank_genes_groups"]["scores"]).head(20)    markers = {}    for i in range(genes.shape[1]):        gene_names = genes.iloc[:, i].tolist()        gene_scores = scores.iloc[:, i].tolist()        markers[i] = list(np.array(gene_names)[np.array(gene_scores) > 0])

第二阶段:构建标准化细胞图谱白名单 (Lines 45-49)

做什么:从数据湖里读取了一个标准的 CZI (Chan Zuckerberg Initiative) 细胞本体论 (Cell Ontology) 数据集。

为什么:AI 容易天马行空地瞎编细胞名字(比如把同一个细胞一会儿叫 "T cell",一会儿叫 "T-Lymphocyte")。代码在这里把官方标准的细胞名词全部提取出来,组合成一个长字符串 czi_celltype,作为紧箍咒紧紧限制住 LLM 的输出范围。

    TODO: this can be optimized    czi_celltype_path = data_lake_path + "/czi_census_datasets_v4.parquet"    df = pd.read_parquet(czi_celltype_path)    czi_celltype_set = {cell_type.strip() for cell_types in df["cell_type"] for cell_type in str(cell_types).split(";")}    czi_celltype = ", ".join(sorted(czi_celltype_set))

第三阶段:设计 Prompt 模板与 AI 链 (Lines 51-68)

这里构建了发给 Claude 的提示词工程(Prompt Engineering):

  • 提示词明确告诉 AI:

  1. 结合组织背景(data_info)。

  2. 参考转移标签(composition),但明确规定:如果置信度低于 50%(0.5),就不要信任它。

  3. 必须从 CZI 细胞标准库里挑选名字。

  4. 严格限制输出格式为:"name; score; reason"(名字; 分数; 理由)。

 prompt_template = f"""Please think carefully, and identify the cell type in {data_info} based on the gene markers.Optionally refer to the transferred cell type information but do not trust it when the percentage is lower than 0.5.{{cluster_info}}The cell type names should come from cell ontology: {czi_celltype}.Only provide the cell type name, confidence score (0-1), and detailed reason.Output format: "name; score; reason".No numbers before name or spaces before number."""    # Some can be a mixture of multiple cell types.    llm = get_llm(llm)    prompt = PromptTemplate(input_variables=["cluster_info"], template=prompt_template)    chain = prompt | llm    steps.append("Annotating cell types of each cluster based on gene markers and transferred labels.")    # valid_celltypes = set(czi_celltype.split(";"))    cluster_annotations = {}    annotation_reasons = []

第四阶段:循环迭代与纠错机制 (Lines 74-98)

这是代码中最精彩的部分。由于大模型输出具有随机性,代码采用了一个 while True 死循环来确保结果的 100% 正确:

自适应纠错:如果 Claude 没有按照 ; 分割格式输出,或者给出的细胞名字不在 CZI 标准库里,代码不会报错崩溃,而是把错误信息追加到提示词后面,重新调教并喂给 AI,直到 AI 给出正确格式的答案为止。

print(f"Annotate each cluster of {cluster}")    for _idx in range(len(adata.obs[cluster].unique())):        cluster_info = _cluster_info(str(_idx), markers[_idx], composition)        while True:            response = chain.invoke({"cluster_info": cluster_info})            # Handle different response types            if hasattr(response, "content"):  # For AIMessage                response = response.content            elif isinstance(response, dictand"text" in response:                response = response["text"]            elif isinstance(response, str):                response = response            else:                response = str(response)            try:                predicted_celltype, confidence, reason = [x.strip() for x in response.split(";"2)]                if predicted_celltype in czi_celltype_set or predicted_celltype.lower() in czi_celltype_set:                    cluster_annotations[str(_idx)] = predicted_celltype                    annotation_reasons.append((predicted_celltype, reason))                    break                else:                    cluster_info += "\nAssigned cell type name must be in cell ontology!"            except ValueError:                cluster_info += "\nPlease follow the format: name; score; reason"        print(f"Cluster {_idx}{response}")

第五阶段:数据写回与保存 (Lines 100-111)

将 AI 预测出的聚类标签映射回每一个细胞(adata.obs["cell_type"])。

将 AI 给出的判定理由存入 cell_type_reason 供用户后续人工复核。

最后以 gzip 压缩格式将最终的 AnnData 写回磁盘。

    # create reason dictionary    reason_dict = {}    for celltype, reason in annotation_reasons:        if celltype not in reason_dict:            reason_dict[celltype] = []        reason_dict[celltype].append(reason)    reason_dict = {k: "\n".join(v) for k, v in reason_dict.items()}    adata.obs["cell_type"] = adata.obs[cluster].map(cluster_annotations)    adata.obs["cell_type_reason"] = adata.obs["cell_type"].map(reason_dict).astype(str)    steps.append(f"Saving annotated adata to {data_dir}/annotated.h5ad, the annotations are in the 'cell_type' column.")    adata.write(f"{data_dir}/annotated.h5ad", compression="gzip")    return"\n".join(steps)

其实这种设计思路,在科研工具里是共通的。

比如在 青熵视界(https://qssj.nextsci.cn)

这类数据分析与可视化系统里,也在做类似的事情:

  1. 用结构化流程替代手工分析

  2. 用参数化系统替代经验选图

  3. 用规则约束保证图表一致性

  4. 用自动化生成降低科研表达成本

本质上两者在解决同一个问题:

把“经验驱动的科研操作”,变成“可计算、可复现、可约束的系统”。

Biomni 在做的是“AI 生信自动注释系统”,

而青熵这类工具在做的是“科研表达与分析自动化系统”。

方向不同,但底层逻辑一致:

让科研从“人做流程”,变成“系统执行认知”。

点击

阅读原文

查看更多

基本 文件 流程 错误 SQL 调试
  1. 请求信息 : 2026-06-25 01:35:07 HTTP/1.1 GET : https://www.yeyulingfeng.com/a/784947.html
  2. 运行时间 : 0.098200s [ 吞吐率:10.18req/s ] 内存消耗:4,719.55kb 文件加载:145
  3. 缓存信息 : 0 reads,0 writes
  4. 会话信息 : SESSION_ID=0dab3e4bc17b2625897dc9ea927e18e8
  1. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/public/index.php ( 0.79 KB )
  2. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/vendor/autoload.php ( 0.17 KB )
  3. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/vendor/composer/autoload_real.php ( 2.49 KB )
  4. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/vendor/composer/platform_check.php ( 0.90 KB )
  5. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/vendor/composer/ClassLoader.php ( 14.03 KB )
  6. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/vendor/composer/autoload_static.php ( 6.05 KB )
  7. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/vendor/topthink/think-helper/src/helper.php ( 8.34 KB )
  8. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/vendor/topthink/think-validate/src/helper.php ( 2.19 KB )
  9. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/vendor/ralouphie/getallheaders/src/getallheaders.php ( 1.60 KB )
  10. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/vendor/topthink/think-orm/src/helper.php ( 1.47 KB )
  11. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/vendor/topthink/think-orm/stubs/load_stubs.php ( 0.16 KB )
  12. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/vendor/topthink/framework/src/think/Exception.php ( 1.69 KB )
  13. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/vendor/topthink/think-container/src/Facade.php ( 2.71 KB )
  14. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/vendor/symfony/deprecation-contracts/function.php ( 0.99 KB )
  15. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/vendor/symfony/polyfill-mbstring/bootstrap.php ( 8.26 KB )
  16. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/vendor/symfony/polyfill-mbstring/bootstrap80.php ( 9.78 KB )
  17. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/vendor/symfony/var-dumper/Resources/functions/dump.php ( 1.49 KB )
  18. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/vendor/topthink/think-dumper/src/helper.php ( 0.18 KB )
  19. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/vendor/symfony/var-dumper/VarDumper.php ( 4.30 KB )
  20. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/vendor/guzzlehttp/guzzle/src/functions_include.php ( 0.16 KB )
  21. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/vendor/guzzlehttp/guzzle/src/functions.php ( 5.54 KB )
  22. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/vendor/topthink/framework/src/think/App.php ( 15.30 KB )
  23. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/vendor/topthink/think-container/src/Container.php ( 15.76 KB )
  24. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/vendor/psr/container/src/ContainerInterface.php ( 1.02 KB )
  25. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/app/provider.php ( 0.19 KB )
  26. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/vendor/topthink/framework/src/think/Http.php ( 6.04 KB )
  27. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/vendor/topthink/think-helper/src/helper/Str.php ( 7.29 KB )
  28. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/vendor/topthink/framework/src/think/Env.php ( 4.68 KB )
  29. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/app/common.php ( 0.03 KB )
  30. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/vendor/topthink/framework/src/helper.php ( 18.78 KB )
  31. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/vendor/topthink/framework/src/think/Config.php ( 5.54 KB )
  32. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/config/alipay.php ( 3.59 KB )
  33. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/vendor/topthink/framework/src/think/facade/Env.php ( 1.67 KB )
  34. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/config/app.php ( 0.95 KB )
  35. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/config/cache.php ( 0.78 KB )
  36. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/config/console.php ( 0.23 KB )
  37. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/config/cookie.php ( 0.56 KB )
  38. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/config/database.php ( 2.48 KB )
  39. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/config/filesystem.php ( 0.61 KB )
  40. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/config/lang.php ( 0.91 KB )
  41. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/config/log.php ( 1.35 KB )
  42. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/config/middleware.php ( 0.19 KB )
  43. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/config/route.php ( 1.89 KB )
  44. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/config/session.php ( 0.57 KB )
  45. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/config/trace.php ( 0.34 KB )
  46. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/config/view.php ( 0.82 KB )
  47. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/app/event.php ( 0.25 KB )
  48. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/vendor/topthink/framework/src/think/Event.php ( 7.67 KB )
  49. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/app/service.php ( 0.13 KB )
  50. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/app/AppService.php ( 0.26 KB )
  51. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/vendor/topthink/framework/src/think/Service.php ( 1.64 KB )
  52. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/vendor/topthink/framework/src/think/Lang.php ( 7.35 KB )
  53. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/vendor/topthink/framework/src/lang/zh-cn.php ( 13.70 KB )
  54. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/vendor/topthink/framework/src/think/initializer/Error.php ( 3.31 KB )
  55. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/vendor/topthink/framework/src/think/initializer/RegisterService.php ( 1.33 KB )
  56. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/vendor/services.php ( 0.14 KB )
  57. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/vendor/topthink/framework/src/think/service/PaginatorService.php ( 1.52 KB )
  58. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/vendor/topthink/framework/src/think/service/ValidateService.php ( 0.99 KB )
  59. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/vendor/topthink/framework/src/think/service/ModelService.php ( 2.04 KB )
  60. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/vendor/topthink/think-trace/src/Service.php ( 0.77 KB )
  61. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/vendor/topthink/framework/src/think/Middleware.php ( 6.72 KB )
  62. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/vendor/topthink/framework/src/think/initializer/BootService.php ( 0.77 KB )
  63. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/vendor/topthink/think-orm/src/Paginator.php ( 11.86 KB )
  64. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/vendor/topthink/think-validate/src/Validate.php ( 63.20 KB )
  65. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/vendor/topthink/think-orm/src/Model.php ( 23.55 KB )
  66. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/vendor/topthink/think-orm/src/model/concern/Attribute.php ( 21.05 KB )
  67. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/vendor/topthink/think-orm/src/model/concern/AutoWriteData.php ( 4.21 KB )
  68. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/vendor/topthink/think-orm/src/model/concern/Conversion.php ( 6.44 KB )
  69. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/vendor/topthink/think-orm/src/model/concern/DbConnect.php ( 5.16 KB )
  70. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/vendor/topthink/think-orm/src/model/concern/ModelEvent.php ( 2.33 KB )
  71. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/vendor/topthink/think-orm/src/model/concern/RelationShip.php ( 28.29 KB )
  72. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/vendor/topthink/think-helper/src/contract/Arrayable.php ( 0.09 KB )
  73. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/vendor/topthink/think-helper/src/contract/Jsonable.php ( 0.13 KB )
  74. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/vendor/topthink/think-orm/src/model/contract/Modelable.php ( 0.09 KB )
  75. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/vendor/topthink/framework/src/think/Db.php ( 2.88 KB )
  76. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/vendor/topthink/think-orm/src/DbManager.php ( 8.52 KB )
  77. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/vendor/topthink/framework/src/think/Log.php ( 6.28 KB )
  78. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/vendor/topthink/framework/src/think/Manager.php ( 3.92 KB )
  79. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/vendor/psr/log/src/LoggerTrait.php ( 2.69 KB )
  80. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/vendor/psr/log/src/LoggerInterface.php ( 2.71 KB )
  81. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/vendor/topthink/framework/src/think/Cache.php ( 4.92 KB )
  82. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/vendor/psr/simple-cache/src/CacheInterface.php ( 4.71 KB )
  83. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/vendor/topthink/think-helper/src/helper/Arr.php ( 16.63 KB )
  84. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/vendor/topthink/framework/src/think/cache/driver/File.php ( 7.84 KB )
  85. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/vendor/topthink/framework/src/think/cache/Driver.php ( 9.03 KB )
  86. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/vendor/topthink/framework/src/think/contract/CacheHandlerInterface.php ( 1.99 KB )
  87. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/app/Request.php ( 0.09 KB )
  88. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/vendor/topthink/framework/src/think/Request.php ( 55.78 KB )
  89. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/app/middleware.php ( 0.25 KB )
  90. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/vendor/topthink/framework/src/think/Pipeline.php ( 2.61 KB )
  91. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/vendor/topthink/think-trace/src/TraceDebug.php ( 3.40 KB )
  92. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/vendor/topthink/framework/src/think/middleware/SessionInit.php ( 1.94 KB )
  93. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/vendor/topthink/framework/src/think/Session.php ( 1.80 KB )
  94. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/vendor/topthink/framework/src/think/session/driver/File.php ( 6.27 KB )
  95. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/vendor/topthink/framework/src/think/contract/SessionHandlerInterface.php ( 0.87 KB )
  96. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/vendor/topthink/framework/src/think/session/Store.php ( 7.12 KB )
  97. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/vendor/topthink/framework/src/think/Route.php ( 23.73 KB )
  98. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/vendor/topthink/framework/src/think/route/RuleName.php ( 5.75 KB )
  99. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/vendor/topthink/framework/src/think/route/Domain.php ( 2.53 KB )
  100. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/vendor/topthink/framework/src/think/route/RuleGroup.php ( 22.43 KB )
  101. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/vendor/topthink/framework/src/think/route/Rule.php ( 26.95 KB )
  102. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/vendor/topthink/framework/src/think/route/RuleItem.php ( 9.78 KB )
  103. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/route/app.php ( 3.94 KB )
  104. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/vendor/topthink/framework/src/think/facade/Route.php ( 4.70 KB )
  105. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/vendor/topthink/framework/src/think/route/dispatch/Controller.php ( 4.74 KB )
  106. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/vendor/topthink/framework/src/think/route/Dispatch.php ( 10.44 KB )
  107. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/app/controller/Index.php ( 9.87 KB )
  108. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/app/BaseController.php ( 2.05 KB )
  109. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/vendor/topthink/think-orm/src/facade/Db.php ( 0.93 KB )
  110. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/vendor/topthink/think-orm/src/db/connector/Mysql.php ( 5.44 KB )
  111. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/vendor/topthink/think-orm/src/db/PDOConnection.php ( 52.47 KB )
  112. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/vendor/topthink/think-orm/src/db/Connection.php ( 8.39 KB )
  113. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/vendor/topthink/think-orm/src/db/ConnectionInterface.php ( 4.57 KB )
  114. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/vendor/topthink/think-orm/src/db/builder/Mysql.php ( 16.58 KB )
  115. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/vendor/topthink/think-orm/src/db/Builder.php ( 24.06 KB )
  116. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/vendor/topthink/think-orm/src/db/BaseBuilder.php ( 27.50 KB )
  117. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/vendor/topthink/think-orm/src/db/Query.php ( 15.71 KB )
  118. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/vendor/topthink/think-orm/src/db/BaseQuery.php ( 45.13 KB )
  119. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/vendor/topthink/think-orm/src/db/concern/TimeFieldQuery.php ( 7.43 KB )
  120. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/vendor/topthink/think-orm/src/db/concern/AggregateQuery.php ( 3.26 KB )
  121. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/vendor/topthink/think-orm/src/db/concern/ModelRelationQuery.php ( 20.07 KB )
  122. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/vendor/topthink/think-orm/src/db/concern/ParamsBind.php ( 3.66 KB )
  123. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/vendor/topthink/think-orm/src/db/concern/ResultOperation.php ( 7.01 KB )
  124. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/vendor/topthink/think-orm/src/db/concern/WhereQuery.php ( 19.37 KB )
  125. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/vendor/topthink/think-orm/src/db/concern/JoinAndViewQuery.php ( 7.11 KB )
  126. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/vendor/topthink/think-orm/src/db/concern/TableFieldInfo.php ( 2.63 KB )
  127. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/vendor/topthink/think-orm/src/db/concern/Transaction.php ( 2.77 KB )
  128. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/vendor/topthink/framework/src/think/log/driver/File.php ( 5.96 KB )
  129. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/vendor/topthink/framework/src/think/contract/LogHandlerInterface.php ( 0.86 KB )
  130. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/vendor/topthink/framework/src/think/log/Channel.php ( 3.89 KB )
  131. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/vendor/topthink/framework/src/think/event/LogRecord.php ( 1.02 KB )
  132. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/vendor/topthink/think-helper/src/Collection.php ( 16.47 KB )
  133. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/vendor/topthink/framework/src/think/facade/View.php ( 1.70 KB )
  134. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/vendor/topthink/framework/src/think/View.php ( 4.39 KB )
  135. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/app/controller/Es.php ( 3.30 KB )
  136. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/vendor/topthink/framework/src/think/Response.php ( 8.81 KB )
  137. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/vendor/topthink/framework/src/think/response/View.php ( 3.29 KB )
  138. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/vendor/topthink/framework/src/think/Cookie.php ( 6.06 KB )
  139. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/vendor/topthink/think-view/src/Think.php ( 8.38 KB )
  140. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/vendor/topthink/framework/src/think/contract/TemplateHandlerInterface.php ( 1.60 KB )
  141. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/vendor/topthink/think-template/src/Template.php ( 46.61 KB )
  142. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/vendor/topthink/think-template/src/template/driver/File.php ( 2.41 KB )
  143. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/vendor/topthink/think-template/src/template/contract/DriverInterface.php ( 0.86 KB )
  144. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/runtime/temp/c935550e3e8a3a4c27dd94e439343fdf.php ( 31.50 KB )
  145. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/vendor/topthink/think-trace/src/Html.php ( 4.42 KB )
  1. CONNECT:[ UseTime:0.000601s ] mysql:host=127.0.0.1;port=3306;dbname=wenku;charset=utf8mb4
  2. SHOW FULL COLUMNS FROM `fenlei` [ RunTime:0.000866s ]
  3. SELECT * FROM `fenlei` WHERE `fid` = 0 [ RunTime:0.000335s ]
  4. SELECT * FROM `fenlei` WHERE `fid` = 63 [ RunTime:0.000257s ]
  5. SHOW FULL COLUMNS FROM `set` [ RunTime:0.000488s ]
  6. SELECT * FROM `set` [ RunTime:0.000207s ]
  7. SHOW FULL COLUMNS FROM `article` [ RunTime:0.000544s ]
  8. SELECT * FROM `article` WHERE `id` = 784947 LIMIT 1 [ RunTime:0.000488s ]
  9. UPDATE `article` SET `lasttime` = 1782322507 WHERE `id` = 784947 [ RunTime:0.000741s ]
  10. SELECT * FROM `fenlei` WHERE `id` = 64 LIMIT 1 [ RunTime:0.000265s ]
  11. SELECT * FROM `article` WHERE `id` < 784947 ORDER BY `id` DESC LIMIT 1 [ RunTime:0.000428s ]
  12. SELECT * FROM `article` WHERE `id` > 784947 ORDER BY `id` ASC LIMIT 1 [ RunTime:0.000377s ]
  13. SELECT * FROM `article` WHERE `id` < 784947 ORDER BY `id` DESC LIMIT 10 [ RunTime:0.000613s ]
  14. SELECT * FROM `article` WHERE `id` < 784947 ORDER BY `id` DESC LIMIT 10,10 [ RunTime:0.002806s ]
  15. SELECT * FROM `article` WHERE `id` < 784947 ORDER BY `id` DESC LIMIT 20,10 [ RunTime:0.000785s ]
0.099730s