SkillAgentSearch skills...

LDBlockShow

LDBlockShow: a fast and convenient tool for visualizing linkage disequilibrium and haplotype blocks based on VCF files

Install / Use

/learn @BGI-shenzhen/LDBlockShow
About this skill

Quality Score

0/100

Supported Platforms

Universal

README

LDBlockShow

1 Introduction

<b>LDBlockShow</b> is a fast and effective tool to generate linkage disequilibrium (LD) heatmap from VCF files. It is more time and memory saving than other current tools. LDBlockShow can generate the plots of LD heatmap and interested statistics or annotation results simultaneously. In addition, it also supports subgroup analysis.

The <i><b>LDBlockShow article</b></i> has been published in <b> briefings in bioinformatics</b>, please cited this article if possible

PMID: 33126247             DOI:10.1093/bib/bbaa227

2 Download and Install


The <b>new version</b> will be updated and maintained in <b>hewm2008/LDBlockShow</b>, please click below website to download the latest version </br><p align="center"><b>hewm2008/LDBlockShow</b></p>

<b> 2.1. linux/MaxOS    Download</b>

</br> <b>2.2 Pre-install</b> </br> LDblockshow is for Linux/Unix/macOS only. Before installing, please make sure the following pre-requirements are ready to use. </br> 1) g++ : g++ with --std=c++11 > 4.8+ is recommended </br> 2) zlib : zlib > 1.2.3 is recommended </br> 3) Perl : The SVG.pm in Perl should be installed. LDBlockShow uses this module to plot figures. We have provided a built-in SVG module in the package.

</br> <b>2.3 Install</b> </br> Users can install it with the following options: </br> Option 1:

<pre> git clone https://github.com/hewm2008/LDBlockShow.git cd LDBlockShow ; chmod 755 configure ; ./configure; make; mv LDBlockShow bin/; # [rm *.o] </pre>

</br>Note: If failed to link,try to <b>re-install</b> the libraries zlib

</br>Option 2:

<pre> tar -zxvf LDBlockShowXXX.tar.gz cd LDBlockShowXXX; cd src; sh make.sh ## Linux : [ make ; make clean ] ../bin/LDBlockShow </pre>

Note: For <b>macOS</b>, if plink doesn't work, please re-download mac plinks and put it into the directory [LDBlockShowXXX/bin] </br>Note: If failed to link,try to <b>re-install</b> the libraries zlib

3 Parameter description


</br><b>3.1 LDBlockShow</b> </br><b>3.1.1 Main parameter</b>

 ./bin/LDBlockShow

        Usage: LDBlockShow  -InVCF  <in.vcf.gz>  -OutPut <outPrefix>  -Region  chr1:10000-20000

                -InVCF          <str>     Input SNP VCF Format
                -OutPut         <str>     OutPut File of LD Blocks
                -Region         <str>     In One Region to show LD info svg Figure


                -SeleVar        <int>     Select statistic for deal. 1: D' 2: R^2 3/4: Both [1]
                -SubPop         <str>     SubGroup Sample File List[ALLsample]
                -BlockType      <int>     method to detect Block [beta] [1]
                                           1. Block by PLINK (Gabriel method)
                                           2. Solid Spine of LD RR/D' 3. Blockcut with self-defined RR/D'
                                           4. FixBlock by input blocks files 5. No Block

                -InGWAS         <str>     InPut GWAS Pvalue File(chr site Pvalue)
                -InGFF          <str>     InPut GFF3 file to show Gene CDS and name

                -BlockCut       <float>   'Strong LD' cutoff and ratio for BlockType3[0.85:0.90]
                -FixBlock       <str>      Input fixed block region
                -MerMinSNPNum   <int>      merger color grids when SNPnumber over N[50]

                -help                      Show more Parameters and help [hewm2008 v1.41]

</br> Details for above parameters:

<pre> -InVCF The input file in VCF format -OutPut The output file directory and output file name prefix (e.g., /path/pop1) -Region The defined region to show the LD heatmap (format: chr:start:end) -SeleVar The LD measurement (1: D' 2: R^2 3/4: Both R^2 and D'), the default is 1. -SubPop A sample list for subgroup analysis -BlockType The definition of blocks. The default 1 is called by PLINK1 to generate the block defined by Gabriel et al.2. Solid spine of LD3 is also supported [2]. Users can also define their own cutoff of r2 and D' for blocks [3] combined with the option of "-BlockCut" or supply their own block region definition [4] combined with the option of "-FixBlock". 5 can be used as input if users prefer to not show the block region. -InGWAS The statistics file (e.g., association statistics, but other values such as Tajima's D can also be accepted) for generate plot together with the LD plot. File formatted as: [chr position Pvalue] -InGFF Input GFF3 format file for genomic region annotation -BlockCut For block type 3, the defined cutoff for strong LD, and the ratio of strong LD SNP in one block. Default is 0.85:0.9. That's, if the user chose D' in the -SeleVar option, then in one block, the ratio of SNP pairs with' over 0.85 is 0.9. -FixBlock For block type 4, users can use this option to supply a self-defined block region. The file contains three columns, including chromosome, block region start position, and block region end position. -MerMinSNPNum The minimum SNP number to merge color grids with the same color. Default is 50. Details please see Fig 1 in this manual. -help Show more parameters </pre>

</br><b>3.1.2 Other parameters</b>

./bin/LDBlockShow -h
		 
		 Para [-i] is show for [-InVCF], Para [-o] is show for [-OutPut], Para [-r] is show for [-Region]

		-InGenotype    <str>     InPut SNP Genotype Format
		-InPlink       <str>     InPut Plink [bed+bim+fam] or [ped+map] file prefix
		
		-MAF           <float>   Min minor allele frequency filter [0.05]
		-Miss          <float>   Max ratio of miss allele filter [0.25]
		-HWE           <float>   Exact test of Hardy-Weinberg Equilibrium for SNP Pvalue[0]
		-Het           <float>   Max ratio of het allele filter [1.0]

		-TagSNPCut     <float>  'Strong LD' cutoff for TagSNP [0.80]
		-OutPng                  convert svg 2 png file
		-OutPdf                  convert svg 2 pdf file

</br> Details for above parameters:

<pre> -InGenotype Input file in genotype format. -InPlink The prefix of input file in PLINK format. -MAF Filter SNPs with low minor allele frequency (default <0.05) -HWE Filter SNPs with low Exact test of Hardy-Weinberg Equilibrium Pvalue (default <0) -Het Filter SNPs with high heterozygosis ratio (default >1.0) -Miss Filter SNPs with high missing rate (default >0.25) -TagSNPCut The LD cutoff for selecting tag SNPs. Default is 0.8. -OutPng Convert the SVG file to PNG file -OutPdf Convert SVG file to Pdf file. </pre>

<b>Note:</b> If users failed to open small SVG files, please use the "-Outpdf" option to use the PDF file. For large SVG files, "-OutPng" can be used to get a relatively small figure file.

</br><b>3.2 ShowLDSVG</b> </br>This program is designed for users to optimize the figure (e.g., change colors) generated by LDBlockShow. </br><b>3.2.1 Brief parameters</b>

./bin/ShowLDSVG
		Options
		 -InPreFix    <s> :  InPut Region LD Result Frefix
		 -OutPut      <s> :  OutPut svg file result

		 -help            :  Show more help with more parameter
<pre> -InPreFix The prefix of input file (i.e., the output file of LDBlockShow) -OutPut The out file (svg, png and pdf format plot files) -help More parameters in detail </pre>

</br><b>3.2.2 Detail parameters</b>

./bin/ShowLDSVG   -h
		 -InGWAS      <s>     : InPut GWAS Pvalue File(chr site Pvalue)
		 -NoLogP              : Do not get the log Pvalue
		 -Cutline     <f>     : show the cut off line of Pvalue
		 -TopSite     <n>     : InPut the Special Site as the peak site(chr:pos)
		 -PointSize   <n>     : set the GWAS point size number
		 -SpeSNPName  <s>     : In File for Special SNP Name(chr site Name)
		 -ShowGWASSpeSNP      : show Special SNP Name in GWAS plot with [-SpeSNPName]

		 -InGFF       <s>     : InPut GFF3 file to show Gene CDS and name
		 -NoGeneName          : No show Gene name,only show stuct
		 -crGene      <s>     : InColor for Gene Stuct [CDS:Intron:UTR:Intergenic]
		                        default: [#e7298a:lightblue:#7570b3:#a6cee3]

		 -crBegin     <s>     : In Start Color RGB [255,255,255]
		 -crMiddle    <s>     : In Middle Color RGB [240,235,75]
		 -crEnd       <s>     : In End Color RGB [255,0,0]
		 -NumGradien  <s>     : In Number of gradien of color
		 -crTagSNP    <s>     : Color for TagSNP [231,138,195]

		 -CrGrid      <s>     : the color of grid edge [white]
		 -WidthGrid   <s>     : the edge-width of gird [1]
		 -NoGrid              : No Show the gird edge

		 -ShowNum             : Show the R^2/D' in the heatmap
		 -NoShowLDist   <n>   : NoShow long physical distance pairwise[1000000]
		 -MerMinSNPNum  <s>   : merge color grids when SNPnumber over N[50]

		 -OutPng              : convert svg 2 png file
		 -OutPdf              : convert svg 2 pdf file
		 -ResizeH             : resize image height; Width be resize in ratio[4096]

		 -MoreHelp           : Show some hidden para to adjust figure(less use)

</br> Details for above parameters:

<pre> -InGWAS The statistics file (e.g., association statistics, but other values such as Tajima's D can also be accepted) for generate plot together with the LD plot. File formatted as: [chr position Pvalue] -NoLogP By defaul

Related Skills

View on GitHub
GitHub Stars207
CategoryDevelopment
Updated16d ago
Forks44

Languages

Perl

Security Score

100/100

Audited on Mar 14, 2026

No findings