Data and code for "A Linear Time Solution to the Labeled Robinson-Foulds Distance Problem"
收藏资源简介:
Data and code for "A Linear Time Solution to the Labeled Robinson-Foulds Distance Problem" Samuel Briand, Christophe Dessimoz, Nadia El-Mabrouk, Yannis Nevers Experimental data The __ALF\_Output__ directory contains the results obtained from ALF with parameters specified in the paper, as well as additional files generated in the downstream analysis (see below) The __Partitions__ directory contains one directory by partitioning of the 100 species from ALF in nested sets. Each contains three folder and a file. The summary.txt directory report which family are part of the nested set. The Allfamily directory contains the FASTA file of the 100 gene families generated with ALF, with only the species selected in the partition. The Aln directory contains the MSA for each gene family as generated with MAFFT with the selected species set The FTree directory contains the gene tree for each family as generated with FastTree with the selected species set The __Script__ directory containst the files used to generated the data from the ALF directory, as well as downstream analysis To reproduce the results start by runing __rewriteSeq.py__ , which is used for generating the Partitions. It takes as parameter the ALF directory, the directory in which you wish to generate the partitions, and the path to ALF's genomes FASTA files. If the partition file already exist, you can use the -r option to redo the random selection, otherwise it will generate file for the previous random selection. Example command : python rewriteSeq.py -i ../ALF\_output -o ../Partitions -g ../ALF\_output/DB Then, by runing __rewriteTree.py__ you will generated the reference trees used for the RF comparisons, as well as species tree used for each partitions. It takes as parameters the ALF directory , the Partitions directory and the species file of the partitions used to create the reference tree (smallest of all partitions) Example command : python rewriteTree.py -i ../ALF\_output/ -p ../Partitions/ -s ../Partitions/Part10/summary.txt Then, the script __launchFastTree.sh__ will, by partitions, generate a MSA using MAFFT and a phylogenetic tree using FastTree. It takes as parameter the Partitions directory and the number of the identifier of the partition for which you wish tu run it. Notes that the afforementionned software need to be installed before hand. Example command: bash launchFastTree.sh ../Partitions 10 Finally, the __LRFAnalysis.ipynb__ file is a Jupyer Notebook used to run downstream analysis of RF and LRF on the different Partitions, including figure generation. Path to the data directory can be set in the 4th block of the Notebook. Comparison of RF, LRF, and ELRF The code to compare is provided as a Jupyter notebook in the directory "Comparison with RF and ELRF". The input NOX4 family from Ensembl version 99 is provided. The output figures are provided as PDF but they can be regenerated by running the notebook.
本数据集配套代码与数据对应论文《带标记罗宾逊-福尔兹(Labeled Robinson-Foulds)距离问题的线性时间解法》,作者为Samuel Briand、Christophe Dessimoz、Nadia El-Mabrouk及Yannis Nevers。 ## 实验数据 「ALF_Output」目录包含基于论文中指定参数运行ALF所得的结果,以及下游分析中生成的附加文件(详见下文)。 「Partitions」目录包含针对ALF生成的100个物种的嵌套集合划分所对应的子目录,每个子目录均包含三个文件夹与一个文件。其中summary.txt文件会记录该嵌套集合中包含的基因家族信息。Allfamily文件夹内存储了由ALF生成的100个基因家族的FASTA文件,仅包含该划分中选定的物种。Aln文件夹存储了每个基因家族的多序列比对(Multiple Sequence Alignment, MSA)结果,该结果由MAFFT基于选定的物种集生成。FTree文件夹存储了每个基因家族的基因树,该结果由FastTree基于选定的物种集生成。 「Script」目录包含用于从ALF目录生成数据,以及开展下游分析的相关文件。 ### 结果复现流程 1. 运行rewriteSeq.py:该脚本用于生成划分集合,其接收的参数依次为ALF目录、用于存储划分结果的目录,以及ALF基因组FASTA文件的路径。若划分文件已存在,可通过-r参数重新执行随机选择流程;若未指定该参数,则会基于此前的随机选择结果生成文件。示例命令:python rewriteSeq.py -i ../ALF_output -o ../Partitions -g ../ALF_output/DB 2. 运行rewriteTree.py:该脚本会生成用于罗宾逊-福尔兹(Robinson-Foulds, RF)距离比对的参考树,以及每个划分对应的物种树。其接收的参数依次为ALF目录、划分集合目录,以及用于创建参考树的划分的物种文件(即所有划分中规模最小的那个)。示例命令:python rewriteTree.py -i ../ALF_output/ -p ../Partitions/ -s ../Partitions/Part10/summary.txt 3. 随后运行launchFastTree.sh脚本:该脚本会针对每个划分,先通过MAFFT生成多序列比对文件,再通过FastTree生成系统发育树。其接收的参数依次为划分集合目录,以及待运行的划分标识符编号。请注意,需提前安装上述提及的所有软件。示例命令:bash launchFastTree.sh ../Partitions 10 4. 最后,LRFAnalysis.ipynb是一个Jupyter Notebook,用于对不同划分下的RF距离、LRF距离开展下游分析,包括图表生成。可在该Notebook的第4个代码块中设置数据目录的路径。 ## RF、LRF与ELRF比对 用于开展比对的代码以Jupyter Notebook形式存储于「Comparison with RF and ELRF」目录中。该目录提供了来自Ensembl版本99的输入NOX4基因家族数据。结果图表以PDF格式提供,也可通过运行该Notebook重新生成。



