GMSB文章五:微生物组差异分析ANCOMBC-2

欢迎大家关注全网生信学习者系列:

  • WX公zhong号:生信学习者
  • Xiao hong书:生信学习者
  • 知hu:生信学习者
  • CDSN:生信学习者2

介绍

微生物的物种差异分析是一项关键的生物信息学任务,旨在识别不同生物群落或样本组之间在物种组成上的差异。这种分析对于理解微生物群落的结构、功能以及它们在不同环境或宿主状态下的作用至关重要。考虑到微生物数据的特定特点,例如稀疏性、样本间抽样分数的差异等,传统的统计方法可能不足以准确揭示组间的微生物差异。

ANCOMBC-2(Analysis of Compositions of Microbiomes with Bias Correction 2)算法是针对这些挑战而设计的,它提供了一种有效的方法来识别微生物组数据中的组间标记物。

加载R包

library(readr)
library(openxlsx)
library(tidyverse) 
library(ggpubr)
library(ANCOMBC)
library(SingleCellExperiment)
library(DT)
library(phyloseq)
# BiocManager::install("microbiome")
library(microbiome)
# BiocManager::install("mia")
library(mia)

导入数据

大家通过以下链接下载数据:

  • 百度网盘链接:https://pan.baidu.com/s/1fz5tWy4mpJ7nd6C260abtg
  • 提取码: 请关注WX公zhong号_生信学习者_后台发送 复现gmsb 获取提取码
# OTU table
otu_table <- read_tsv("./data/GMSB-data/otu-table.tsv")

# Taxonomy table
tax <- read_tsv("./data/GMSB-data/taxonomy.tsv")

# Metadata
meta_data <- read_csv("./data/GMSB-data/df_v1.csv")

数据预处理

  • Data cleaning:数据清洗

  • Phyloseq object:生成phyloseq数据对象

  • aggregate_taxa:累加genus/species丰度

  • TreeSummarizedExperiment:生成TreeSummarizedExperiment数据对象

# Data cleaning
## Generate a combined OTU/taxonomy table 
combined_table <- otu_table %>%
  dplyr::left_join(
    tax %>%
      dplyr::select(`Feature ID`, Taxon),
    by = join_by(`#OTU ID` == `Feature ID`)
  )

## Clean the otu table
otu_id <- otu_table$`#OTU ID`
otu_table <- data.frame(otu_table[, -1], check.names = FALSE, row.names = otu_id)

## Clean the taxonomy table
otu_id <- tax$`Feature ID`
tax <- data.frame(tax[, - c(1, 3)], row.names = otu_id)
tax <- tax %>% 
  tidyr::separate(col = Taxon, 
           into = c("Kingdom", "Phylum", "Class", "Order", 
                    "Family", "Genus", "Species"),
           sep = ";") %>%
  dplyr::rowwise() %>%
  dplyr::mutate_all(function(x) strsplit(x, "__")[[1]][2]) %>%
  dplyr::mutate(Species = ifelse(!is.na(Species) & !is.na(Genus),
                          paste(ifelse(strsplit(Genus, "")[[1]][1] == "[",
                                       strsplit(Genus, "")[[1]][2],
                                       strsplit(Genus, "")[[1]][1]), Species, sep = "."),
                          NA)) %>%
  dplyr::ungroup()
tax <- as.matrix(tax)
rownames(tax) <- otu_id
tax[tax == ""] <- NA

## Clean the metadata
meta_data$status <- factor(meta_data$status, levels = c("nc", "sc"))
meta_data$time2aids <- factor(meta_data$time2aids,
                             levels = c("never", "> 10 yrs",
                                        "5 - 10 yrs", "< 5 yrs"))

# Phyloseq object
OTU <- phyloseq::otu_table(otu_table, taxa_are_rows = TRUE)
META <- phyloseq::sample_data(meta_data)
phyloseq::sample_names(META) <- meta_data$sampleid
TAX <- phyloseq::tax_table(tax)
otu_data <- phyloseq::phyloseq(OTU, TAX, META)
otu_data <- phyloseq::subset_samples(otu_data, group1 != "missing")

# aggregate_taxa abundance
genus_data <- microbiome::aggregate_taxa(otu_data, "Genus")
species_data <- microbiome::aggregate_taxa(otu_data, "Species")

# TreeSummarizedExperiment object
tse <- mia::makeTreeSummarizedExperimentFromPhyloseq(otu_data)

tse
class: TreeSummarizedExperiment 
dim: 6111 241 
metadata(0):
assays(1): counts
rownames(6111): 000e1601e0051888d502cd6a535ecdda 0011d81f43ec49d21f2ab956ab12de2f ...
  fff3a05f150a52a2b6c238d2926a660d fffc6ea80dc6bb8cafacbab2d3b157b3
rowData names(7): Kingdom Phylum ... Genus Species
colnames(241): F-163 F-165 ... F-382 F-383
colData names(45): sampleid subjid ... hbv hcv
reducedDimNames(0):
mainExpName: NULL
altExpNames(0):
rowLinks: NULL
rowTree: NULL
colLinks: NULL
colTree: NULL

Primary group at species level

  1. Number of stool samples 241,

  2. Number of taxa 128.

使用 ANCOMBC-2算法对Primary group分组间微生物species水平进行差异分析。ANCOMBC-2(Analysis of Compositions of Microbiomes with Bias Correction 2)是一种用于微生物组数据差异丰度分析的方法。它的核心原理是估计未知的抽样分数并纠正由样本间抽样分数的差异引起的偏差。以下是关于ANCOMBC-2算法原理的详细解释:

  1. 抽样分数的概念:抽样分数定义为一个随机样本中分类单元的预期绝对丰度与其在生态系统单位体积样本来源中的绝对丰度的比率。由于不同样本可能有不同的抽样分数,这会导致观察到的计数在样本间不可比。
  2. 绝对丰度和相对丰度:绝对丰度数据使用线性回归框架建模,而相对丰度的变化会影响所有物种的相对丰度。ANCOMBC-2方法考虑到了这一点,并在分析中进行了适当的处理。
  3. 偏差校正:ANCOMBC-2算法估计并校正由样本间抽样分数差异引起的偏差。这包括样本库大小的标准化和微生物载量的差异考虑。
  4. 统计检验:ANCOMBC-2提供具有适当p值的统计有效检验,为每个分类单元的差异丰度提供置信区间,并控制错误发现速率(FDR),同时保持足够的统计检验力。
  5. 算法实现:ANCOMBC-2在计算上易于实现,并且可以应用于跨截面和重复测量数据。它支持两组比较、连续协变量测试和多组比较,包括全局检验、成对方向检验、Dunnett类型检验和趋势检验。
  6. 数据输入和输出:ANCOMBC-2需要输入数据集和相应的模型公式,输出包括log fold changes、标准误差、W统计量、p值和调整后的p值等,以及是否通过敏感性分析的标志。
  7. 结构零的处理:ANCOMBC-2可以识别和处理结构零,即在某些组中完全或几乎完全缺失的计数。这有助于更准确地识别差异丰度的分类单元。
if (file.exists("./data/GMSB-data/rds/primary_ancombc2_species.rds")) {
  primary_ancombc2_species_output <- readRDS("./data/GMSB-data/rds/primary_ancombc2_species.rds")
} else {
primary_ancombc2_species_output <- ancombc2(
  data = tse, 
  assay_name = "counts", 
  tax_level = "Species",
  fix_formula = "group1 + abx_use", 
  rand_formula = NULL,
  p_adj_method = "BY",
  prv_cut = 0.10, 
  lib_cut = 1000, 
  s0_perc = 0.05,
  group = "group1", 
  struc_zero = TRUE, 
  neg_lb = TRUE,
  alpha = 0.05, 
  n_cl = 8, 
  verbose = TRUE,
  global = TRUE, 
  pairwise = TRUE, 
  dunnet = TRUE,
  trend = TRUE,
  iter_control = list(tol = 1e-2, max_iter = 20, verbose = TRUE),
  em_control = list(tol = 1e-5, max_iter = 100),
  lme_control = lme4::lmerControl(),
  mdfdr_control = list(fwer_ctrl_method = "holm", B = 100),
  trend_control = list(contrast = list(matrix(c(1, 0, 0,
                                                -1, 1, 0,
                                                0, -1, 1),
                                              nrow = 3, byrow = TRUE),
                                       matrix(c(-1, 0, 0,
                                                1, -1, 0,
                                                0, 1, -1),
                                              nrow = 3, byrow = TRUE)),
                                       node = list(3, 3),
                                       solver = "ECOS",
                                       B = 1000))
if (!dir.exists("./data/GMSB-data/rds/")) {
  dir.create("./data/GMSB-data/rds/", recursive = TRUE)
}
saveRDS(primary_ancombc2_species_output, "./data/GMSB-data/rds/primary_ancombc2_species.rds")
}

结果:该运行时间较久,需要耐心等待。它的输出结果有:

  • “feature_table”:微生物相对丰度表。

  • “bias_correct_log_table”:校正后的微生物相对丰度表。

  • “ss_tab”:伪计数的灵敏度分数加到0表。

  • “zero_ind”:一个带有TRUE的逻辑数据框架,表示检测到分类单元在某些特定组中包含结构零。

  • “samp_frac”:在对数尺度(自然对数)中估计抽样分数的数值向量。

  • “delta_em”:通过E-M算法估计样本特异性偏差。

  • “delta_wls”:通过加权最小二乘(WLS)算法估计样本特异性偏差。

  • “res”:ANCOM-BC2初步结果。

  • “res_global”:包含在组中指定的变量的ANCOM-BC2全局测试结果。

  • “res_pair”:包含组中指定变量的ANCOM-BC2成对定向测试结果。

  • “res_dunn”:包含ANCOM-BC2 Dunnett对组中指定变量的测试结果类型。

  • “res_trend”:包含组中指定变量的ANCOM-BC2趋势测试结果。

Bias-corrected abundances

校正后的微生物相对丰度表

bias_correct_log_table <- primary_ancombc2_species_output$bias_correct_log_table %>%
  rownames_to_column("species")

head(bias_correct_log_table[, 1:6])
speciesF-163F-165F-167F-169F-171
1Family:ErysipelotrichaceaeNANA0.10357480.9222244NA
2Family:Ruminococcaceae0.49334030.01388809-1.1668849-0.4247566-0.1908075
3Species:P.distasonisNANANANANA
4Order:Clostridiales-2.77874780.35236697-0.59616250.4586303-0.2076693
5Genus:AcidaminococcusNA0.93924557NANA-0.5058925
6Genus:DehalobacteriumNANANANANA

Structural zeros

检测到分类单元在某些特定组中包含结构零。

在微生物组数据分析中,“Structural zeros”(结构性零)是一个重要的概念,它指的是在某些样本中完全或几乎完全缺失的计数,这可能反映了样本中某些分类单元的真实生物学缺失,而不是由于技术或抽样误差造成的。结构性零与随机零(偶然由于抽样或测序深度不足而出现的零)不同,后者可能不代表实际的生物学状态。

结构性零的存在可能会对差异丰度分析产生显著影响,因为它们可能指示某些分类单元在特定条件下的存在或缺失,这对于理解微生物群落的生态和功能至关重要。然而,如果不正确地处理这些结构性零,可能会导致错误的生物学解释或分析结果。

tab_zero <- primary_ancombc2_species_output$zero_ind
zero_total <- rowSums(tab_zero[, -1])
idx <- which(!zero_total %in% c(0, 4))

df_zero <- tab_zero[idx, ] %>%
  pivot_longer(cols = -taxon, names_to = "group", values_to = "value")
df_zero$group <- recode(df_zero$group, 
                       `structural_zero (group1 = g1)` = "G1",
                       `structural_zero (group1 = g2)` = "G2",
                       `structural_zero (group1 = g3)` = "G3",
                       `structural_zero (group1 = g4)` = "G4")

df_zero %>% ggplot(aes(x = taxon, y = group, fill = value)) +
  geom_tile(color = "white") +
  scale_fill_manual(name = "Absence", values = c("blue", "red")) +
  theme_minimal() +
  labs(x = NULL, y = NULL) +
  theme(axis.text.x = element_text(angle = 45, hjust = 1))

结果:可以看到不同微生物在不同分组的结构零是不一样的。

ANCOM-BC2 trend test

ANCOM-BC2初步结果:

  • lfc: log fold changes obtained from the ANCOM-BC2 log-linear (natural log) model.

  • se: standard errors (SEs) of lfc.

  • W: test statistics. W = lfc/se.

  • p: p-values. P-values are obtained from two-sided Z-test using the test statistic W.

  • q: adjusted p-values. Adjusted p-values are obtained by applying p_adj_method to p.

  • diff: TRUE if the taxon is significant (has q less than alpha).

  • passed_ss: TRUE if the taxon passed the sensitivity analysis, i.e., adding different pseudo-counts to 0s would not change the results.

#| warning: false
#| message: false

res_trend <- primary_ancombc2_species_output$res_trend %>%
  dplyr::rowwise() %>%
  dplyr::filter(grepl("Species:", taxon)|grepl("Genus:", taxon)) %>%
  dplyr::mutate(taxon = ifelse(grepl("Genus:", taxon), 
                        paste(strsplit(taxon, ":")[[1]][2], "spp."),
                        strsplit(taxon, ":")[[1]][2])) %>%
  dplyr::ungroup() %>%
  dplyr::filter(p_val < 0.05) %>%
  dplyr::arrange(taxon)

# addWorksheet(wb, "group_species")
# writeData(wb, "group_species", res_trend)

df_fig_group <- res_trend %>%
  dplyr::transmute(taxon, 
            fc2 = round(exp(lfc_group1g2), 2), 
            fc3 = round(exp(lfc_group1g3), 2),
            fc4 = round(exp(lfc_group1g4), 2),
            p_val, q_val, passed_ss) %>%
  tidyr::pivot_longer(fc2:fc4, names_to = "group", values_to = "value") %>%
  dplyr::mutate(color = ifelse(q_val < 0.05, "seagreen", "black")) %>%
  dplyr::arrange(desc(color))
df_fig_group$group <- recode(df_fig_group$group, `fc2` = "G2", 
                            `fc3` = "G3", `fc4` = "G4")

head(df_fig_group[, 1:6])
taxonp_valq_valpassed_ssgroupvalue
B.uniformis00FALSEG20.80
B.uniformis00FALSEG30.41
B.uniformis00FALSEG40.35
Bacteroides spp.00FALSEG20.71
Bacteroides spp.00FALSEG30.52
Bacteroides spp.00FALSEG40.25

结果G1组作为Reference group进行多组ANCOMBC-2分析。

HIV-1 infection status at species level

使用ANCOMBC-2算法对HIV-1 infection status分组间微生物species水平进行差异分析。

if (file.exists("./data/GMSB-data/rds/status_ancombc2_species.rds")) {
  status_ancombc2_species_output <- readRDS("./data/GMSB-data/rds/status_ancombc2_species.rds")
} else {

set.seed(123)
status_ancombc2_species_output <- ancombc2(
  data = tse, 
  assay_name = "counts", 
  tax_level = "Species",
  fix_formula = "status + abx_use", 
  rand_formula = NULL,
  p_adj_method = "BY", 
  prv_cut = 0.10, 
  lib_cut = 1000, 
  s0_perc = 0.05,
  group = "status", 
  struc_zero = TRUE, 
  neg_lb = TRUE,
  alpha = 0.05, 
  n_cl = 4, 
  verbose = TRUE)

if (!dir.exists("./data/GMSB-data/rds/")) {
  dir.create("./data/GMSB-data/rds/", recursive = TRUE)
}
saveRDS(status_ancombc2_species_output, "./data/GMSB-data/rds/status_ancombc2_species.rds")
}

ANCOM-BC2 trend test

ANCOM-BC2初步结果:

  • lfc: log fold changes obtained from the ANCOM-BC2 log-linear (natural log) model.

  • se: standard errors (SEs) of lfc.

  • W: test statistics. W = lfc/se.

  • p: p-values. P-values are obtained from two-sided Z-test using the test statistic W.

  • q: adjusted p-values. Adjusted p-values are obtained by applying p_adj_method to p.

  • diff: TRUE if the taxon is significant (has q less than alpha).

  • passed_ss: TRUE if the taxon passed the sensitivity analysis, i.e., adding different pseudo-counts to 0s would not change the results.

res_prim <- status_ancombc2_species_output$res %>%
  dplyr::rowwise() %>%
  dplyr::filter(grepl("Species:", taxon)|grepl("Genus:", taxon)) %>%
  dplyr::mutate(taxon = ifelse(grepl("Genus:", taxon), 
                        paste(strsplit(taxon, ":")[[1]][2], "spp."),
                        strsplit(taxon, ":")[[1]][2])) %>%
  dplyr::ungroup() %>%
  dplyr::filter(p_statussc < 0.05) %>%
  dplyr::arrange(taxon)

# addWorksheet(wb, "status_species")
# writeData(wb, "status_species", res_prim)

df_fig_status <- res_prim %>%
  dplyr::transmute(taxon, 
            group = "Case - Ctrl",
            value = round(exp(lfc_statussc), 2), # exp 函数用于计算自然指数函数的值
            p_statussc, q_statussc, passed_ss_statussc) %>%
  dplyr::mutate(color = ifelse(q_statussc < 0.05, "seagreen", "black")) %>%
  dplyr::arrange(desc(color))

head(df_fig_status[, 1:6])
taxongroupvaluep_statusscq_statusscpassed_ss_statussc
B.caccaeCase - Ctrl0.601.368037e-040.0087267603TRUE
B.eggerthiiCase - Ctrl0.533.197272e-060.0004079102FALSE
C.spiroformeCase - Ctrl1.788.546400e-060.0009086300FALSE
Dehalobacterium spp.Case - Ctrl1.623.399664e-050.0027108225FALSE
E.cylindroidesCase - Ctrl0.576.152982e-050.0043611222FALSE
Methanosphaera spp.Case - Ctrl0.502.197275e-060.0003504125FALSE

可视化

对上述两个差异分析的ANCOM-BC2 trend test进行可视化。比较两者共有的微生物在两亚组分析的结果。

# Overlapped taxa
set1 <- base::sort(base::intersect(unique(df_fig_group$taxon), unique(df_fig_status$taxon)))
# Unique taxa
set2 <- base::sort(base::setdiff(unique(df_fig_group$taxon), set1))
set3 <- base::sort(base::setdiff(unique(df_fig_status$taxon), set1))

# ANCOM-BC2 trend test results by group
df_fig_group$taxon <- factor(df_fig_group$taxon, levels = c(set1, set2))
distinct_df <- df_fig_group %>% 
  dplyr::select(taxon, color) %>% 
  dplyr::distinct()
tax_color <- setNames(distinct_df$color, distinct_df$taxon)[c(set1, set2)]

cell_max <- max(abs(df_fig_group$value))
fig_group_species <- df_fig_group %>%
  ggplot(aes(x = group, y = taxon, fill = value)) +
  geom_tile(color = "black") +
  scale_fill_gradient2(low = "blue", high = "red", mid = "white",
                       na.value = "white", midpoint = 1,
                       limit = c(0, cell_max), name = NULL) +
  geom_text(aes(group, taxon, label = value), color = "black", size = 4) +
  labs(x = NULL, y = NULL, title = NULL) +
  theme_minimal() +
  theme(plot.title = element_text(hjust = 0.5),
        axis.text.y = element_text(color = tax_color))

# ANCOM-BC2 trend test results by status
df_fig_status$taxon <- factor(df_fig_status$taxon, levels = c(set1, set3))
distinct_df <- df_fig_status %>% 
  dplyr::select(taxon, color) %>% 
  dplyr::distinct()
tax_color <- setNames(distinct_df$color, distinct_df$taxon)[c(set1, set3)]

cell_max <- max(abs(df_fig_status$value))
fig_status_species <- df_fig_status %>%
  ggplot(aes(x = group, y = taxon, fill = value)) +
  geom_tile(color = "black") +
  scale_fill_gradient2(low = "blue", high = "red", mid = "white",
                       na.value = "white", midpoint = 1,
                       limit = c(0, cell_max), name = NULL) +
  geom_text(aes(group, taxon, label = value), color = "black", size = 4) +
  labs(x = NULL, y = NULL, title = NULL) +
  theme_minimal() +
  theme(plot.title = element_text(hjust = 0.5),
        axis.text.y = element_text(color = tax_color))

p_da <- ggarrange(
  fig_group_species, fig_status_species, 
  ncol = 2, nrow = 1,
  common.legend = TRUE, 
  legend = "right", labels = c("a", "b"))

p_da

结果:物种在两个分类变量的差异分析结果。

  • 数字表示lfc的自然指数函数的值;

  • 颜色表示数字从0到2.5渐变,0到1表示lfc是负数,大于1表示lfc是正数;

  • 0到1下调,大于1表示上调。

保存数据

# if (!dir.exists("./data/GMSB-data/rds/")) {
#   dir.create("./data/GMSB-data/rds/", recursive = TRUE)
# }
# 
# saveRDS(primary_ancombc2_species_output, "./data/GMSB-data/rds/primary_ancombc2_species.rds")
# saveRDS(status_ancombc2_species_output, "./data/GMSB-data/rds/status_ancombc2_species.rds")

本文来自互联网用户投稿,该文观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如若转载,请注明出处:http://www.mfbz.cn/a/750372.html

如若内容造成侵权/违法违规/事实不符,请联系我们进行投诉反馈qq邮箱809451989@qq.com,一经查实,立即删除!

相关文章

讯飞星火企业智能体平台正式发布,打造每个岗位专属AI助手

大力财经 | 发布 讯飞星火V4.0来了&#xff01;6月27日&#xff0c;科大讯飞在北京发布讯飞星火大模型V4.0及相关落地应用。讯飞星火V4.0七大核心能力全面提升&#xff0c;整体超越GPT-4 Turbo&#xff0c;在8个国际主流测试集中排名第一&#xff0c;国内大模型全面领先。 大模…

代码随想录算法训练营第三十六天|62.不同路径、 63. 不同路径 II、343.整数拆分(可跳过)、96.不同的二叉搜索树(可跳过)

62.不同路径 题目链接&#xff1a;62.不同路径 文档讲解&#xff1a;代码随想录 状态&#xff1a;还行 思路&#xff1a;当前状态的只有可能是从上面或者左边过来的&#xff0c;所以 dp[i][j] dp[i-1] dp[j-1] 题解&#xff1a; public int uniquePaths(int m, int n) {if (…

入职必备-mac下载安装maven

1、Maven 下载 1.1、官网下载安装包 官网下载链接 历史版本下载&#xff1a; Index of /dist/maven/maven-3/3.8.8/binaries 注意 .bash_profile 文件中的符号可能会影响配置 1.2、解压文件 2、Maven 环境配置 2.1、Java JDK 依赖 配置 maven 环境变量需要先配置好 JDK …

Knife4j 2.2.X 版本 swagger彻底禁用

官方文档配置权限&#xff1a;https://doc.xiaominfo.com/v2/documentation/accessControl.html#_3-5-1-%E7%94%9F%E4%BA%A7%E7%8E%AF%E5%A2%83%E5%B1%8F%E8%94%BD%E8%B5%84%E6%BA%90 通常有时候我们碰到的问题如下&#xff1a; 在开发Knife4j功能时,同很多开发者经常讨论的问…

检索增强生成RAG系列2--提高RAG准确度的关键点

上一章讲到了RAG的基本流程&#xff0c;但是如果只是完成一个基本流程&#xff0c;想要在商业上使用还是不行&#xff0c;因为正常商业上的使用其准确度至少有个90%甚至更高。那么如何提高RAG的准确度&#xff0c;那么需要看看RAG有哪些关键点。 目录 1 RAG结构图2 文档处理3 …

群晖系统百度网盘套件卸载之后无法再次安装 ContainerManager项目无法删除

前言 最近重新组了个NAS&#xff0c;在套件迁移的时候遇到个头疼的问题。在用矿神的百度网盘在迁移的时候出错了&#xff0c;于是我自己删掉baiduapp得容器和镜像然后卸载套件。不知道中间出了啥问题&#xff0c;套件是已经卸载了&#xff0c;但是群晖ContainerManager套件中的…

企业有必要安装数据文件加密软件吗?哇!这么多好处

需要的 一、查看以下分析&#xff0c;便能得出结论 安全防护提升&#xff1a;禁止拷贝、打印、截屏等&#xff0c;还能够设置文件的浏览次数、有效期&#xff0c;提供多层次的文档保护措施。 核心机密保护&#xff1a;企业的核心机密文件、技术资料、客户资料等重要信息是公…

RabbitMQ安装部署

简介 RabbitMQ一款知名的开源消息队列系统&#xff0c;为企业提供消息的发布、订阅、点对点传输等消息服务。 RabbitMQ在企业开发中十分常见&#xff0c;课程为大家演示快速搭建RabbitMQ环境。 安装 rabbitmq在yum仓库中的版本比较老&#xff0c;所以我们需要手动构建yum仓库…

学习分享-Redis 中的压缩列表 (Ziplist)

Redis 中的压缩列表 (Ziplist) 压缩列表 (Ziplist) 是 Redis 内部用于优化小规模数据存储的一种紧凑数据结构。它设计用于高效地存储包含少量元素的列表、哈希表或有序集合&#xff0c;以减少内存占用和提高性能。以下是压缩列表的详细介绍&#xff1a; 1. 压缩列表的结构 压…

mac 安装mysql启动报错 ERROR!The server quit without update PID file

发现问题&#xff1a; mac安装mysql初次启动报错&#xff1a; 一般出现这种问题&#xff0c;大多是文件夹权限&#xff0c;或者以前安装mysql卸载不干净导致。首先需要先确定问题出在哪&#xff1f;根据提示我们可以打开mysql的启动目录&#xff0c;查看启动日志。 问题解决&a…

逆变器使用手册:类型详解、安装要点与维护须知

逆变器随着可再生能源的兴起和移动电源需求的激增已成为连接直流电与交流电世界的桥梁&#xff0c;其重要性不言而喻。无论是太阳能发电系统的高效利用&#xff0c;还是汽车、游艇等移动设备的电力供应&#xff0c;逆变器都扮演着关键角色。然而&#xff0c;正确的使用方法是确…

Linux运维:MySQL数据库(1)

1.信息与数据&#xff1a; 数据是信息的载体&#xff0c;信息是数据的内涵。数据库就是存储数据的仓库&#xff0c;并长期存储在计算机磁盘中&#xff0c;可由多个用户和应用程序共享的数据集合&#xff0c;就是数据库。 2.数据库中的数据的特点&#xff1a; 2.1.数据是按照某…

ai assistant 是所有编程助手中最出色的一款 ?

ai assistant激活成功后&#xff0c;如图 ai assistant渠道&#xff1a;https://web.52shizhan.cn/activity/ai-assistant 在去年五月份的 Google I/O 2023 上&#xff0c;Google 为 Android Studio 推出了 Studio Bot 功能&#xff0c;使用了谷歌编码基础模型 Codey,Codey 是…

element-plus 日期选择添加确定按钮

需求&#xff1a;选择日期后&#xff0c;点击确定按钮关闭面板 思路&#xff1a; 使用shortcuts自定义确定和取消按钮选择日期后使用handleOpen()强制开启面板点击确定后使用handleClose()关闭面板 <template><el-date-pickerref"pickerRef"v-model"…

【Linux】对共享库加载问题的深入理解——基本原理概述

原理概述 【linux】详解——库-CSDN博客 共享库被加载后&#xff0c;系统会为该共享库创建一个结构&#xff0c;这个结构体中的字段描述了库的各种属性。在内存中可能会加载很多库&#xff0c;每一个库都用一个结构体描述。把这些结构体用一些数据结构管理起来&#xff0c;系…

盲盒小程序:线上盲盒发展机遇

盲盒已经成为了当下年轻人的潮玩首选方式。随着二次元、影视行业的快速发展&#xff0c;给盲盒提供了各种新的发展方向&#xff0c;盲盒商品也在不断创新&#xff0c;种类丰富多样。玩家在拆盲盒时随机获得某一商品&#xff0c;具有惊喜感和刺激性。 目前&#xff0c;随着小程…

深入剖析Tomcat(十、十一) 详解StandardWrapper

《深入剖析Tomcat》第十章介绍了Tomcat的安全机制&#xff0c;主要就是对servlet的访问做安全验证&#xff0c;如果Tomcat中设置了某些servlet需要指定角色的用户才能访问&#xff0c;则需要客户端进行登录验证&#xff0c;如果用户名密码正确并且该用户拥有该角色的话&#xf…

Vite 动态导入警告问题解决方案

如上图我要实现从后台获取权限菜单并动态导入进行渲染 但由于 vite 暂时不支持这种导入方式 图中也给出了提示 本人也是这么去做了 但并没什么卵用 后来参考了 vite 的 import.meta.glob 这种方式 我在处理菜单权限控制的菜单里进行了如下操作&#xff1a; …

数据转换 | Matlab基于R对称点模式(symmetric dot pattern, SDP)一维序列信号转二维时频图象

目录 效果分析基本介绍程序设计参考资料获取方式 效果分析 基本介绍 数据转换 | Matlab基于R对称点模式(symmetric dot pattern, SDP)一维序列信号转二维时频图象 SDP常被用于信号分析和深度学习模式识别。 SDP是一种基于极坐标系的图像表示方法&#xff0c;可以直接将原始信…

版本控制工具-git的基本使用

目录 前言一、git简介二、git工作流程三、安装git并配置git3.1 配置用户名和邮箱3.2 配置.gitignore文件&#xff08;可选&#xff09;3.3 配置ssh key&#xff08;可选&#xff09; 四、git基本命令4.1 创建本地仓库4.2 将工作区内容提交到本地仓库4.3 将本地仓库内容推送到远…