Package: himut
Getting started## pip installationpipinstallhimut## download and install the latest releasewgethttps://github.com/sjin09/himut/archive/refs/tags/v1.0.2.tar.gz
tar-zxvfv1.0.3.tar.gzcdhimut-1.0.3
bashinstall.sh## use miniamp2 and samtools to align, sort (and merge) PacBio CCS read alignmentsminimap2"@RG\tSM:sample"-axmap-hifi--csref.fapacbio.ccs.fastq.gz|samtoolssort-oaln.sorted.bam# SM tag must be provided to retrieve sample IDsamtoolsmerge*.sorted.bam|samtoolssort-oaln.mergeSorted.bam-## if there are multiple BAM files, merge and sort the BAM filessamtoolsview-bh-F0x900aln.sorted.bam>aln.primary_alignments.sorted.bam# select primary alignmentssamtoolsindexaln.sorted.bam
samtoolsindexaln.primary_alignments.sorted.bam## germline mutation detection and haplotype phasingdeepvariant.simg/opt/deepvariant/bin/run_deepvariant--model_type=PACBIO--refref.fa--reads=aln.primary_alignments.sorted.bam--output_vcf=germline.vcf## use deepvariant to call germline mutationsbgzip-cgermline.vcf>germline.vcf.bgz## bgzip compresstabix-pvcfgermline.vcf.bgz## tabix indexhimutphase--bamaln.primary_alignments.sorted.bam--vcfgermline.vcf.bgz-ogermline.phased.vcf## phsaebgzip-cgermline.phased.vcf>germline.phased.vcf.bgz## bgzip compresstabix-pvcfgermline.phased.vcf.bgz## tabix index## somatic mutation detection in human samples### use himut to call somatic mutations in human sampleshimutcall-ialn.primary_alignments.sorted.bam-osomatic.vcf# somatic mutation detectionhimutcall-ialn.primary_alignments.sorted.bam--phased_vcfgermline.phased.vcf.bgz-osomatic.vcf--phase# haplotype phased somatic mutation detectionhimutcall-ialn.primary_alignments.sorted.bam--common_snpsALL.wgs.phase3_shapeit2_mvncall_integrated_v5b.20130502.sites.decomposed.normalised.common_snps.vcf.bgz--panel_of_normalsb37.himut.pon.sbs.dbs.vcf.bgz-osomatic.vcf# provide a VCF file with common SNPs or a panel of normal VCF filehimutcall-ialn.primary_alignments.sorted.bam--phased_vcfgermline.phased.vcf.bgz--common_snpsALL.wgs.phase3_shapeit2_mvncall_integrated_v5b.20130502.sites.decomposed.normalised.common_snps.vcf.bgz--panel_of_normalsb37.himut.pon.sbs.dbs.vcf.bgz-osomatic.vcf--phase# somatic mutation detection with the highest sensitivitybgzip-csomatic.vcf>somatic.vcf.bgz
tabix-pvcfsomatic.vcf.bgz### normalise SBS96 counts ## use the same parameters as that used for somatic mutation detectionhimutnormcounts--bamaln.primary_alignments.sorted.bam--refref.fa--sbssomatic.vcf.bgz-osomatic.normcounts.tsv
himutnormcounts--bamaln.primary_alignments.sorted.bam--refref.fa--sbssomatic.vcf.bgz--phased_vcfgermline.phased.vcf.bgz-osomatic.normcounts.tsv--phase
himutnormcounts--bamaln.primary_alignments.sorted.bam--refref.fa--sbssomatic.vcf.bgz--common_snpsALL.wgs.phase3_shapeit2_mvncall_integrated_v5b.20130502.sites.decomposed.normalised.common_snps.vcf.bgz--panel_of_normalsb37.himut.pon.sbs.dbs.vcf.bgz-osomatic.normcounts.tsv
himutnormcounts--bamaln.primary_alignments.sorted.bam--refref.fa--sbssomatic.vcf.bgz--common_snpsALL.wgs.phase3_shapeit2_mvncall_integrated_v5b.20130502.sites.decomposed.normalised.common_snps.vcf.bgz--panel_of_normalsb37.himut.pon.sbs.dbs.vcf.bgz--phased_vcfgermline.phased.vcf.bgz-osomatic.normcounts.tsv--phase## somatic mutation detection in non-human samples### use himut to call somatic mutations in non-human sampleshimutcall-ialn.primary_alignments.sorted.bam--vcfgermline.vcf.bgz-osomatic.vcf--non_human_samplehimutcall-ialn.primary_alignments.sorted.bam--vcfgermline.vcf.bgz--phased_vcfgermline.phased.vcf.bgz-osomatic.vcf--phase--non_human_samplebgzip-csomatic.vcf>somatic.vcf.bgz
tabix-pvcfsomatic.vcf.bgz## normalise SBS96 countshimutnormcounts--bamaln.primary_alignments.sorted.bam--refref.fa--vcfgermline.vcf.bgz--sbssomatic.vcf.bgz-osomatic.normcounts.tsv
himutnormcounts--bamaln.primary_alignments.sorted.bam--refref.fa--vcfgermline.vcf.bgz--phased_vcfgermline.phased.vcf.bgz--sbssomatic.vcf.bgz-osomatic.normcounts.tsvTable of ContentsGetting StartedUsers' GuideInstallationminimap2 CCS read alignmentGeneral usageSomatic mutation detectionHaplotype phased somatic mutation detectionSBS96 count calculationSBS96 counts normalisationSomatic mutation detection across the Tree of LifePanel of Normal VCF fileVCF file with common SNPsCiting himutLimitationsUsers' Guidehimut (high-fidelity mutation) is a somatic mutation caller that leverages the base accuracy and read length of Pacific Biosciences (PacBio) CCS reads to call single molecule somatic single-base substitutions (SBS).A single-read mismatch bewteen a sample and the reference genome is derived from library errors, sequencing errors or somatic mutations. If sequencing error rate is lower than the somatic mutation rate, single-molecule somatic mutation detection is possible. On the other hand, if sequencing error rate is higher than the somatic mutation rate, but if the number of accumulated somatic mutations is higher than the number of sequencing errors, which is a constant, somatic mutational process associated with the sample can be directly observed from the mutational spectrum.InstallationUse pip to install himut:pipinstallhimutDownload and install the latest release:wgethttps://github.com/sjin09/himut/archive/refs/tags/v1.0.3.tar.gz
tar-zxvfv1.0.2.tar.gzcdhimut-1.0.2
bashinstall.shYou can download and install the source code with the latest developments that might contain code still under development.gitclonehttps://github.com/sjin09/himutcdhimut
/bin/bashinstall.shInstallation through Bioconda will be supported in the future.minimap2 CCS read alignmentCurrently, himut only accepts minimap2 CCS read alignment SAM/BAM file with a--cstag, like thecigarstring provides information about the matches and mismatches between the read and the reference genome. pbmm2 and ngmlr does not provide the--cstag and as a result, pbmm2 and ngmlr SAM/BAM files are incompatible with himut. The--cstag is favored over thecigarstring because it offers a more elegant representation of the differences between the read and the reference genome (source:https://lh3.github.io/2018/03/27/the-history-the-cigar-x-operator-and-the-md-tag).minimap2"@RG\tSM:sample"-axmap-hifi--csref.fapacbio.ccs.fastq.gz|samtoolssort-oaln.sorted.bam# SM tag must be provided to retrieve sample IDsamtoolsmerge*.sorted.bam|samtoolssort-oaln.mergeSorted.bam-# merge read alignmentssamtoolsview-bh-F0x900aln.mergeSorted.bam>aln.primary_alignments.mergeSorted.bam# select primary alignmentssamtoolsindexaln.primary_alignments.sorted.bam
samtoolsindexaln.primary_alignments.mergeSorted.bamGeneral UsageCurrently, himut only accepts minimap2 generated BAM files, as--cstag is required for somatic mutation detection. The CCS read alignments must be sorted, (merged), compressed and indexed using SAMtools.Somatic mutation detectionHimut accepts as input a BAM file with CCS read alignments and returns a VCF file with somatic mutations.himutcall-isample.primary_alignments.sorted.bam-osample.somatic.vcfhimut can optionally accept a VCF file with common SNPs and/or a panel of normal VCF file to filter substitutions derived from genomic DNA contamination and/or from non-canonical error modes, respectively.himutcall-ialn.primary_alignments.sorted.bam--common_snpsALL.wgs.phase3_shapeit2_mvncall_integrated_v5b.20130502.sites.decomposed.normalised.common_snps.vcf.bgz--panel_of_normalsb37.himut.pon.sbs.dbs.vcf.bgz-osomatic.vcf# provide a VCF file with common SNPs or a panel of normal VCF fileHaplotype phased somatic mutation detectionHimut leverages CCS read length and base accuracy to haplotype phase germline mutations. CCS reads have an average read length between 10kb and 20kb and consequently, a CCS read can span mulitple heterozaygous single nucleotide polymorphisms (hetSNPs). Himut identifies haplotype consistent hetSNPs that are connected to construct haplotype blocks. In the VCF file, haplotype phased hetSNPs in the same haplotype block have the same phase set (PS), which is the position of the first hetSNP in the haplotype block.himutphase--bamaln.primary_alignments.sorted.bam--vcfgermline.vcf.bgz-ogermline.phased.vcf## phasebgzip-cgermline.phased.vcf>germline.phased.vcf.bgz## bgzip compresstabix-pvcfgermline.phased.vcf.bgz## tabix indexHimut can take the haplotype phased VCF file as an additional input to haplotype phase CCS reads and limit somatic mutation detection to haplotype phased CCS reads.himutcall-ialn.primary_alignments.sorted.bam--phased_vcfgermline.phased.vcf.bgz-osomatic.vcf--phase# haplotype phased somatic mutation detectionhimutcall-ialn.primary_alignments.sorted.bam--phased_vcfgermline.phased.vcf.bgz--common_snpsALL.wgs.phase3_shapeit2_mvncall_integrated_v5b.20130502.sites.decomposed.normalised.common_snps.vcf.bgz--panel_of_normalsb37.himut.pon.sbs.dbs.vcf.bgz-osomatic.vcf--phase# somatic mutation detection with the highest sensitivitybgzip-csomatic.vcf>somatic.vcf.bgz
tabix-pvcfsomatic.vcf.bgzSBS96 count calculationThere are 6 possible substitutions in the pyrimidine sequence context (C>A, C>G, C>T, T>A, T> and T>G) and 16 possible trinucleotide sequence contexts for each substitution, creating the SBS96 classification system (6 * 16 = 96).Himut accepts as input a VCF file with somatic mutations and a reference genome FASTA file, classifies each substitution and returns a file with SBS96 counts.himutsbs96-isomatic.vcf--refref.fa-osomatic.sbs96.tsvSBS96 count normalisationBefore mutational signature extraction and analysis, SBS96 count needs to be normalised based on the trinucleotide frequencines in the reference genome FASTA file and the callable trinucleotide frequencies in CCS reads. This is because number of callable bases, the CCS bases from which somatic mutation detection could have been performed, is unique to each sample and each sequencing run. To calculate the number of callable CCS bases, SBS96 count normalisation parameters needs to be identical to the somatic mutation detection parameters, as the parameters changes the number of callable CCS bases.himutnormcounts--bamaln.primary_alignments.sorted.bam--refref.fa--common_snpsALL.wgs.phase3_shapeit2_mvncall_integrated_v5b.20130502.sites.decomposed.normalised.common_snps.vcf.bgz--panel_of_normalsb37.himut.pon.sbs.dbs.vcf.bgz--sbssomatic.vcf.bgz-osomatic.normcounts.tsv## unphased normalisationhimutnormcounts--bamaln.primary_alignments.sorted.bam--refref.fa--phased_vcfgermline.phased.vcf.bgz--common_snpsALL.wgs.phase3_shapeit2_mvncall_integrated_v5b.20130502.sites.decomposed.normalised.common_snps.vcf.bgz--panel_of_normalsb37.himut.pon.sbs.dbs.vcf.bgz--sbssomatic.vcf.bgz-osomatic.normcounts.tsv--phase## phased normalisationSomatic mutation detection across the Tree of LifeHimut enable somatic mutation detection from bulk normal tissue, agnostic of species and clonality, and can be used to detect somatic mutations across the Tree of Life. We used himut to call somatic mutations from Darwin Tree of Life (DToL) project samples. Himut requires germline SNP prior to calculate the genotype quality score for each germline muation and because the germline SNP prior is unknown, a deepvariant VCF file needs to be provided to calculate the germline SNP prior. How the germline SNP prior is calculated depends on whether CCS reads and reference genome is derived from the same sample or from a different sample.To indicate to himut that germline SNP prior needs to be calculated, provide--non_human_sampleas a parameter. In addition, if the CCS reads and reference genome are derived from the same sample, provide--reference_sampleas a parameter. In addition, because the DToL project sequences and assembles one sample per species, a VCF file with common SNPs and a Panel of Normal VCF file is not available.## unphased somatic mutation detection and SBS96 count normalisation where CCS reads and reference genome is derived from the same samplehimutcall-ialn.primary_alignments.sorted.bam--vcfgermline.vcf.bgz-osomatic.vcf--non_human_sample--reference_samplehimutnormcounts--bamaln.primary_alignments.sorted.bam--refref.fa--vcfgermline.vcf--phased_vcfgermline.phased.vcf.bgz--non_human_sample--reference_sample## phased somatic mutation detection and SBS96 count normalisation where CCS reads and reference genome is derived from the same samplehimutcall-ialn.primary_alignments.sorted.bam--vcfgermline.vcf.bgz--phased_vcfgermline.phased.vcf.bgz-osomatic.vcf--phase--non_human_sample--reference_sample
himutnormcounts--bamaln.primary_alignments.sorted.bam--refref.fa--vcfgermline.vcf--phased_vcfgermline.phased.vcf.bgz--non_human_sample--reference_sampleIf the CCS reads and reference genome are derived from a different sample, use the following commands.## unphased somatic mutation detection and SBS96 count normalisation where CCS reads and reference genome is derived from a different samplehimutcall-ialn.primary_alignments.sorted.bam--vcfgermline.vcf.bgz-osomatic.vcf--non_human_sample
himutnormcounts--bamaln.primary_alignments.sorted.bam--refref.fa--vcfgermline.vcf--phased_vcfgermline.phased.vcf.bgz--non_human_sample## phased somatic mutation detection and SBS96 count normalisation where CCS reads and reference genome is derived from a different samplehimutcall-ialn.primary_alignments.sorted.bam--vcfgermline.vcf.bgz--phased_vcfgermline.phased.vcf.bgz-osomatic.vcf--phase--non_human_sample
himutnormcounts--bamaln.primary_alignments.sorted.bam--refref.fa--vcfgermline.vcf--phased_vcfgermline.phased.vcf.bgz--non_human_samplePanel of Normal VCF fileA Panel of Normal VCF file is used to remove false positive substitutions resulting from non-canonical errors. To create a Panel of Normal VCF file, please provide himut with a minimap2 BAM file from an unrelated individual from the same species and the--create_panel_of_normalparameter. Himut will use less stringent thresholds to maximise the number of substitutions called from the sample and if the same found in a sample of interest, the substitution is not considered as a somatic mutation.himutcall-isample.aln.primary_alignments.sorted.bam-osample.pon.vcf--create_panel_of_normalWe prepared a Panel of Normal VCF file for public use Google Drive ((https://drive.google.com/drive/folders/14-cSTBocwdyIemXTExuhW-mnTJb87SLT?usp=sharing).VCF file with common SNPsWe selected common SNPs (>1% minor allele frequency) from the 1000 Genomes Project Phase 3 VCF file (https://drive.google.com/drive/folders/14-cSTBocwdyIemXTExuhW-mnTJb87SLT?usp=sharing).LimitationsHimut does not support Revio CCS reads, which has BQ score that ranges from Q1 to Q40.PacBio CCS base accuracy is the limiting factor for somatic mutation calling using himut. PacBio circular consensus sequence (pbccs) algorithm calculates the base quality score depending on the dinucleotide sequence context and the number of supporting subread bases. Our research suggests that the base quality score does not correctly reflect the true base accuracy and that the consensus sequence caller does not account for the different substitution error rates in different trinucleotide sequence contexts. We discuss how this issue can be mitigated in our manuscript.