一个计算成对snp距离的简单程序包
pairsnp的Python项目详细描述
pairsnp python
安装
这是在西蒙·弗罗斯特的帮助下编写的python3版本的pairsnp
git clone https://github.com/gtonkinhill/pairsnp-python
cd pairsnp-python
pip3 install .
快速启动
python版本可以从python解释器运行,如下所示
from pairsnp import calculate_snp_matrix, calculate_distance_matrix
sparse_matrix, consensus, seq_names = calculate_snp_matrix(fasta.file.name)
d = calculate_distance_matrix(sparse_matrix, consensus, "dist", False)
或者,如果使用pip安装,则可以在命令行中使用它作为
pairsnp -f /path/to/msa.fasta -o /path/to/output.csv
其他选项包括
Program to calculate pairwise SNP distance and similarity matrices.
optional arguments:
-h, --help show this help message and exit
-t {sim,dist}, --type {sim,dist}
either sim (similarity) or dist (distance) (default).
-n, --inc_n flag to indicate differences to gaps should be
counted.
-f FILENAME, --file FILENAME
location of a multiple sequence alignment. Currently
only DNA alignments are supported.
-z, --zipped Alignment is gzipped.
-c, --csv Output csv-delimited table (default tsv).
-o OUTPUT, --out OUTPUT
location of output file.