{"id":12,"date":"2021-09-21T16:10:36","date_gmt":"2021-09-21T07:10:36","guid":{"rendered":"http:\/\/w3.genome.med.kyoto-u.ac.jp\/HLA-HD\/?page_id=12"},"modified":"2025-03-10T11:53:49","modified_gmt":"2025-03-10T02:53:49","slug":"%e3%83%86%e3%82%b9%e3%83%88","status":"publish","type":"page","link":"https:\/\/w3.genome.med.kyoto-u.ac.jp\/HLA-HD\/","title":{"rendered":"WELCOME TO HLA-HD!"},"content":{"rendered":"\n<p><\/p>\n\n\n<h1>What is HLA-HD?<\/h1>\n<p style=\"padding-left: 30px;\">HLA-HD (HLA typing from High-quality Dictionary) can accurately determine HLA alleles with 6-digit precision from NGS data (fastq format).\u00a0RNA-Seq data can also be applied.<br \/><i class=\"\"><\/i><\/p>\n<p style=\"padding-left: 30px;\"><i class=\"\">Note that HLA-HD is freely available for academic purposes, non-commercial research purposes and six months limited term evaluation purpose to enter into commercial licenses.\u00a0<i>Kyoto University reserves its right to modify terms and restrictions at any time.<\/i><\/i><\/p>\n<h2>News<\/h2>\n<p style=\"padding-left: 30px;\"><span style=\"color: black;\">October 7, 2024 : Version 1.7.1 was released <\/span><\/p>\n<p style=\"padding-left: 30px;\"><span style=\"color: black;\">February 9, 2023 : Version 1.7.0 was released <\/span><\/p>\n<p style=\"padding-left: 30px;\"><span style=\"color: black;\">January 5, 2023 : Version 1.6.1 was released <\/span><\/p>\n<p style=\"padding-left: 30px;\"><span style=\"color: black;\">December 27, 2022 : Version 1.6.0 was released <\/span><\/p>\n<p style=\"padding-left: 30px;\"><span style=\"color: black;\">June 22, 2022 : Version 1.5.0 was released <\/span><\/p>\n<p style=\"padding-left: 30px;\"><span style=\"color: black;\">March 10, 2021 : Version 1.4.0 was released <\/span><\/p>\n<p style=\"padding-left: 30px;\"><span style=\"color: black;\">July 22, 2020 : Version 1.3.0 was released <\/span><\/p>\n<p style=\"padding-left: 30px;\"><span style=\"color: black;\">June 25, 2018 : Version 1.2.0 was released <\/span><\/p>\n<h2>Released versions<\/h2>\n<p style=\"padding-left: 30px;\">#Version 1.7.1 October 7, 2024<\/p>\n<p style=\"padding-left: 30px;\"><span style=\"color: #ff0000;\">When you use HLA-HD in the current IPD-IMGT\/HLA database, update the HLA-HD after version 1.7.1 and re-create HLA allele dictionary.\u00a0<\/span><\/p>\n<p style=\"padding-left: 30px;\">#Version 1.7.0 February 9, 2023<br \/>Implement extraction step of read pairs overlap with HLA exons (increase mapping speed for WGS data).<br \/>Increase of the calculation speed in hla_est (same speed with version 1.5.0).<br \/>Reduction of the required memory usage (approximately 75% memory size down compared with version 1.6.1).<\/p>\n<p style=\"padding-left: 30px;\">#Version 1.6.1 January 5, 2023<br \/>HLA-DQB2 were added in IMGT\/HLA after release 3.50.0. Therefore, decoy sequences of HLA-DQB2 have been removed from update.dictionary.sh.<br \/>Deal with result of \u201cnot consistent\u201d (output as \u201cNot typed\u201d).<\/p>\n<p style=\"padding-left: 30px;\">#Version 1.6.0 December 27, 2022<br \/>Improve read score calculation using intron mapped reads (this change increases memory and computational costs).<br \/>Prepare HLA_gene.split.txt file (HLA_gene.split.3.50.0.txt) suit to new IMGT\/HLA database (release 3.50.0).<br \/>Decoy sequences (HLA-DQB2 and HLA-U) are added in update.dictionary.sh.<\/p>\n<p style=\"padding-left: 30px;\">#Version 1.5.0 June 22, 2022<br \/>Fixed a bug when calculating the score due to rounding error.<\/p>\n<p style=\"padding-left: 30px;\">#Version 1.4.0 March 10, 2021<br \/>Accelerate typing speed and memory reduction in hla_est.<\/p>\n<p style=\"padding-left: 30px;\">#Version 1.3.0 July 22, 2020<br \/>Accelerate typing speed of hla_est.<br \/>Correct bug in pm_extract (Avoid bug of &#8220;Couldn&#8217;t read result file&#8221; is occurred in typing result).<\/p>\n<p style=\"padding-left: 30px;\">#Version 1.2.1 June 26, 2019<br \/>Available to input gz compressed fastq files (zcat is needed).<\/p>\n<p style=\"padding-left: 30px;\">#Version 1.2.0.1 July 11, 2018<br \/>Correct bug that hlahd outputs incorrect positions to read.txt in some genes (DRB6,DRB8,DRB9).<\/p>\n<p style=\"padding-left: 30px;\">#Version 1.2.0 June 25, 2018<br \/><span class=\"s1\">Modify default dictionary to type <em>HLA-DRB5<\/em> and add some genes to HLA_gene.split.txt<br \/>(<em>HLA-DPA2<\/em>, &#8211;<em>T<\/em>, &#8211;<em>W<\/em>, &#8211;<em>Y<\/em> were added to HLA_gene.split.<\/span><span class=\"s1\">3.32.0.txt for current release, see <a href=\"#running\">Running<\/a>)<\/span><\/p>\n<p style=\"padding-left: 30px;\">#Version 1.1.0.1 November 15, 2017<br \/>Modify to adapt the reference data of IPD-IMGT\/HLA after the release 3.30.0.<\/p>\n<p style=\"padding-left: 30px;\">#Version 1.1.0 October 02, 2017<br \/>The database update feature was implemented (see section Updating the HLA dictionary).<\/p>\n<p style=\"padding-left: 30px;\">#Version 1.0.0 April 27, 2017<\/p>\n<h2>Download<\/h2>\n\n<!--\n<p>February 19, 2025:<br \/><span style=\"color: red;\"> The download request is temporarily suspended. <\/span><br \/>\n-->\n\n<p style=\"padding-left: 30px;\"><a href=\"https:\/\/w3.genome.med.kyoto-u.ac.jp\/HLA-HD\/kyoto-hlahd-download-request-20250310\/\">Download request<\/a><\/p>\n<!-- \n\n\n\n\n\n<p style=\"padding-left: 30px;\"><a href=\"download-request\/\">Download request<\/a><\/p>\n\n\n\n\n\n -->\n<h2>Installation<\/h2>\n<p style=\"padding-left: 30px;\">HLA-HD requires <a href=\"http:\/\/bowtie-bio.sourceforge.net\/bowtie2\/index.shtml\">bowtie2<\/a> to map NGS reads.<br \/>Please install bowtie2 on your computer and set path to your environment variables.<br \/>For example, if you are using bash, add to your .bashrc the following command.<br \/>export PATH=$PATH:\/path_to_bowtie2<\/p>\n<p style=\"padding-left: 30px;\">Uncompress the downloaded tar.gz file by<br \/>&gt; tar -zxvf hlahd.version.tar.gz<br \/>Then, move to the uncompressed directory and type<br \/>&gt; sh install.sh<br \/>For the installation, the <a href=\"https:\/\/gcc.gnu.org\/\">g++ compiler by the GNU Compiler Collection<\/a> must be installed on your computer.<\/p>\n<p style=\"padding-left: 30px;\">After the installation, add the current directory to your PATH.<br \/>export PATH=$PATH:\/path_to_HLA-HD_install_directory\/bin<\/p>\n<h2>Updating the HLA dictionary (after v.1.1.0)<\/h2>\n<p style=\"padding-left: 30px;\">You can update the HLA allele dictionary to the current release of the IPD-IMGT\/HLA database by the command,<br \/>&gt; sh update.dictionary.sh<br \/><a href=\"https:\/\/www.gnu.org\/software\/wget\/\">Wget<\/a> is required for the database update.<\/p>\n<p style=\"padding-left: 30px;\">You can also use any release by getting hla.dat file from the <a href=\"https:\/\/github.com\/ANHIG\/IMGTHLA\"> github site.<\/a><br \/>Put hla.dat file on parent dicretory of hlahd and executing the update.dictionary.sh by deleting the line of the first wget command.<\/p>\n<p style=\"padding-left: 30px;\">The latest release can adopt the newest rare alleles.<br \/>In contrast, the old release tend to yield conservative result.<\/p>\n<p style=\"padding-left: 30px;\">Default dictionary of the installation is created from release 3.15.0.<\/p>\n<h2 id=\"running\">Running<\/h2>\n<p style=\"padding-left: 30px;\">Before running the HLA-HD, check the value of open files on your computer by typing:<br \/>&gt; ulimit -Sa<br \/>If open files are less than 1024, please type:<br \/>&gt; ulimit -n 1024<br \/>or change \/etc\/security\/limits.conf according to your system environment.<\/p>\n<p style=\"padding-left: 30px;\"><span style=\"color: #ff0000;\">If you have fastq.gz file, unzip gz file in advance.\u00a0<\/span><\/p>\n<p style=\"padding-left: 30px;\">You can run the HLA-HD by typing the following commands:<br \/>&gt; hlahd.sh -t [thread_num] -m [minimum length of reads] -c [trimming rate] -f [path_to freq_data directory] fastq_1 fastq_2 gene_split_filt path_to_dictionary_directory IDNAME[any name] output_directory<\/p>\n<p style=\"padding-left: 30px;\">For example:<br \/>&gt; hlahd.sh -t 2 -m 100 -c 0.95 -f freq_data\/ data\/sample_1.fastq data\/sample_2.fastq HLA_gene.split.txt dictionary\/ sampleID estimation<\/p>\n<p style=\"padding-left: 30px; color: #ff0000;\">If you want to type <em>HLA-DPA2<\/em>, &#8211;<em>T<\/em>, &#8211;<em>W<\/em>, &#8211;<em>Y<\/em>, replace\u00a0HLA_gene.split.txt to\u00a0HLA_gene.split.3.32.0.txt and update the dictionary to current release. (after v.1.2.0)<\/p>\n<p style=\"padding-left: 30px;\"><b>Options<\/b><\/p>\n<p style=\"padding-left: 30px;\">-m : A read whose length is shorter than this parameter is ignored. Default size is 100.<\/p>\n<p style=\"padding-left: 30px;\">-t : Number of cores used to execute the program.<\/p>\n<p style=\"padding-left: 30px;\">-c : Trimming option. If a match sequence is not found in the dictionary, trim the read until some sequence is matched to or reaches this ratio. Default is 1.0.<\/p>\n<p style=\"padding-left: 30px;\">-f : Use information of allele frequencies. The default data exist in the installed directory (\/hlahd.version\/freq_data).<\/p>\n<h2>Demo<\/h2>\n<p style=\"padding-left: 30px;\">The demonstration of the HLA-HD execution is described in <a href=\"demo\/hlahd-demo.v1.pdf\">this pdf file<\/a>.<\/p>\n<h2 id=\"tips\">Tips<\/h2>\n<p style=\"padding-left: 30px;\"><b>Usage of multiple fastq files<\/b><br \/>HLA-HD can not adopt to multiple fastq, so merge them in advance.<br \/>&gt;cat sample.1_1.fastq sample.1_2.fastq &gt; sample_1.fastq<br \/>&gt;cat sample.1_2.fastq sample.2_2.fastq &gt; sample_2.fastq<\/p>\n<p style=\"padding-left: 30px;\"><b>Using\u00a0 bam files mapped to human genome<\/b><br \/>If you have mapped result to human genome, you can create fastq of mhc region and unmapped reads by using samtools and <a href=\"https:\/\/broadinstitute.github.io\/picard\/index.html\">picard tools<\/a> as follows:<br \/>#Extract MHC region<br \/>:for GRCh38.p12<br \/>&gt;samtools view -h -b sample.hgmap.sorted.bam chr6:28,510,120-33,480,577 &gt; sample.mhc.bam<br \/>:for GRCh37<br \/>&gt;samtools view -h -b sample.hgmap.sorted.bam chr6:28,477,797-33,448,354 &gt; sample.mhc.bam<br \/>#Extract unmap reads<br \/>&gt;samtools view -b -f 4 sample.sorted.bam &gt; sample.unmap.bam<br \/>#Merge bam files<br \/>&gt;samtools merge -o sample.merge.bam sample.unmap.bam sample.mhc.bam<br \/>#Create fastq<br \/>&gt;<span class=\"s1\">java -jar picard.jar SamToFastq I=sample.merge.bam F=sample.hlatmp.1.fastq F2=sample.hlatmp.2.fastq<\/span><br \/>#Change fastq ID<br \/>&gt;cat sample.hlatmp.1.fastq |awk &#8216;{if(NR%4 == 1){O=$0;gsub(&#8220;\/1&#8243;,&#8221; 1&#8243;,O);print O}else{print $0}}&#8217; &gt; sample.hla.1.fastq<br \/>&gt;cat sample.hlatmp.2.fastq |awk &#8216;{if(NR%4 == 1){O=$0;gsub(&#8220;\/2&#8243;,&#8221; 2&#8243;,O);print O}else{print $0}}&#8217; &gt; sample.hla.2.fastq<\/p>\n<p style=\"padding-left: 30px;\"><b>Filtering of reads (March 6, 2019)<\/b><br \/>For WES or WGS data, bowtie2 is rarely aborted because it requires vast computer resources. To avoid the problem, you can filter reads in advance as follows:<br \/>#Get full resolution (8-digit) hla sequence information<br \/>&gt;wget ftp:\/\/ftp.ebi.ac.uk\/pub\/databases\/ipd\/imgt\/hla\/hla_gen.fasta<br \/>#Create bowtie2 index<br \/>&gt;bowtie2-build hla_gen.fasta hla_gen<br \/>#Map fastq to hla sequence<br \/>&gt;bowtie2 -x hla_gen -1 sample_1.fastq -2 sample_2.fastq -S sample.hlamap.sam<br \/>or<br \/>&gt;bowtie2 -p number_of_cores -x hla_gen -1 sample_1.fastq -2 sample_2.fastq -S sample.hlamap.sam<br \/>#Extract mapped reads<br \/>&gt;samtools view -h -F 4 sample.hlamap.sam &gt; sample.mapped.sam<br \/>#Convert mapped sam to fastq<br \/>&gt;java -jar picard.jar SamToFastq I=sample.mapped.sam F=sample.hlatmp.1.fastq F2=sample.hlatmp.2.fastq<br \/>#Change fastq ID<br \/>&gt;cat sample.hlatmp.1.fastq |awk &#8216;{if(NR%4 == 1){O=$0;gsub(&#8220;\/1&#8243;,&#8221; 1&#8243;,O);print O}else{print $0}}&#8217; &gt; sample.hla.1.fastq<br \/>&gt;cat sample.hlatmp.2.fastq |awk &#8216;{if(NR%4 == 1){O=$0;gsub(&#8220;\/2&#8243;,&#8221; 2&#8243;,O);print O}else{print $0}}&#8217; &gt; sample.hla.2.fastq<br \/>After the filtering, use sample.hla.1.fastq and sample.hla.2.fastq as new hlahd input.<\/p>\n<h2>Reference<\/h2>\n<p style=\"padding-left: 30px;\">Kawaguchi, S. and Matsuda, F. &#8220;High-Definition Genomic Analysis of HLA Genes Via Comprehensive HLA Allele Genotyping&#8221;, <em>Methods Mol Biol<\/em>., 2131:31-38, doi:\u00a0<span class=\"identifier doi\">10.1007\/978-1-0716-0389-5_3, 2020<\/span><br \/>\u30fbScripts and data can be downloaded from <a href=\"hla_aa_analysis\/\">here<\/a>.<\/p>\n<p style=\"padding-left: 30px;\">Kawaguchi, S.\u00a0<i>et al<\/i>. &#8220;Comprehensive HLA Typing from a Current Allele Database Using Next-Generation Sequencing Data&#8221;, <em>Methods Mol Biol<\/em>., 1802:225-233, doi: 10.1007\/978-1-4939-8546-3_16, 2018.<\/p>\n<p style=\"padding-left: 30px;\">Kawaguchi, S.\u00a0<i>et al<\/i>. &#8220;HLA-HD: An accurate HLA typing algorithm for next-generation sequencing data&#8221; <i>Hum Mutat., <\/i>Jul;<strong>38<\/strong>(7):788-797, doi: 10.1002\/humu.23230, 2017.<\/p>\n<h3>Contact:<\/h3>\n<p style=\"padding-left: 30px;\">Shuji Kawaguchi: <a href=\"mailto:shuji@genome.med.kyoto-u.ac.jp\">shuji@genome.med.kyoto-u.ac.jp<\/a><\/p>\n<div id=\"footer\">(C) All rights reserved. <a href=\"http:\/\/w3.genome.med.kyoto-u.ac.jp\/en\/\">Center for Genomic Medicine, Graduate School of Medicine,<\/a> <a href=\"https:\/\/www.kyoto-u.ac.jp\/en\">Kyoto University<\/a><\/div>","protected":false},"excerpt":{"rendered":"<p>What is HLA-HD? HLA-HD (HLA typing from High-quality Dictionary) can accurately determine HLA alleles with 6-d [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"parent":0,"menu_order":0,"comment_status":"closed","ping_status":"closed","template":"","meta":{"footnotes":""},"class_list":["post-12","page","type-page","status-publish","hentry"],"_links":{"self":[{"href":"https:\/\/w3.genome.med.kyoto-u.ac.jp\/HLA-HD\/wp-json\/wp\/v2\/pages\/12","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/w3.genome.med.kyoto-u.ac.jp\/HLA-HD\/wp-json\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/w3.genome.med.kyoto-u.ac.jp\/HLA-HD\/wp-json\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/w3.genome.med.kyoto-u.ac.jp\/HLA-HD\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/w3.genome.med.kyoto-u.ac.jp\/HLA-HD\/wp-json\/wp\/v2\/comments?post=12"}],"version-history":[{"count":31,"href":"https:\/\/w3.genome.med.kyoto-u.ac.jp\/HLA-HD\/wp-json\/wp\/v2\/pages\/12\/revisions"}],"predecessor-version":[{"id":145,"href":"https:\/\/w3.genome.med.kyoto-u.ac.jp\/HLA-HD\/wp-json\/wp\/v2\/pages\/12\/revisions\/145"}],"wp:attachment":[{"href":"https:\/\/w3.genome.med.kyoto-u.ac.jp\/HLA-HD\/wp-json\/wp\/v2\/media?parent=12"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}