### Install Missing Library Dependencies Source: https://github.com/hewm2008/vcf2dis/blob/main/Install.NJ.en.md Example of installing and configuring a missing library dependency like libXaw. ```bash tar -zxvf libXaw-1.0.13.tar.gz; cd libXaw-1.0.13 ; ./configure --prefix=/public/software/PHYLIPNEW-3.69.650 export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/public/software/PHYLIPNEW-3.69.650/lib; make ;make install; ``` -------------------------------- ### Install and run VCF2Dis with Docker Source: https://github.com/hewm2008/vcf2dis/blob/main/INSTALL.md Pull the image from the Alibaba Cloud Container Registry and execute the tool. ```bash docker pull registry.cn-shenzhen.aliyuncs.com/knight134/vcf2dis:v1.53e ## Docker image from the Alibaba Cloud Container Registry docker run -it --rm vcf2dis:v1.53e VCF2Dis ## After pulling the image, you can run the containe ``` -------------------------------- ### Install EMBOSS Source: https://github.com/hewm2008/vcf2dis/blob/main/Install.NJ.en.md Unpack and compile the EMBOSS package. Ensure read/write permissions are set for the installation directory. ```bash tar -xzvf EMBOSS-6.6.0.tar.gz # Unzip package cd EMBOSS-6.6.0 ./configure --prefix=/public/software/EMBOSS-6.6.0 #[You must have read and write permissions for this Dir] make make install ``` -------------------------------- ### Install PHYLIPNEW Source: https://github.com/hewm2008/vcf2dis/blob/main/Install.NJ.en.md Unpack PHYLIPNEW, copy required EMBOSS headers and libraries, and compile the software. ```bash tar -xzvf PHYLIPNEW-3.69.660.tar.gz #Unzip package cp -r /public/software/EMBOSS-6.6.0/lib/* /public/software/PHYLIPNEW-3.69.650/lib/ cp -r /public/software/EMBOSS-6.6.0/include/* /public/software/PHYLIPNEW-3.69.650/include/ ./configure --prefix=/public/software/PHYLIPNEW-3.69.650 make make install ``` -------------------------------- ### Configure PHYLIPNEW Runtime Links Source: https://github.com/hewm2008/vcf2dis/blob/main/Install.NJ.en.md Create necessary symbolic links for the fneighbor.acd file to ensure the software runs correctly. ```bash mkdir -p /public/software/EMBOSS-6.6.0/embassy/phylipnew/ ; ln -s /public/software/PHYLIPNEW-3.69.650/emboss_acd /public/software/EMBOSS-6.6.0/embassy/phylipnew/emboss_acd ``` -------------------------------- ### Build and run VCF2Dis with Singularity Source: https://github.com/hewm2008/vcf2dis/blob/main/INSTALL.md Build a SIF file from the Docker image or run the tool using a pre-built container. ```bash singularity build vcf2dis_1.53e.sif docker://registry.cn-shenzhen.aliyuncs.com/knight134/vcf2dis:v1.53e # you can download follows singularity exec vcf2dis_1.53e.sif VCF2Dis ``` -------------------------------- ### Download PHYLIPNEW and EMBOSS Source: https://github.com/hewm2008/vcf2dis/blob/main/Install.NJ.en.md Download the required source tarballs from the EMBOSS FTP server. ```bash cd /public/software/ wget ftp://emboss.open-bio.org/pub/EMBOSS/EMBOSS-6.6.0.tar.gz ./ wget ftp://emboss.open-bio.org/pub/EMBOSS/PHYLIPNEW-3.69.660.tar.gz ./ ``` -------------------------------- ### VCF2Dis command-line parameters Source: https://github.com/hewm2008/vcf2dis/blob/main/README.md Overview of input and output parameters for running VCF2Dis. ```text Usage: VCF2Dis -InPut -OutPut -InPut Input one or muti GATK VCF genotype File -OutPut OutPut Sample p-Distance matrix -InList Input GATK muti-chr VCF Path List -SubPop SubGroup SampleList of VCF File [ALLsample] -Rand Probability (0-1] for each site to join Calculation [1] -help Show more help [hewm2008 v1.56s] ``` ```text -InFormat Input File is [VCF/FA/PHY] Format,defaut: [VCF] -InSampleGroup InFile of sample Group info,format(sample groupA) -TreeMethod Construct Tree Method,1:NJ-tree 2:UPGMA-tree [1] -KeepMF Keep the Middle File diff & Use matrix ``` -------------------------------- ### Compile VCF2Dis locally Source: https://github.com/hewm2008/vcf2dis/blob/main/INSTALL.md Extract the source archive and run the make script to build the executable. ```bash tar -zxvf VCF2DisXXX.tar.gz # if Link do not work ,Try re-install [zlib]library cd VCF2DisXXX; # [zlib] and copy them to the library Dir sh make.sh; # VCF2Dis-xx/src/include/zlib ./bin/VCF2Dis ``` -------------------------------- ### Configure Environment Variables for Dependencies Source: https://github.com/hewm2008/vcf2dis/blob/main/Install.NJ.en.md Set the LD_LIBRARY_PATH to include necessary library directories, such as those for MySQL clients. ```bash export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/gss1/App_dir/mariadb-10.1.26/lib/ ``` -------------------------------- ### Run bootstrap sampling for NJ trees Source: https://github.com/hewm2008/vcf2dis/blob/main/README.md Performs multiple iterations of tree construction using random site sampling to support bootstrap analysis. ```bash #!/bin/bash NN=100 if [ "$#" -eq 1 ]; then NN=$1 fi for X in $(seq 1 $NN) do ./bin/VCF2Dis -InPut in.vcf.gz -OutPut p_dis_${X}.mat -Rand 0.25 # PHYLIPNEW-3.69.650/bin/fneighbor -datafile p_dis_${X}.mat -outfile tree.out1_${X}.txt -matrixtype s -treetype n -outtreefile tree.out2_${X}.tre done ``` -------------------------------- ### Run VCF2Dis command Source: https://github.com/hewm2008/vcf2dis/blob/main/README.md Executes the VCF2Dis tool with input VCF, subpopulation list, and sample group information. ```bash VCF2Dis -i ALL.chr*.genotypes.vcf.gz -SubPop subsample203.list -InSampleGroup pop.info ``` -------------------------------- ### Construct NJ-tree using PHYLIPNEW Source: https://github.com/hewm2008/vcf2dis/blob/main/OtherWay2ConstructTree.md Uses the fneighbor tool from the PHYLIPNEW package to compute a neighbor-joining tree from a distance matrix. ```bash # 3.1 Run PHYLIP # 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; PHYLIPNEW-3.69.650/bin/fneighbor -datafile p_dis.matrix -outfile tree.out1.txt -matrixtype s -treetype n -outtreefile tree.out2.tre # 3.2 Run MEGA # The MEGA6 (http://www.megasoftware.net/) was used to present the phylogenetic tree based this file [tree.out2.tre] ``` -------------------------------- ### Persist Environment Variables Source: https://github.com/hewm2008/vcf2dis/blob/main/Install.NJ.en.md Add library paths to ~/.bashrc to avoid manual configuration on every session. ```bash export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/public/software/PHYLIPNEW-3.69.650/lib; ``` -------------------------------- ### Generate p-distance matrix and NJ tree Source: https://github.com/hewm2008/vcf2dis/blob/main/README.md Commands to generate distance matrices and trees from VCF or FASTA inputs, including sub-grouping and population-based analysis. ```bash # 1.1) To new all the sample p_distance matrix and newick tree based VCF, run VCF2Dis directly ./bin/VCF2Dis -InPut in.vcf.gz -OutPut p_dis.mat # ./bin/VCF2Dis -InPut in.fa.gz -OutPut p_dis.mat -InFormat FA # 1.2) To new sub group sample p_distance matrix and and newick tree ; put their sample name into File sample.list ./bin/VCF2Dis -InPut chr1.vcf.gz chr2.vcf.gz -OutPut p_dis.mat -SubPop sample.list # 1.3) To new group tree p_distance matrix and and newick tree ; pop.info file Format[sample group] (v1.56) ./bin/VCF2Dis -InPut in.vcf.gz -OutPut p_dis.mat -InSampleGroup pop.info ``` -------------------------------- ### Merge and calculate bootstrap tree Source: https://github.com/hewm2008/vcf2dis/blob/main/README.md Aggregates multiple tree files and calculates bootstrap support values using PHYLIPNEW and a helper Perl script. ```bash #!/bin/bash NN=100 if [ "$#" -eq 1 ]; then NN=$1 fi cat p_*.nwk > alltree_merge.tre # cat tree*.tre > alltree_merge.tre PHYLIPNEW-3.69.650/bin/fconsense -intreefile alltree_merge.tre -outfile out -treeprint Y perl ./bin/percentageboostrapTree.pl alltree_merge.treefile $NN Final_boostrap.tre # NN is the input number ``` -------------------------------- ### Construct NJ-tree using R and ape Source: https://github.com/hewm2008/vcf2dis/blob/main/OtherWay2ConstructTree.md Executes an R script to process the distance matrix and generate a tree file. ```bash # 3.1 Run R Rscript Rscript exemple1/vistreecode.r p_dis.mat # 3.2 Run MEGA # The MEGA6 (http://www.megasoftware.net/) was used to present the phylogenetic tree based this file [tree.out2.tre] ``` -------------------------------- ### P-distance calculation logic Source: https://github.com/hewm2008/vcf2dis/blob/main/README.md Defines the distance d(l)_ij between two individuals based on their genotypes at position l. ```text d(l)_ij=0.0 if the genotypes of the two individuals were AA and AA; d(l)_ij=0.5 if the genotypes of the two individuals were AA and AC; d(l)_ij=0.0 if the genotypes of the two individuals were AC and AC; d(l)_ij=1.0 if the genotypes of the two individuals were AA and CC; d(l)_ij=0.0 if the genotypes of the two individuals were CC and CC; ``` === COMPLETE CONTENT === This response contains all available snippets from this library. No additional content exists. Do not make further requests.