Skip to content

Commit 1c358da

Browse files
committed
code
1 parent bcf4bd0 commit 1c358da

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

78 files changed

+14221
-1
lines changed

INSTALL.md

Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
2+
<b>VCF2Dis: an ultra-fast and efficient tool to calculate pairwise genetic distance and construct population phylogeny from VCF files</b>
3+
4+
### INSTALL
5+
We provide three alternative options to install `VCF2Dis`
6+
7+
#### Option 1 : Local compilation
8+
------------
9+
Just `sh make.sh` to compile `VCF2Dis`. The executable `VCF2Dis` can be found in the folder of <b>`bin/VCF2Dis`</b>
10+
</br> For <b>Linux /Unix </b> and <b>macOS</b>
11+
<pre>
12+
tar -zxvf VCF2DisXXX.tar.gz # if Link do not work ,Try <b>re-install</b> [zlib]library
13+
cd VCF2DisXXX; # [zlib] and copy them to the library Dir
14+
sh make.sh; # VCF2Dis-xx/src/include/zlib
15+
./bin/VCF2Dis
16+
</pre>
17+
**Note:** If fail to link,try to <b>re-install</b> the libraries [**_zlib_**](https://zlib.net/)
18+
</br>**Note:**: [R](https://www.r-project.org/) with [ape](https://cran.r-project.org/web/packages/ape/index.html), [dplyr](https://cran.r-project.org/web/packages/dplyr/index.html) and [ggtree](https://www.bioconductor.org/packages/release/bioc/html/ggtree.html) packages are recommended
19+
20+
21+
#### Option 2: Docker container
22+
You can use Docker to install and run VCF2Dis, following the steps listed below:
23+
1. **Install Docker**: Ensure Docker is installed on your system. If not, please install it by following the [Docker Official Documentation](https://docs.docker.com/get-docker/).
24+
2. **Pull the Docker Image**: Use the following command to pull the VCF2Dis Docker image from the Alibaba Cloud Container Registry:
25+
```sh
26+
docker pull registry.cn-shenzhen.aliyuncs.com/knight134/vcf2dis:v1.53e ## Docker image from the Alibaba Cloud Container Registry
27+
docker run -it --rm vcf2dis:v1.53e VCF2Dis ## After pulling the image, you can run the containe
28+
```
29+
#### Option 3: Singularity container
30+
1. **Install Singularity**: Ensure Singularity is installed on your system. If not, you can install it by following the [Singularity Official Documentation](https://sylabs.io/guides/3.5/user-guide/).
31+
2. **Build the SIF File**: Use the following command to build a Singularity image file (SIF) from the Docker image:
32+
```sh
33+
singularity build vcf2dis_1.53e.sif docker://registry.cn-shenzhen.aliyuncs.com/knight134/vcf2dis:v1.53e # you can download follows
34+
singularity exec vcf2dis_1.53e.sif VCF2Dis
35+
```
36+
3. **Download the SIF File**:Alternatively, you can download the SIF file directly from the github: [vcf2dis_1.53e.sif](https://github.com/hewm2008/VCF2Dis/releases/download/v1.53/vcf2dis_1.53e.sif). Once downloaded, you can run it using Singularity.
37+
38+
### Contact
39+
------------
40+
- [:email:](https://github.com/hewm2008/VCF2Dis) hewm2008@gmail.com / hewm2008@qq.com
41+
- join the<b><i> QQ Group : 125293663</b></i>
42+
43+
44+
######################swimming in the sky and flying in the sea ########################### ##
45+

Install.NJ.cn.md

Lines changed: 56 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,56 @@
1+
2+
## 安装 PHYLIPNEW 记要
3+
4+
要运行 PHYLIPNEW-3.69.650/bin/fconsense 须先安装<b> PHYLIPNEW-3.69.660 </b>,其步骤如下:
5+
6+
### 第一步:下载
7+
cd /public/software/
8+
wget ftp://emboss.open-bio.org/pub/EMBOSS/EMBOSS-6.6.0.tar.gz ./
9+
wget ftp://emboss.open-bio.org/pub/EMBOSS/PHYLIPNEW-3.69.660.tar.gz ./
10+
#在 ftp://emboss.open-bio.org/pub/EMBOSS/ 里面下载好 EMBOSS-6.6.0.tar.gz 和 PHYLIPNEW-3.69.660.tar.gz
11+
12+
13+
### 第二步:安装EMBOSS ;
14+
tar -xzvf EMBOSS-6.6.0.tar.gz # 解压
15+
cd EMBOSS-6.6.0/
16+
./configure --prefix=/public/software/EMBOSS-6.6.0 # [prefix后面接的目录必须是你自己有权限的目录]
17+
make
18+
19+
## 其中这个软件依赖一些其他包,若系统没有就先安装之,在这打个比如,如报了少 缺libmysqlclient.so.*的库的错
20+
## 那么请安装之,若有root: 运行: yum install mysql ; yum install mysql-devel即可以安装,若没有到自行安装
21+
## 现别人已经安装好在这了: /gss1/App_dir/mariadb-10.1.26/bin/mysql 在 /gss1/App_dir/mariadb-10.1.26/lib/里面存在
22+
## libmysqlclient.*的,即可以直接加载环境变量就行 export LD_LIBRARY_PATH ;
23+
## 在这运行: export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/gss1/App_dir/mariadb-10.1.26/lib/ [可写入: ~/.bashrc 里面,免得每次都要重新加载]
24+
25+
make install
26+
27+
### 第三步:安装好EMBOSS以后,安装PHYLIBNEW
28+
29+
tar -xzvf PHYLIPNEW-3.69.660.tar.gz # 解压
30+
cp -r /public/software/EMBOSS-6.6.0/lib/* /public/software/PHYLIPNEW-3.69.650/lib/
31+
cp -r /public/software/EMBOSS-6.6.0/include/* /public/software/PHYLIPNEW-3.69.650/include/
32+
# 在安装好EMBOSS后 即在 EMBOSS-6.6.0 里面有include 和lib 目录;
33+
# 将EMBOSS-6.60下include里的头文件和lib文件夹copy到 PHYLIBNEW下 [or 加载一些变量 export LD_LIBRARY_PATH ; CFLAGS="-I$prefix/include" ; LDFLAGS="-L$prefix/ ]
34+
./configure --prefix=/public/software/PHYLIPNEW-3.69.650
35+
make
36+
37+
## 其中这个软件依赖一些其他包,若系统没有就先安装之,在这打个比例 报了少 LibXaw.soXX的库
38+
## 在 https://www.x.org/archive/individual/lib/ 下载里面的 libXaw-1.0.13.tar.gz ;
39+
## #解压 libXaw-1.0.13.tar.gz,./configure --prefix=/public/software/PHYLIPNEW-3.69.650 (可以这个目录,免得又重新加载环境变量就行
40+
## export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/public/software/PHYLIPNEW-3.69.650/lib;
41+
## make ;make install;
42+
43+
make install
44+
45+
### 第四步: 安装后好在 PHYLIPNEW-3.69.660/bin/fconsense
46+
#但运行会报 少了在EMBOSS目录少了 fneighbor.acd 的文件
47+
# 那么在 PHYLIPNEW-3.69.660 找之(find ./ -name fneighbor.acd),正常当在HYLIPNEW-3.69.650/emboss_acd下
48+
mkdir -p /public/software/EMBOSS-6.6.0/embassy/phylipnew/ ;
49+
ln -s /public/software/PHYLIPNEW-3.69.650/emboss_acd /public/software/EMBOSS-6.6.0/embassy/phylipnew/emboss_acd
50+
# 创建目录 并链接 or 可以copy
51+
52+
### 其它信息
53+
若后面再运行报少了xxx.so\.*的话 把这个xxx.so.\*的路径找到并记录下来,直接在 \~/.bashrc加载之,export LD_LIBRARY_PATH=$export LD_LIBRARY_PATH:库所在路径
54+
如把 <b><i>export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/public/software/PHYLIPNEW-3.69.650/lib; </i></b>写进 <b>\~/.bashrc</b>
55+
免得每次要用都重新加载之
56+

Install.NJ.en.md

Lines changed: 57 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,57 @@
1+
# Install PHYLIPNEW
2+
3+
</br>To run <b>PHYLIPNEW-3.69.650/bin/fconsense</b> software, <b>PHYLIPNEW-3.69.660</b> must be installed first, and the steps are as follows:
4+
5+
### Step 1: Download
6+
cd /public/software/
7+
wget ftp://emboss.open-bio.org/pub/EMBOSS/EMBOSS-6.6.0.tar.gz ./
8+
wget ftp://emboss.open-bio.org/pub/EMBOSS/PHYLIPNEW-3.69.660.tar.gz ./
9+
#Download EMBOSS-6.6.0.tar.gz and PHYLIPNEW-3.69.660.tar.gz at [ftp://emboss.open-bio.org/pub/EMBOSS/]
10+
11+
12+
### Step 2: Install EMBOSS
13+
tar -xzvf EMBOSS-6.6.0.tar.gz # Unzip package
14+
cd EMBOSS-6.6.0
15+
./configure --prefix=/public/software/EMBOSS-6.6.0 #[You must have read and write permissions for this Dir]
16+
make
17+
18+
## This software depends on some other packages. If your system does not have one, install them first. For example, Error with a report missing [libmysqlclient.so.*] library
19+
## then please install it, if you have root: Run:[ yum install mysql; yum install mysql-devel ] can be installed, if not, install it yourself.
20+
## Now others have installed mysqlclient here: [/gss1/App_dir/mariadb-10.1.26/bin/mysql] and [libmysqlclient.*] exists in [/gss1/App_dir/mariadb-10.1.26/lib/]
21+
## That is, you can load the environment variables directly [export LD_LIBRARY_PATH]
22+
## Run here: [export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/gss1/App_dir/mariadb-10.1.26/lib/] [Writable: ~/.bashrc inside, so as not to reload every time]
23+
24+
make install
25+
26+
27+
### Step 3: After installing EMBOSS, install PHYLIBNEW
28+
tar -xzvf PHYLIPNEW-3.69.660.tar.gz #Unzip package
29+
cp -r /public/software/EMBOSS-6.6.0/lib/* /public/software/PHYLIPNEW-3.69.650/lib/
30+
cp -r /public/software/EMBOSS-6.6.0/include/* /public/software/PHYLIPNEW-3.69.650/include/
31+
# After successfully installing EMBOSS, there are [include] and [lib] directories in EMBOSS-6.6.0;
32+
# Copy the header file and lib folder in include under EMBOSS-6.60 to PHYLIBNEW [or load some variables :export LD_LIBRARY_PATH; CFLAGS="-I$prefix/include"; LDFLAGS="-L$prefix/]
33+
./configure --prefix=/public/software/PHYLIPNEW-3.69.650
34+
make
35+
36+
## This software depends on some other library. If the system does not have it, install them first. Let’s make an analogy here. reporting less [LibXaw.so.*] library.
37+
## Then download [libXaw-1.0.13.tar.gz] in [https://www.x.org/archive/individual/lib/];
38+
## tar -zxvf libXaw-1.0.13.tar.gz; cd libXaw-1.0.13 ; ./configure --prefix=/public/software/PHYLIPNEW-3.69.650 (This directory can be used to avoid reloading environment variables)
39+
## export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/public/software/PHYLIPNEW-3.69.650/lib;
40+
## make ;make install;
41+
42+
make install
43+
44+
45+
### Step 4: Run PHYLIPNEW-3.69.660/bin/fconsense
46+
# After installation, the first run [PHYLIPNEW-3.69.660/bin/fconsense] will report that the [fneighbor.acd] file is missing in the EMBOSS directory.
47+
# Then find it in PHYLIPNEW-3.69.660 Dir [find ./ -name fneighbor.acd], normally it will under Dir [HYLIPNEW-3.69.650/emboss_acd]
48+
mkdir -p /public/software/EMBOSS-6.6.0/embassy/phylipnew/ ;
49+
ln -s /public/software/PHYLIPNEW-3.69.650/emboss_acd /public/software/EMBOSS-6.6.0/embassy/phylipnew/emboss_acd
50+
# Create directory and link or copy
51+
52+
53+
### Other Info:
54+
</br> If [xxx.so.\*] missing is report after running the software later, find and record the path of this [xxx.so.\*] and load it directly in \~/.bashrc, <i> export LD_LIBRARY_PATH=$export LD_LIBRARY_PATH:/Dir_Path_For_Thislibrary_located/;</i>
55+
</br> such writing info <b><i>export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/public/software/PHYLIPNEW-3.69.650/lib;</i></b> to file <b>[\~/.bashrc]</b>; Avoid reloading every time you use it
56+
57+

LICENSE

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
MIT License
2+
3+
Copyright (c) 2018 BGI-shenzhen
4+
5+
Permission is hereby granted, free of charge, to any person obtaining a copy
6+
of this software and associated documentation files (the "Software"), to deal
7+
in the Software without restriction, including without limitation the rights
8+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9+
copies of the Software, and to permit persons to whom the Software is
10+
furnished to do so, subject to the following conditions:
11+
12+
The above copyright notice and this permission notice shall be included in all
13+
copies or substantial portions of the Software.
14+
15+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21+
SOFTWARE.

OtherWay2ConstructTree.md

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
# VCF2Dis
2+
<b>VCF2Dis: A new simple and efficient software to calculate p-distance matrix and tree based Variant Call Format</b>
3+
4+
5+
</br> if you can't get the <b>p_dis.nwk</b> tree file but had the p-distance matrix [p_dis.mat], here are the 3 Other ways to get the tree file.
6+
</br>
7+
</br>
8+
9+
10+
#### Method 1 : online WebSite
11+
Choose one of **A/B**
12+
</br> **A.** Upload the web [fneighbor(http://emboss.toulouse.inra.fr/cgi-bin/emboss/fneighbor?_pref_hide_optional=1)](http://emboss.toulouse.inra.fr/cgi-bin/emboss/fneighbor?_pref_hide_optional=1) ,the Click the **Run fneighbor** bottom . then you can get the output file **datafile.treefile**
13+
</br> **B.** Upload the <b>p_dis.mat</b> to the website [fastme (http://www.atgc-montpellier.fr/fastme/)](http://www.atgc-montpellier.fr/fastme/), select <b>Data Type</b> to the <b>Distance matrix </b>,Click the bottom twist <b>execute & email results</b>. you will get the <b>p_dis_mat_fastme-tree.nwk</b> , and Email not mandatory;
14+
15+
Run MEGA # The MEGA (http://www.megasoftware.net/) was used to present the phylogenetic tree based this file [p_dis_mat_fastme-tree.nwk]
16+
17+
#### Method 2 : PHYLIPNEW
18+
Use the PHYLIPNEW to construct nj-tree
19+
</br>How to Install PHYLIPNEW please Click on <b> [here](https://github.com/hewm2008/VCF2Dis/blob/main/Install.NJ.en.md)</b> or Click on <b>[here(Chinese)](https://github.com/hewm2008/VCF2Dis/blob/main/Install.NJ.cn.md)</b>
20+
```
21+
# 3.1 Run PHYLIP
22+
# After p_distance done , software PHYLIPNEW 3.69 (http://evolution.genetics.washington.edu/phylip.html) ,with neighbor-joining method can was used to construct the phylogenetic tree on the basis of this p_distance matrix;
23+
24+
PHYLIPNEW-3.69.650/bin/fneighbor -datafile p_dis.matrix -outfile tree.out1.txt -matrixtype s -treetype n -outtreefile tree.out2.tre
25+
26+
# 3.2 Run MEGA
27+
# The MEGA6 (http://www.megasoftware.net/) was used to present the phylogenetic tree based this file [tree.out2.tre]
28+
```
29+
30+
#### Method 3 : R script with ape
31+
```
32+
# 3.1 Run R Rscript
33+
Rscript exemple1/vistreecode.r p_dis.mat
34+
# 3.2 Run MEGA
35+
# The MEGA6 (http://www.megasoftware.net/) was used to present the phylogenetic tree based this file [tree.out2.tre]
36+
```
37+
38+
* 4) you can see the neighbor-joining tree and save it as PDF format
39+
40+
######################swimming in the sky and flying in the sea ########################### ##

0 commit comments

Comments
 (0)