Package: seGMM
seGMMBackgroundComputational tools have been developed to infer sex for genotype array, WES and WGS data such as plink, seXY and XYalign. Plink calculated F coefficient with X chromosome heterozygosity to infer sex for genotype array data. seXY considered both X chromosome heterozygosity and Y chromosome missingness to infer sex in genotype array data by logistic regression. XYalign extract read count mapped to sex chromosomes and calculated the ratio of X and Y counts to infer sex in WES and WGS data. However, evaluation the accuracy of these methods in targeted gene panel data is not yet fully and improvements in sex inference from gene panel data are warranted.In addition, PLINK, seXY, and XYalign could not report sex chromosome abnormality.DescriptionseGMMapplies unsupervised learning to determine the individual gender based on integrated information of the X and Y chromosomes from TGS, WES, or WGS data, providing the classification of six sex chromosome karyotypes (XX, XY, XYY, XXY, XXX, and X).Importantly, in clinical practice, individual patient is usually sequenced to get a molecular diagnosis. Hence, seGMM permits users to provide an additional reference data, by combining the features from reference data and testing data, seGMM can ensure the accuracy for clinical application.InstallationRobust installIn order to install the software and dependencies, we recommend using a dedicated conda environment andseGMMis available on conda (installation time: ~ 15min).
First you will need theCondaPython distribution and package manager.# Download conda installerwgethttps://repo.continuum.io/miniconda/Miniconda3-latest-Linux-x86_64.sh# Set permissions to executechmod+xMiniconda3-latest-Linux-x86_64.sh# Execute. Make sure to "yes" to add the conda to your PATHsh./Miniconda3-latest-Linux-x86_64.sh# Add channelscondaconfig--addchannelsbioconda
condaconfig--addchannelsconda-forgeAfter installing Miniconda, run the following commands to install seGMM and seGMM's dependencies:conda create -n seGMM
conda activate seGMM
conda install -c sihanliu segmmQuick installIfCondahas been installed before, and the dependencies of seGMM is already installed in your environment, then you can quickly install seGMM from PyPI:pipinstallseGMMDependenciesProgramming languages:Python>3R>= 3.5Commandline tools and packages:Plink>=1.9samtools>=1.9mosdepthparallelmclustOnce the installation of seGMM has completed, you can run:seGMM -hto print a list of all command-line options. If these commands fail with an error, then something as gone wrong during the installation process.ParametersParameterTypeDescriptionRequired--input/-icharacterThe input vcf file which contains all the samples you want to infer gender.true--bam/-bcharacter"Bam.file". A text file which contain two columns with no header and split by space. The first column is the sample ID which match the sample ID in the input vcf file. The order of the sample ID in bam.file and the order of the sample ID in the VCF file can be inconsistent.An example file has been provided in the test fold.true--chromosome/-ccharacterSex chromosome to use collect features.Optional is {xy,x,y}. If --reference is used, you can no longer use this parameterfalse--type/-tcharacterSequencing type. Note that if yourdon't provide an additional reference data, you must use --type.If the data type is WGS or WES, seGMM will automatic calculated all 5 features, otherwise if yoursequencing type is TGS you have to choice which sex chromosome you want to use (--chromosome/-c) and tell seGMM the SRY gene is included or not (--SRY/-s)false--output/-ocharacterPrefix of output directory.true--genome/-gcharacterGenome version.Default is hg19. Option is {hg19,hg38}.false--SRY/-sbooleanIfTrue, seGMM will calculate the mean depth of SRY gene.Option is {True,False}.false--reference/-rcharacterThe path of additional reference file contain features. We have provided two additinal files (1000G.WES.txt and 1000G.WGS.txt in reference folder). If--reference is used, seGMM will automatically calculated the same features in the reference file. The file (tab split) must contain at least two features, and the column names must be: sampleid,XH,Xmap,Ymap,XYratio,SRY. The ordering of the columns is arbitrary, except for the first instance, which must be the sample namefalse--uncertain_threshold/-unumericThe threshold for detecting outliers in GMM model.Default is 0.1. The range of threshold is 0-1.false--num_threshold/-nnumericNumber of additional threads to use. Default is 1.false--Qulity/-qnumericMapping quality threshold of reads to count. Default is 30.falseUsage examples## For WES and WGS data. Using 20 coresseGMM-iinput.vcf-bbam.file-tWES-ooutputdir-n20## For TGS data# The gene panel contains only genes located on the X chromosomeseGMM-iinput.vcf-bbam.file-tTGS-ooutputdir-cx-sFalse# The gene panel contains genes located on the X and Y chromosome, but don't contain SRYseGMM-iinput.vcf-bbam.file-tTGS-ooutputdir-cxy-sFalse## With an additional reference file. Note the header of referenc file must like: sampleid,XH,Xmap,Ymap,XYraio,SRY.## And seGMM will automatically calculated the same features in the reference file.## We have provided two additinal files (1000G.WES.txt and 1000G.WGS.txt in reference folder).seGMM-iinput.vcf-bbam.file-rreference.txt-ooutputdirTest for seGMMWe have provide two reference file named1000G.WES.txt and 1000G.WGS.txt in reference folder. Users can download these files and integrate with your own vcf and bam files(WES or WGS sequencing) to test the utility of seGMM. In addition, you can download test data from exon-targetted sequencing for 1000 genes from the 1000 Genomes Project in thetest folder. After download the file, you should make abam.listfile which contain sample ID and the full path of bam files. Then you can runseGMM-itest.vcf-bbam.list-tTGS-cxy-sFalse-oseGMM_testIf everything goes well, you will see:seGMM -i test.vcf -b bam.list -t TGS -c xy -s False -o seGMM_test
*********************************************************************
* seGMM
* Version 1.2.1
* (C) 2021-2026 Sihan Liu
* Research Institute of Rare disease / West china hospital
* GNU General Public License v3
*********************************************************************

Warning, the output file is not exist, seGMM creates the output folder of seGMM_test first!
Beginning generate features at Thu Nov 25 14:10:23 2021
>> Collected feature of X chromosome heterozygosity
    Finish generate features of X chromosome heterozygosity at Thu Nov 25 14:10:24 2021

>> Collected feature of X mapping rate
    Finish generate features of X mapping rate at Thu Nov 25 14:10:37 2021

>> Collected feature of Y mapping rate
    Finish generate features of Y mapping rate at Thu Nov 25 14:10:38 2021

>> Combine features into a single file

>> Running sample classfication based on GMM model
WARNING: ignoring environment value of R_HOME
[1] "There are 0 outliers samples based on prediction uncertainty"
character(0)
outliers
FALSE
   10

Analysis complete for seGMM at Thu Nov 25 14:10:38 2021
Total time elapsed: 15.59s

*********************************************************************
* Thanks for using seGMM!
* Report bugs to liusihan@wchscu.cn
* seGMM homepage: https://github.com/liusihan/seGMM
*********************************************************************CitationIf you use seGMM, please cite our paper (thanks!):Liu S, Zeng Y, Wang C, Zhang Q, Chen M, Wang X, Wang L, Lu Y, Guo H, Bu F. seGMM: A New Tool for Gender Determination From Massively Parallel Sequencing Data. Front Genet. 2022 Mar 3;13:850804. doi: 10.3389/fgene.2022.850804.LicenseThis project is licensed under GNU GPL v3.AuthorsSihan Liu (West china hospital)