1、准备物种蛋白文件

统一后缀为(.pep/.fasta/.fa/.faa/.fas 均是Orthofinder可以识别的后缀)

注意:如果基因组具有可变剪切转录本,需要提取最长转录本进行(TBtools可)

物种选择:自养>寄生>共生

2、运行主程序

orthofinder -f test/  -M msa   -a 40

参数说明

#-a 分析所用到的线程
#-f 指定文件夹(存放我们所有物种的序列) 
#-M 推断基因树的方法 可选:msa 和 dendroblast (默认 dendroblast)
dendroblast不依赖多序列比对,基于Blast评分方法聚类的方法,更节约时间。但相对多序列比对(msa)还是准确性差一点。
#-S 序列比对的方法 可选:Diamond 和 blast (默认Diamond)
diamond相对于blast比对速度更快,准确性也有保证
#-T 建树的方法 可选:fasttree, raxml, raxml-ng, iqtree (默认fasttree)
建树的精准度/耗时 raxml > iqtree > fastree; 
如果追求更高的精准度可以使用 iqtree。

3、结果文件

Orthogroups.GeneCount.tsv #每个物种在每个同源基因集合所具有的基因数目
Orthogroups.tsv #每个物种在每个同源基因集合的基因ID
Orthogroups_UnassignedGenes.tsv #每个物种在每个同源基因集合的基因ID(包括未分配同源组的基因)
Orthogroups.txt #OrthoMCL的输出格式
Orthogroups_SingleCopyOrthologues.txt #单拷贝的同源基因集合
Single_Copy_Orthologue_Sequences #该文件包含了单拷贝的直系同源基因核酸序列。后续需要若需要构建时间分歧进化树,使用的序列。
MultipleSequenceAlignments #多序列比对的文件。
WorkingDirectory #运行程序的文件夹。
Species_Tree #物种树文件夹
Orthogroups_for_concatenated_alignment.txt #构建进化树所用到的同源基因集合
SpeciesTree_rooted.txt #有根物种树文件
SpeciesTree_rooted_node_labels.txt

Statistics_PerSpecies.tsv统计了每个物种的特异正交群及特异基因。

删除物种&添加物种

vi SpeciesIDs.txt

0: Apatococcus_fuscideae_filter.fasta
1: Apatococcus_lobatus_filter.fasta
2: Asterochloris_glomerata_filter.fasta
3: Auxenochlorella_protothecoides_filter.fasta
4: Chlorella_variabilis_filter.fasta
5: Coccomyxa_pringsheimii_filter.fasta
6: Coccomyxa_subellipsoidea_filter.fasta
7: Elliptochloris_bilobata_filter.fasta
8: Helicosporidium_sp_filter.fasta
9: Micractinium_conductrix_filter.fasta
10: Myrmecia_bisecta_filter.fasta
11: Picochlorum_sp_filter.fasta
12: Prototheca_wickerhamii_filter.fasta
13: Symbiochloris_irregularis_filter.fasta
14: Trebouxia_sp._C0004_filter.fasta
15: Trebouxia_sp._C0005_filter.fasta
16: Trebouxia_sp._C0006_filter.fasta

想删除哪个注释掉就行,再运行:

orthofinder -b WorkingDirectory

如果想增加额外的物种进行分析,可以按照如下方式运行

orthofinder -b WorkingDirectory -f new_fasta_directory

查找物种特异性基因

#得到正交群信息
(head -n 1 as.txt && awk 'NR>1 && $10 > 0 { 
    flag=1; 
    for(i=2; i<=16; i++) { 
        if(i != 10 && $i != 0) { 
            flag=0; 
            break;
        } 
    } 
    if(flag) print 
}' Orthogroups.tsv > species_specific_OGs.tsv
##根据正交群信息提取基因
grep -f as.txt ./Orthogroups/Orthogroups.txt |sed "s/ /\\n/g"  | sort | uniq > Species-specific.gene