为什么越来越多宏基因组研究,开始绕不开 MSP?
MetaGEAR是一个基于Nextflow/NF-Core的宏基因组分析流程,能够简化从原始读取到功能性注释的微生物组宏基因组工作流程。几个流程的比较之前有分享过一张大佬总结的图片,当时不少同学反馈Nextflow虽然学习门槛高,但是相比snakemake等是真给力的(原话是“完爆”,不是一个体量的),因为水平有限,还没入门nextflow,所以没这个体会,不过对大家的高评价,我是深信不已的。今天就来看看这个流程,第一次知道这个流程是在这篇文献,研究的是微生物胶原酶活性。

流程包含质量控制、分类学分析、功能注释和基因中心分析工作流程处理宏基因组测序数据。每个工作流程都针对特定的分析目标设计,可以独立使用或组合使用,核心依赖 Java 17+、Nextflow 本身以及容器环境(如 Docker 或 Singularity)。前面的流程我们相对比较熟悉,基于reads有有参宏基因组分析,Kneaddata质控, MetaPhlAn物种分类, HUMAnN功能注释。

在这里插入图片描述发现相比其他流程,其特色是有基因分析(gene_analysis)——基于基因的分析工作流程,包括基因预测、功能注释、全基因组重建和分类,输出基因和蛋白质profile。应用的主要软件是megahit组装,prodigal基因预测,cdhit构建非冗余基因集,coverm基因丰度定量,interproscan功能注释(结构域),分析宏基因组物种泛基因组MSP (Metagenomic Species Pan-genome) 和MSP的gtdbtk物种注释。

nextflow/nf-core的安装这里相信不需要多说,官网都有的,支持conda/docker等各种版本,记得官方优先推荐docker等容器的方式的。这里以基因分析为例: 需要准备一个samplesheet.csv:
sample,fastq_1,fastq_2
SAMPLE1,sample1_R1.fastq.gz,sample1_R2.fastq.gz
SAMPLE2,sample2_R1.fastq.gz,sample2_R2.fastq.gz然后运行流程的命令就可以啦!
# 1. Download databases (run once)
metagear download_databases
# 2. Quality control
metagear qc_dna --input raw_samples.csv
# 3. Optional: Run microbial profiling first
metagear microbial_profiles --input qc_samples.csv
# 4. Gene-centric analysis
metagear gene_analysis --input qc_samples.csv
可以使用预览模式先测试下流程运行的步骤,如:metagear qc_dna --input samples.csv -preview
流程运行完成后会生成以下目录结构的综合基因分析结果:
outdir/
├── megahit/ # Assembly results (per sample)
│ ├── {sample}.contigs.fa # Assembled contigs
│ ├── {sample}.log # Assembly log files
│ └── {sample}.k{kmer}.fastg.gz # Assembly graph files
├── prodigal/ # Gene prediction results
│ ├── {sample}.fna.gz # Predicted nucleotide sequences
│ ├── {sample}.faa.gz # Predicted protein sequences
│ ├── {sample}.gff.gz # Gene annotation in GFF format
│ └── {sample}_all.txt.gz # Complete gene annotations
├── cdhit/ # Gene catalog construction
│ ├── merged_genes.nr_95_90.fa # Non-redundant gene catalog (95% similarity)
│ ├── merged_genes.nr_95_90.fa.clstr # Clustering information
│ └── protein_catalog.prot.faa # Protein catalog
├── coverm/ # Gene abundance quantification
│ ├── gene_abundance_count_merged.tsv # Raw read counts per gene
│ ├── gene_abundance_rpkm_merged.tsv # RPKM normalized abundances
│ ├── gene_abundance_tpm_merged.tsv # TPM normalized abundances
│ └── bwa_index/ # BWA alignment indices
├── interproscan/ # Functional annotation results
│ ├── protein_catalog.annotations.tsv # InterProScan annotations
│ └── protein_catalog.FG_IPS_Pfam.tsv # Functional group annotations
├── msp/ # Metagenomic Species Pan-genome (MSP) analysis
│ ├── msp_abundance.median.RPKM.txt # MSP abundance profiles
│ ├── all_msps.tsv # MSP definitions and gene content
│ ├── pangenome_sequences/ # MSP pangenome FASTA files
│ └── msp_metaphlan_LM.bestR2.txt # MSP-MetaPhlAn taxonomic mapping
├── gtdbtk/ # Taxonomic classification
│ ├── classify/ # GTDB-Tk classification results
│ ├── identify/ # Marker gene identification
│ └── align/ # Multiple sequence alignments
├── multiqc/ # Quality control and summary reports
│ ├── multiqc_report.html # Consolidated analysis report
│ ├── multiqc_data/ # Parsed statistics and data
│ └── multiqc_plots/ # Static plot images
└── pipeline_info/ # Pipeline execution metadata
├── execution_report.html # Nextflow execution report
├── execution_timeline.html # Processing timeline
└── execution_trace.txt # Resource usage tracking

流程将宏基因组数据从“单基因层面”提升到“物种泛基因组层面”,能够更稳定、可重复地刻画真实微生物物种及其功能潜力。相比单基因丰度,MSP 基于协同变化基因簇重建物种单位,有效降低组装和注释偏差,为跨队列比较、物种功能推断及疾病关联分析提供更可靠的生物学解释框架。 伙伴们,对这个流程怎么看,给出你的看法吧!