Germline genetic variants modulate human immune response. We present analytical pipelines for assessing the contribution of hosts’ genetic background to the immune landscape of solid tumors using harmonized data from more than 9,000 patients in The Cancer Genome Atlas (TCGA). These include protocols for heritability, genome-wide association studies (GWAS), colocalization, and rare variant analyses. These workflows are developed around the structure of TCGA but can be adapted to explore other repositories or in the context of cancer immunotherapy.For complete details on the use and execution of this protocol, please refer to   •Pipelines for assessing the contribution of germline genetics on tumor immune contexture•Workflow for data download, processing, assembly, curation, and annotation•Protocols for heritability, GWAS, colocalization, and rare variant analysis•Visualization tools for exploration of the results by iAtlas and PheWeb Publisher’s note: Undertaking any experimental protocol requires adherence to local institutional guidelines for laboratory safety and ethics. Germline genetic variants modulate human immune response. We present analytical pipelines for assessing the contribution of hosts’ genetic background to the immune landscape of solid tumors using harmonized data from more than 9,000 patients in The Cancer Genome Atlas (TCGA). These include protocols for heritability, genome-wide association studies (GWAS), colocalization, and rare variants analysis. These workflows are developed around the structure of TCGA but can be adapted to explore other repositories or in the context of cancer immunotherapy. These protocols describe specific bioinformatic workflows for the analyses of The Cancer Genome Atlas (TCGA) genomic datasets and well-characterized immune traits . HoweverTiming: 1–3 weeks (for step 1)1.To apply for dbGAP, an institutional account is required.2.https://dbgap.ncbi.nlm.nih.gov/aa/wga.cgi?page=login.Apply for dbGaP authorization to access TCGA and GTEx controlled access data: 3.https://www.ncbi.nlm.nih.gov/projects/gap/cgi-bin/GetPdf.cgi?document_name=GeneralAAInstructions.pdf.Prepare a data access request: CRITICAL: Preparing the application is fast, however, the review process of the application can take few weeks and should be considered ahead of time.Authorization from the database of Genotypes and Phenotypes (dbGaP) is necessary to access TCGA germline genetic data (whole exome sequencing (WES) and single nucleotide polymorphism (SNP) array data, including derived imputed SNP data) and Genotype-Tissue Expression (GTEx) genotype data. In addition, download of GTEx summary statistics from the GTEx Google Cloud bucket is a requester-paid download service  .b.https://www.cog-genomics.org/plink2.Download and software documentation is available at: PLINK installation.5.a.Install bcftools (1.9 or current version) .b.https://samtools.github.io/bcftools/.Download and software documentation is available at: bcftools installation.6.a.Install GCTA (1.91.2beta or current version) .b.https://cnsgenomics.com/software/gcta.Download and software documentation is available at: Genome-wide Complex Trait Analysis (GCTA) software package installation.7.a.https://www.r-project.org/.Install R (3.5.0 or current version). Download and software documentation is available at: b.https://www.bioconductor.org/.Install Bioconductor (3.7 or current version) . Installc.https://cran.r-project.org/web/packages/snplist/index.html.Install the R package: snplist (0.18.1 or current version) . Installd.https://bioconductor.org/packages/release/data/annotation/html/SNPlocs.Hsapiens.dbSNP144.GRCh37.html.Install the Bioconductor package: SNPlocs.Hsapiens.dbSNP144.GRCh37 (0.99.20 or current version) . Installe.grch37.ensembl.org. Installation instructions and documentation is available at: https://bioconductor.org/packages/release/bioc/html/biomaRt.html.Install the Bioconductor package: biomaRt (2.36.1 or current version)  Durinck. Use hosf.https://bioconductor.org/packages/release/bioc/html/GenomicRanges.html.Install the Bioconductor package: GenomicRanges (1.32.7 or current version) . Installg.https://bioconductor.org/packages/release/bioc/html/rtracklayer.html.Install the Bioconductor package: rtracklayer (1.40.6 or current version) . Installh.https://bioconductor.org/packages/release/bioc/html/AnnotationHub.html.Install the Bioconductor package: AnnotationHub (2.12.1 or current version) . Installi.https://bioconductor.org/packages/release/data/annotation/html/EnsDb.Hsapiens.v86.html.Install the Bioconductor package: EnsDb.Hsapiens.v86 (2.99.0 or current version) . InstallR/Bioconductor and related packages installation.8.a.http://locuszoom.org/.Install LocusZoom (Genome Build/LD Population: hg19/100 Genomes Nov 2014 EUR)  from httLocusZoom installation.9.a.http://zarlab.cs.ucla.edu/tag/ecaviar/.eCAVIAR  from htteCAVIAR installation.Note: Indicated software and package versions were used as described in  and its binary counterpart BCF.GCTA: Used for heritability analysis. GCTA is one of first and well-established software packages for estimation of the proportion of phenotypic variance explained by all genome-wide SNPs for a complex trait  allows us to integrate various sources of Linkage Disequilibrium (LD).eCAVIAR: Used for colocalization analysis. eCAVIAR is a commonly used method for colocalization analyses, and, as compared with other methods, has the advantage of modeling the LD .The TCGA quality-controlled genotyping data was imputed to the Haplotype Reference Consortium (HRC) panel . These db.i.Information on composition of genotyping files:“READ_ME.txt”.ii.File mapping of TCGA Patient ID to corresponding Birdseed genotyping files:“Map_TCGAPatientID_BirdseedFileID.txt”.iii.QC Unimputed Genotyping Data:“READ_ME_1.txt” .iv.HRC Imputed Genotyping Data:“READ_ME_4.txt” .Download the open-access files from the “TCGA QC HRC Imputed Genotyping Data used by the AIM AWG from ” sectionc.i.To download the controlled access data, follow instructions under the “Instructions for Data Download” for “Controlled Access Data”. The necessary manifest files are found under the “Data in the GDC” section for “Controlled Access Data”.ii.Download the following “QC Unimputed Genotyping Data” files:“QC_Unimputed_plink.zip” .iii.Download the following “HRC Imputed Genotyping Data” files:“HRC imputed genotyping data for chromosome 1 - chr_1.zip”.“HRC imputed genotyping data for chromosome 2 - chr_2.zip”.“HRC imputed genotyping data for chromosome 3 - chr_3.zip”.“HRC imputed genotyping data for chromosome 4 - chr_4.zip”.“HRC imputed genotyping data for chromosome 5 - chr_5.zip”.“HRC imputed genotyping data for chromosome 6 - chr_6.zip”.“HRC imputed genotyping data for chromosome 7 - chr_7.zip”.“HRC imputed genotyping data for chromosome 8 - chr_8.zip”.“HRC imputed genotyping data for chromosome 9 - chr_9.zip”.“HRC imputed genotyping data for chromosome 10 - chr_10.zip”.“HRC imputed genotyping data for chromosome 11 - chr_11.zip”.“HRC imputed genotyping data for chromosome 12 - chr_12.zip”.“HRC imputed genotyping data for chromosome 13 - chr_13.zip”.“HRC imputed genotyping data for chromosome 14 - chr_14.zip”.“HRC imputed genotyping data for chromosome 15 - chr_15.zip”.“HRC imputed genotyping data for chromosome 16 - chr_16.zip”.“HRC imputed genotyping data for chromosome 17 - chr_17.zip”.“HRC imputed genotyping data for chromosome 18 - chr_18.zip”.“HRC imputed genotyping data for chromosome 19 - chr_19.zip”.“HRC imputed genotyping data for chromosome 20 - chr_20.zip”.“HRC imputed genotyping data for chromosome 21 - chr_21.zip”.Note: Please cite  format, which is more suitable for Excel.Upload “vep_input.txt” to c.Combine annotations per SNP. VEP provides multiple annotations per SNP. SNPs might map to different genes and could have several biological impacts on nearby genes. Use R script “CombineVEPannotations.R” to combine annotations.d.Example of combined annotations: “CXXC5:synonymous_variant:LOW|CXXC5:upstream_gene_variant:MODIFIER”.Download the Ensembl Variant Effect Predictor (VEP) annotation.16.a.https://egg2.wustl.edu/roadmap/web_portal/chr_state_learning.html#exp_18state.Access the Expanded 18-state model  for Build GRCh37/hg19: b.Under “MNEMONICS BED FILES” section, download the archive of all mnemonics bed files: “all.mnemonics.bedFiles.tgz”.Download Roadmap Epigenomics Project Epigenomic State Model.Timing: 5 minThe scripts and code descriptions used in the entirety of this protocol are available at:https://github.com/rwsayaman/TCGA_PanCancer_Immune_Genetics.17.a.Review all “README” files for each section of workflow.b.Ensure all the necessary code has been downloaded.Download or clone the GitHub repository: “TCGA_PanCancer_Immune_Genetics” .a.ReviewOptional: This protocol is designed to work with pre-processed and quality-controlled genotyping data. If users start from raw genotyping data from SNP arrays, please see the companion protocol for quality-control analysis of germline data, stranding and genotype imputation from  the University of California, San Francisco (UCSF) Wynton high-performance (HPC) cluster, which currently contains 449 nodes with over 12572 Intel CPU cores and 42 nodes containing a total of 148 NVIDIA GPUs, (2) the original UCSF TIPCC HPC cluster (now C4), which had 8 communal compute nodes and 1 dedicated node, each with 12–64 cores , and (3) two additional severs with 32 and 48 CPUs (Intel(R) Xeon(R) CPU E5-2650 0 @ 2.00 GHz), respectively. In the optimization phase, analyses have been performed by different operators and at multiple times to ensure accuracies and reproducibility. As these are shared servers, time might considerably vary in function of the number of nodes available. From a computational point of view, the most time-consuming step is the GWAS . However, file preparation, as well as annotation and curation of the output files is particularly time consuming. An estimated time, considering these manual steps and factoring in some troubleshooting time .20.2 < 0.5. The imputation R2 is the estimated value of the squared correlation between imputed genotypes and true, unobserved genotypes.a.2 ≥ 0.5.Filter each “chr∗.dose.vcf.gz” files and generate “chr∗.rsq0.5.dose.vcf.gz” imputed genotype files of SNPs with Rb.Index and generate the corresponding “chr∗.rsq0.5.dose.vcf.gz.tbi” files.c.Generate the corresponding filtered “chr∗.info.rsq0.5.gz” information files.For each chromosome, filter the HRC imputed genotyping data to exclude SNPs with imputation R21.a.Convert VCF “chr∗.rsq0.5.dose.vcf.gz” files to PLINK “tcga_imputed_hrc1.1_rsq0.5_chr∗.bed” files.b.Optional: Rename SNP ID names in the HRC imputed dataset with alleles listed in alphabetical order to assist matching with other datasets.Note: This only affects the SNP ID name and not the encoding of the A1 and A2 alleles in PLINK which is maintained.c.Optional: In PLINK, exclude SNPs with MAF < 0.005 (--maf).Note: Minor allele frequency (MAF) filtering can be performed at this step to reduce the HRC imputed genotyping data input file size. Alternatively, GWAS analysis can be performed using the R2 filtered-HRC imputed genotyping data from “Note: Scripts and code description used in this section are available at: https://github.com/rwsayaman/TCGA_PanCancer_Immune_Genetics.For each chromosome, filter HRC imputed genotyping data to exclude SNPs with minor allele frequency (MAF) < 0.005.This section describes the pre-processing steps necessary to use the HRC Imputed Genotyping Data we generated as a general resource for this specific analysis .19.UnzipPre-processing of Imputed Data. The example code in this section were optimized for the high-performance compute environment at UCSF HPC employing Portable Batch System (PBS) job scheduling; consult your system administrator to adapt the provided code to your system.Direct link: Note: “Table S1” and “Table S2” in the “The overall disk space needed for the project is 2.67 TB. Breakdown for different data types and analyses are provided below .Table 1DTiming: 1 day1.a.Curated set of 139 immune traits in TCGA can be downloaded from  “Table Sb.i.Code to generate gene expression signatures from  Amara e and singii.Necessary transformation of immune trait values in TCGA for use in genetic analysis described below are annotated in  “Table SFor calculation of immune traits in a new dataset, consult  methods Prepare curated set immune traits genes.2.Calculate Pearson correlations of continuous values of the 139 immune traits.3.a.Cluster correlation matrix using complete agglomerative hierarchical clustering method and (1-correlation) as distance metric.Generate a correlation heatmap with a hierarchical clustering dendrogram.4.Identify highly correlated blocks (dendrogram clusters) of immune traits to generate immune functional modules.Note: Scripts and code description used in this section are available at: https://github.com/rwsayaman/TCGA_PanCancer_Immune_Genetics.139 immune traits used in the analyses were curated from  by selecImmune Traits.Direct link: Timing: 2 weekshttps://cnsgenomics.com/software/gcta).5.a.Formatted input file of TCGA immune traits is provided in the  GitHub rFormat immune trait input file:Heritability analysis on 139 traits is conducted using a mixed-model approach implemented in the genome-wide complex trait analysis (GCTA) software package with the genomic-relatedness-based restricted maximum-likelihood (GREML) method  Yang et. This ca6.a.Ancestry assignments for each TCGA individual are provided in “Table S1. TCGA Sample List Used in the Analysis” from .b.Formatted input file of TCGA patient barcodes assigned to each genetic ancestry cluster is provided in the  GitHub rIdentify genetic ancestry assignment of each individual and create a filtered sample list for each genetic ancestry cluster:“Immune.pheno.139.source.coded.TCGAID.9769.txt”.“TCGAID_Cluster1.EUR.8036.txt”“TCGAID_Cluster2.ASIAN.605.txt”“TCGAID_Cluster3.AFR.904.txt”7.European=7,813, NAfrican=863, NAsian=570, and NAmerican=209 individuals), subset individuals belonging to specified ancestry group from the QC TCGA HRC imputed genotyping data in PLINK (--keep) using ancestry assignments.To conduct heritability analyses within each ancestry subgroup .8.Estimate the genetic relatedness matrix (GRM) from all the autosomal SNPs with MAF > 0.01 within each ancestry group using GCTA:gcta64 --bfile [input_filename]--autosome--maf 0.01--make-grm--out [output_filename]--thread-num [numeric_value_number_threads]“qsub_plink_whitelist_geno_mind_unique.indv_chr.auto_hardy.nonriskSNP_maf_uniqueSNP_TCGAID_ancestry.txt”.See script:9.Filter out individuals for relatedness. GCTA removes one of a pair of individuals with estimated relatedness larger than the specified cut-off value (cut-off = 0.05):gcta64 --grm [input_filename]--grm-cutoff 0.05--make-grm--out [output_filename]“qsub_gcta_whitelist_geno_mind_unique.indv_chr.auto_hardy.nonriskSNP_maf_uniqueSNP_TCGAID_ancestry_grm.txt”.See script:10.Run GCTA GREML unconstrained  to estimate variance explained by SNPs with defined categorical and continuous covariates using the following parameters:gcta64 --reml-no-constrain--grm [input_filename]--pheno [immune_trait_matrix_filename]--mpheno [immune_trait_numeric_index_input_matrix]--covar [categorical_covariates_filename]--qcovar [continuous_covariates_filename]--thread-num [numeric_value_number_threads]--out [output_filename]“qsub_gcta_whitelist_geno_mind_unique.indv_chr.auto_hardy.nonriskSNP_maf_uniqueSNP_TCGAID_ancestry_grm_grm.cutoff.0.05.txt”.CRITICAL: Run heritability analysis unconstrained. This will produce heritability estimates (Vg/Vp) and standard deviations outside the 0–1 range.11.From GCTA GREML “.hsq” result file, extract the ratio of genetic variance to phenotypic variance (Vg/Vp), estimate and SE; the LRT p-value and sample size (n) for each immune trait.12.a.Annotate each result file with the corresponding immune trait, immune category and immune module .b.Append annotated result files from each immune trait.Concatenate heritability analysis results across all immune traits tested.13.Correct for multiple-hypothesis testing ancestry group by calculating the FDR p-value using the Benjamini-Hochberg adjustment method.14.Optional: Visualize % heritability (Vg/Vp ∗ 100) across all immune traits per ancestry group for exploratory data analysis.Note: Scripts used in this section are available at: https://github.com/rwsayaman/TCGA_PanCancer_Immune_Genetics.See script: “qsub_grm.cutoff.0.05_greml_EUR.ImmunePheno216_CancerTypeSex.covar_PCA.AgeYears.qcovar.txt”.Heritability Analysis. The example code in this section were optimized for the high-performance compute environment at UCSF HPC employing Portable Batch System (PBS) job scheduling; consult your system administrator to adapt the provided code to your system.Direct link: https://www.cri-iatlas.org/), in the “Germline Analysis” module  analysis in PLINK in each ancestry cluster (--genome) and filter individuals out for relatedness (pihat < 0.25). This leaves n=9,603 unrelated individuals in the TCGA cohort in the output file:GWAS were performed on traits that we found to have significant heritability since these would be most likely driven by common genetic variants.16.Recalculate allele frequencies in PLINK for the subset of individuals used in the analysis in PLINK:plink --bed [input_bed_filename]--bim [input_bim_filename]--fam [input_fam_filename]--allow-no-sex--keep-allele-order--keep [GWAS.IBD.ALL.TCGAID.txt]--freq--out [Freq/output_filename]“GWAS.IBD.ALL.TCGAID.txt”.17.Prepare the covariate file:See script: “qsub_plink_freq_GWAS.IBD.ALL.txt”.18.Prepare the phenotype file:“covar.GWAS.IBD.ALL.txt”.19.Run linear association analysis for each continuous immune traits in PLINK:plink --bed [input_bed_filename]--bim [input_bim_filename]--fam [input_fam_filename]--allow-no-sex--keep-allele-order--keep [GWAS.IBD.ALL.TCGAID.txt]--pheno [Immune.phenotype.33.Set∗.GWAS.txt]--all-pheno--covar [covar.GWAS.IBD.ALL.txt]--linear hide-covar--out [output_filename]“Immune.phenotype.33.Set∗.GWAS.txt”.20.Run logistic regression on dichotomized discrete immune traits in PLINK by modifying the code in step 19 using the logistic command (--logistic).Note: “.bed”, “.bim” and “.fam” input files are provided separately in the sample code because SNP ID names from the original HRC imputed dataset were renamed with alleles listed in alphabetical order to assist matching with other datasets. This only affects the SNP ID name and not the encoding of the A1 and A2 alleles in PLINK which is maintained.21.−8 and suggestive significance at p < 1 × 10−6 in our study.Filter resulting summary statistics from PLINK based on test p-values (P in PLINK). Genome-wide significance was defined at p < 5 × 10See script: “qsub_plink_linear_GWAS.IBD.ALL_Immune.33.Wolf.Set1.txt”.See script:22.Optional: Visualize results for exploratory data analysis:a.Manhattan plot, plotting GWAS -log10 p-value against the base pair position per chromosome.b.Quantile-quantile plot (Q-Q plot), plotting the quantile distribution of observed p-values for each SNP against expected values from a theoretical χ2-distribution; calculate the genomic inflation factor (lamba), the median of the χ2 test statistics divided by the expected median of the χ2 distribution.Note: Interactive visualization of GWAS from (https://www.cri-iatlas.org/), in the “Germline Analysis” module or using the PheWeb tool (https://pheweb-tcga.qcri.org/) .i.Map the Minimac3 HRC imputation information to the GWAS summary stats using the variant identifier.See script: “r_plotResults_GWAS.IBD.ALL_Immune.33.Set∗.r” and "qsub_r_plotResults_GWAS.IBD.ALL_Immune.33.Set∗.txt".The Minimac3 HRC imputation information for each SNP (extracted from the filtered chr∗.info.rsq0.5.gz), including whether SNP was genotyped or imputed (Genotyped), the estimated value of the squared correlation between imputed genotypes and true, unobserved genotypes (Rsq), the average probability of observing the most likely allele for each haplotype , minor allele frequency of the variant in the imputed data (MAF)  for the GWAS study set  calculated from “c.https://www.rdocumentation.org/packages/BSgenome/versions/1.40.1/topics/SNPlocs-class).i.Transform GWAS results chromosome and base pair position into a GRanges object using the R “GenomicRanges” package.ii.Define the set of SNPs as the “SNPlocs.Hsapiens.dbSNP144.GRCh37” dataset.iii.Overlap the GRanges chromosome and base pair position with the “SNPlocs.Hsapiens.dbSNP144.GRCh37” dataset using the snpsByOverlaps function.iv.Merge annotated data with results file.Note: Not all SNPs have corresponding rsIDs.See script: “r_annotation_SNP.r".Map the genomic chromosome and base pair position to corresponding SNP rsIDs and IUPAC nucleotide ambiguity codes using the R “SNPlocs.Hsapiens.dbSNP144.GRCh37” package (d.grch37.ensembl.org (https://uswest.ensembl.org/info/data/biomart/index.html).i.Create SNP information table (setSNPTable function) using SNP rsID, chromosome and base pair position.ii.grch37.ensembl.org.Create a gene information table (setGeneTable function) using gene attributes  extracted from R “biomaRt” package using host iii.Find overlaps of the SNP and gene information tables, setting the margin (bp) to the desired distance from SNP of interest (makeGeneSet function).See script: “r_annotation_SNP.r".The nearest genes to SNP of interest  using R “snplist” package to map rsID to gene maps extracted via the R “biomaRt” package using host e.i.Map the VEP annotation file  with:a.24.a.Annotate each summary stat file with the corresponding immune trait, immune category and immune module  summary stats across all immune traits tested.25.−8). This excludes the HLA locus on chr 6 which spans ∼3.5 MB.Identify genome-wide significant loci as SNPs within 50 KB region with at least one genome-wide significant SNP (p < 5 × 10Note: Scripts and code description used in this section are available at: https://github.com/rwsayaman/TCGA_PanCancer_Immune_Genetics.“r_plotResults_GWAS.IBD.ALL_Immune.33.Set∗.r” and "qsub_r_plotResults_GWAS.IBD.ALL_Immune.33.Set∗.txt".Genome-Wide Association Study (GWAS). The example code in this section were optimized for the high-performance compute environment at UCSF HPC employing Portable Batch System (PBS) job scheduling; consult your system administrator to adapt the provided code to your system.Direct link: Timing: 1–2 dayshttps://egg2.wustl.edu/roadmap/web_portal/chr_state_learning.html#exp_18state.This section describes the mapping of genome-wide significant and suggestive SNPs to the Roadmap Epigenomics Project Epigenomic Expanded 18-state model which uses 6 marks across 98 epigenomes: 26.a.Import the GWAS suggestive and genome-wide significant SNP result table into R.b.Create a unique data frame of SNP IDs, chromosome and base pair positions.c.Convert into GRanges object using the makeGRangesFromDataFrame function in “GenomicRanges” package.Transform the Immune-Germline GWAS suggestive and genome-wide significant SNPs results table into a GRanges object using the “GenomicRanges” package in R.27.a.Using “rtracklayer” package in R, import each epigenome bed file with the annotated Epigenomic Expanded 18-state model.b.At each GRanges SNP chromosome and base pair position, extract the corresponding epigenomic state from each epigenome using the mergeByOverlaps function in “GenomicRanges” package.Iteratively loop and import each Roadmap Epigenomics Project epigenome, and extract epigenomic states that overlap each of the Germline-Immune SNP chromosome and base pair position.28.Map epigenome IDs to corresponding epigenome descriptions of source cell types and tissue types using the “Roadmap.metadata.qc.jul2013.csv” annotation file.29.Annotate epigenetic states with published color schema using “FigureColors.csv” file.30.Manually curate immune-associated epigenomes via cell type or tissue of origin .Note: Scripts and code description used in this section are available at: https://github.com/rwsayaman/TCGA_PanCancer_Immune_Genetics..26.TransEpigenomic Analysis.Direct link: Timing: 1 weekhttps://gtexportal.org/home/index.html. For the TCGA dataset, the gene expression matrix was downloaded from: https://gdc.cancer.gov/about-data/publications/pancanatlas and analysis was conducted locally.31.a.i.Download gene expression matrix: “EBPlusPlusAdjustPANCAN_IlluminaHiSeq_RNASeqV2.geneExp.tsv”.ii.https://grch37.ensembl.org/biomart/martview/. Required columns from the “mart_report.txt” output files are: “Chromosome”, “Start”, “End”, and “Gene type”.Download genes’ starts, ends, and types  from “biomaRt” package from iii.Transpose the gene expression matrix. This can be run with R script “OrganizeRNAMatrix.R”.iv.Run association analysis between genome-wide and suggestive SNPs and genes within 1 MB using a linear regression model accounting for genetic ancestry PC1-7, sex, age, and cancer type . This cv.Summarize outcome: results will have the following: chromosome, position, gene name, distance from gene, pan-cancer sample size, pan-cancer effect size, pan-cancer p-value, and then the same information repeated for each cancer type.eQTL.b.i.https://gdc.cancer.gov/about-data/publications/PanCanAtlas-Splicing-2018.Download 5′, 3′, exon skipping, intron retention, and mutually exclusive exon splice events data from ii.Organize the data input and format it for SNP-splicing event association analysis. Use “script PrepareData.sh”. This script keeps the genes that mapped to the most significant SNPs . Example: grep –f ListGenes.txt splice3prime > Data_3prime. It creates two more files that contain TCGA subject IDs, and splicing event IDs and types. It finally runs an R script “Analyze.R” that performs association analysis between SNP genotypes and splicing events using linear regression model accounting for genetic ancestry PC1-7, sex, age, and cancer type .iii.Summarize outcome, an output file containing association results as follows: chromosome, position, ensemble ID, gene name, splicing event ID.sQTL.TCGA Analysis.32.a.i.Import the GRanges object of SNP chromosome and base pair positions from 13.ii.Load the chain file “AH14150” for Homo sapiens rRNA hg19 to hg38 from the “AnnotationHub” package in R.iii.Convert SNP chromosome and base pair positions from build GRCh37 to build GRCh38 using the liftOver function in the “rtracklayer” package in R.See script: “GWAS.SNPs_liftOver.GRCh38_extended.r”.Convert all GWAS suggestive and genome-wide significant SNP chromosome and base pair positions from build GRCh37 to build GRCh38 to match GTEx annotation.b.i.From each tissue type, extract only GTEx eQTL SNP results that match the GWAS SNP GRCh38 chromosome and base pair position. The output is an R object of GTEx eQTL for suggestively significant variants.See script: “GTEx.eQTL.all.assoc_extract_GWAS.sugg.SNPs.server.r”ii.Concatenate filtered GTEx eQTL files from each tissue corresponding to the GWAS suggestively significant variants. Iteratively load, annotate with tissue source, extract GRCh38 chromosome and base pair position from variant ID, and append each file into a single data frame in R.iii.Calculate the false discovery rate (FDR) per variant across all genes and all tissues.iv.Using the GTEx Ensembl IDs, map to gene symbol and Entrez IDs using the “EnsDb.Hsapiens.v86” package in R.v.Merge with Immune-Germline SNP annotation.vi.Extract GTEx eQTL results for variant-gene pairs with an FDR < 0.05 in at least one tissue. Exclude the HLA and IL17R locus which are simple eQTLs.vii.Optional: Visualize results by plotting the GTEx eQTL -log10 FDR p-value against the distance from the TSS (“tss_distance”).See scripts: “GTEx.eQTL.all.assoc_processResults_GWAS.sugg.SNPs_extended.r” and “GTEx.eQTL.all.assoc_processResults_GWAS.sugg.SNPs_1mb_extended_plot.r”.eQTL.c.i.From each tissue type, extract only GTEx sQTL SNP results that match the GWAS SNP GRCh38 chromosome and base pair position. The output is an R object of GTEx eQTL for suggestively significant variants.ii.Run the Linux bash script “run_split_sqtl.sh”. Each GTEx sQTL file is very large. This step separates the large GTEx sQTL file into a number of small files. The input of this script is a list of file names for GTEx sQTL. Each line of this input file is a file name for GTEx sQTL. The script generates a number of small files for each original GTEx sQTL file.iii.Run the R script “r_extract.txt”. This script takes 2 input files. One is an R object for GWAS suggestively significant variants. The other input file is the GTEx sQTL file generated from the previous step. The output is an R object of GTEx sQTL for suggestively significant variants.iv.Concatenate filtered GTEx sQTL files from each tissue corresponding to the GWAS suggestively significant variants. Iteratively load, annotate with tissue source, extract GRCh38 chromosome and base pair position from variant ID, and append each file into a single data frame in R.v.For sQTL, limit analysis to +/- 500 KB region. Filter the resulting concatenated GTEx sQTL file using the absolute value of the “tss_distance”, set a threshold ≤ 500,000 bp.vi.Calculate the false discovery rate (FDR) per variant across all genes and all tissues.vii.Using the GTEx Ensembl IDs, map to gene symbol and Entrez IDs using the “EnsDb.Hsapiens.v86” package in R.viii.Merge with Immune-Germline SNP annotation.ix.Extract GTEx sQTL results for variant-gene pairs with an FDR < 0.05 in at least one tissue. Exclude the HLA and IL17R locus which are simple eQTLs.x.Optional: Visualize results by plotting the GTEx sQTL -log10 FDR p-value against the distance from the TSS (“tss_distance”).Note: Scripts and code description used in this section are available at: https://github.com/rwsayaman/TCGA_PanCancer_Immune_Genetics.See scripts: “GTEx.sQTL.all.assoc_processResults_GWAS.sugg.SNPs_500kb _extended.r” and “GTEx.sQTL.all.assoc_processResults_GWAS.sugg.SNPs_500kb_extended_plot”.sQTL.GTEx Analysis.This section describes eQTL and sQTL analysis in TCGA and GTEx data. For GTEx data, eQTL/sQTL summary statistics across tissues were downloaded from Expression and splicing quantitative trait locus analysis (eQTLs and sQTL). The example code in this section were optimized for the high-performance compute environment at UCSF HPC employing Portable Batch System (PBS) job scheduling; consult your system administrator to adapt the provided code to your system.Direct link: Timing: 1 Week33.a.Create a file to determine SNP-gene-trait to be tested for colocalization. Run R script “DetermineRegions.R”. This script reads eQTL results and keeps SNP-gene eQTL FDR p < 0.1. Output of this script will be a file that contains 5 columns: chromosome, position, gene name, trait, and SNP significance (GW or suggestive).b.For each SNP-gene pair, run eQTL analysis between the SNP and the gene, and also between the 200 extra SNPs centered at the selected SNP and the gene. Use R script “RunEQTL.sh”. This script creates a folder for each SNP-gene pair. It extracts the list of 201 SNPs, calculates LD matrix (plink –bfile EXTRACTED –r square –out EXTRACTED), and performs GWAS and eQTL association analysis using the “eQTL.R” R script. “eQTL.R” script outputs two files: one for GWAS and one for eQTL analysis containing the z-score, beta, and p-value.c.eCAVIAR -o coloc_c1.out -l EXTRACTED.ld -l EXTRACTED.ld -z GWAS.z -z eQTL.z -f 1 -c 1Run eCAVIAR using “RunECAVIAR.sh” script. It calls eCAVIAR as follows:The “GWAS.z” and “eQTL.z” are the z-score produced in the previous step. “EXTRACTED.ld” is a 1-line file that contains the LD between the selected SNP and the 200 SNPs surrounding it (100 SNP to the left and 100 SNPs to the right). The -c flag indicates the number of causal variants assumed in the model . The output that contains the colocalization posterior probability (CLPP) for each SNP  is “coloc_c1.out_col”.d.The same strategy is conducted for sQTL results.TCGA Analysis.34.a.Run the R script “r_match_tcga_gtex.txt” to match the effect allele between GTEx eQTL/sQTL results and TCGA GWAS results. It then calculates Z scores for both GTEx eQTL/sQTL and TCGA GWAS results.b.i.A table for index SNPs. The 1st column should be SNP ID and the 3rd column should be base-pair position in build 38.ii.A list of GTEx eQTL/sQTL results. Each line is the name of a GTEx eQTL/sQTL result. The last part of the file name should be “_rsid.txt”. Each GTEx eQTL/sQTL result file has the following columns: “gene_id”, “variant_id”, “tss_distance”, “ma_samples”, “ma_count”, “maf”, “pval_nominal”, “slope”, and “slope_se”.iii.A PLINK “.bim” file for TCGA genotype data. It has the following columns: chromosome, SNP ID, genetic distance, base-pair position, minor allele, and major allele.iv.A GWAS result file for TCGA. It has the following columns: chr:bp, CHR, SNP ID, BP, A1, A2, Genotyped, Rsq, AvgCall, MAF, Stratified.Freq, NCHROBSTEST, NMISS, BETA, STAT, and P.This R script requires 4 input files:c.i.Z score for GTEx eQTL/sQTL result.ii.Z score for TCGA GWAS result.iii.The list of SNPs in GTEx eQTL/sQTL result.iv.The list of SNPs in TCGA GWAS result.v.The list of SNPs and effect alleles in GTEx eQTL/sQTL result.vi.The list of SNPs and effect alleles in TCGA GWAS result.This R script generates 6 output files:d.Output files iii-vi will be used to generate LD matrix for eCAVIAR. Output files i and ii will be used directly for eCAVIAR.e.i.Run the python script “make_plink_command_gtex.py” and “make_plink_command_tcga.py” to generate PLINK commands for GTEx and TCGA separately. The output is a Linux bash file that contains a number of PLINK commands.ii.Run the bash file from steps 34e–i.plink --bfile /wynton/scratch/dhu/gtex_geno/GTEx_WGS_chr11--extract snps_gtex_ENSG00000005801_Nerve_Tibial_ZNF195_rs7951724.txt --make-bed --out temp_gtexplink --bfile temp_gtex --a1-allele snps_alt_gtex_ENSG00000005801_Nerve_Tibial_ZNF195_rs7951724.txt 2 1 --recode A --out Geno_gtex_ENSG00000005801_Nerve_Tibial_ZNF195_rs7951724Example for GTEx:plink --bfile/wynton/scratch/dhu/tcga_geno/tcga_imputed_hrc1.1_noMissnp_b38_chr11 --extract snps_tcga_ENSG00000005801_Nerve_Tibial_ZNF195_rs7951724.txt --make-bed --out temp_tcgaplink --bfile temp_tcga --a1-allele snps_alt_tcga_ENSG00000005801_Nerve_Tibial_ZNF195_rs7951724.txt 2 1 --recode A --out Geno_tcga_ENSG00000005801_Nerve_Tibial_ZNF195_rs7951724Example for TCGA:Run PLINK commands to generate numeric genotype data for GTEx and TCGA for SNPs that were extracted as output files iii and iv from the previous step.f.Run the R scripts “r_cor_gtex.txt” and “r_cor_tcga.txt” to calculate Pearson correlation coefficients for each pair of SNPs in GTEx and TCGA genotype data. There are 2 input files for each R script. The 1st one is the genotype file that was generated from the previous step. The 2nd one is the file with SNP ID and alternate allele. This file was generated as the output file 5 or 6 in the step for running “r_match_tcga_gtex.txt”.g.i.Run the python script “make_ecaviar.py” to generate commands to run eCAVIAR. The output is a Linux bash script that contains a number of eCAVIAR commands.ii.Run the Linux bash script from steps 34g–i.eCAVIAR -l Cor_tcga_ENSG00000281491_Minor_Salivary_Gland_DNAJB5-AS1_rs72729406.txt -l Cor_gtex_ENSG00000281491_Minor_Salivary_Gland_DNAJB5-AS1_rs72729406.txt -z Result_tcga_ENSG00000281491_Minor_Salivary_Gland_DNAJB5-AS1_rs72729406.txt -z Result_gtex_ENSG00000281491_Minor_Salivary_Gland_DNAJB5-AS1_rs72729406.txt -c 2 -f 1 -o Result_eCAVIAR_c2_ENSG00000281491_Minor_Salivary_Gland_DNAJB5-AS1_rs72729406.txtNote: All programming scripts for GTEx colocalization were run on the UCSF Wynton HPC (https://wynton.ucsf.edu/hpc/) employing Portable Batch System (PBS) job scheduling. An example of script for submitting jobs on the cluster is “qsub_run_plink_gtex.txt”. The command for submitting the job is “qsub_run_plink_gtex.txt” and depends on the setup of the HPC cluster; consult your system administrator to adapt the provided code to your system.Note: Scripts and code description used in this section are available at: https://github.com/rwsayaman/TCGA_PanCancer_Immune_Genetics.Example:Run eCAVIAR assuming 2 causal SNPs.GTEx Analysis.This section describes colocalization analysis performed with eCAVIAR. This analysis was performed using TCGA and GTEx gene expression data. This analysis requires four input files: (1) GWAS summary statistics, (2) eQTL summary statistics, (3) LD matrix computed with GWAS data, and (4) LD matrix computed with genotype data used for eQTL analysis.Colocalization with eCaviar and manual curation of the expanded region.Direct link: Timing: 1 week35.Download VCF germline file  see “ke”. Sub-se36.Download annotations of curated Pathogenic and Likely Pathogenic Cancer Predisposition Variants from , which 37.a.Extract unique variants from “Table S2” from  and writb.bcftools view -r $i PCA.r1.TCGAbarcode.merge.tnSwapCorrected.10389.vcf.gz -O b -o CHR"$i".bcf.gzSplit downloaded vcf file per chromosome as follows, where “i” is the chromosome number:c.bcftools norm -Ou -m -any CHR"$i".bcf.gz | bcftools norm -Ou -f human_g1k_v37.fasta | |bcftools --missing-to-ref | bcftools annotate -Ob -x ID -I +'%CHROM:%POS:-:%ALT' -O z -o CHR"$i"_norm.vcf.gzLeft normalize variants:d.bcftools +setGT CHR"$i"_norm.vcf.gz -O z -o CHR"$i"_norm_nomissing.vcf.gz -- -t . -n 0pReplace missing genotypes by homozygous reference:e.plink --vcf CHR"$i"_norm_nomissing.vcf.gz --keep-allele-order --vcf-idspace-to _ --const-fid --allow-extra-chr 0 --split-x 2699520 154931044 no-fail --make-bed --out CHR"$i"_norm_nomissingConvert vcf files to PLINK formatted files:f.plink --bfile CHR"$i"_norm --extract range list_snps.txt --recode A --out OUT$i --allow-no-sexExtract the variant list prepared in step 37a and recode them mutations additively:Annotate per-sample mutations using position information available in “Table S2” from .a.Extrac38.Collapse mutations into genes .39.Collapse genes into mutually exclusive pathways , run lib.For phenotypes with skewed distribution, dichotomize values as low vs high , run loPerform pan-cancer analysis.45.a.Repeat steps 44a–b, without including cancer type as covariate.Peform per-cancer analysis.46.Generate outcome summary: exome files related to samples for which all the covariates and at least one immune trait was available should result in a master file of N = 9,138 samples. There will be 832 pathogenic/likely pathogenic SNPs/Indels events with at least one copy of rare allele in the whole exome sequencing data, corresponding to 586 distinct pathogenic SNPs/Indels mapping to 99 genes. The regression analysis provides p-values and beta coefficients of the association with immune traits.Note: Scripts and code description used in this section are available at: https://github.com/rwsayaman/TCGA_PanCancer_Immune_Genetics.This section includes a workflow to assess the contribution of rare cancer predisposition variants on different immune traits.Rare Variant Analysis.Direct link: The analysis protocols described above each yield data output files, as described above. Expected output files are summarized here. Data visualization tools enable researchers to explore these results interactively.https://cnsgenomics.com/software/gcta/#GREMLanalysis. The combined results table include the ratio of genetic variance to phenotypic variance (Vg/Vp) estimate and SE; the likelihood-ratio test (LRT) p-value and sample size (n) for each immune trait; and the FDR p-value across all immune traits.Output files from GCTA GREML is an .hsq file. For complete description of output variables, see: After conducting heritability analysis across 139 immune traits, we identified 10 immune traits with significant heritability (FDR p < 0.05), and 23 other traits with nominally significant heritability (p < 0.05) in at least one ancestry group. Within the European ancestry group, 28 traits had at least nominally significant heritability .https://www.cog-genomics.org/plink/1.9/formats#assoc_linear). After optional SNP annotation, addition columns include: the rsID and IUPAC nucleotide ambiguity codes from “SNPlocs.Hsapiens.dbSNP144.GRCh37”; the Genotyped, Rsq, AvgCall, MAF columns from Minimac3 HRC imputation information file; the recalculated MAF for the GWAS samples ; nearest genes to SNP of interest ; VEP annotation.The output from performing GWAS in PLINK consist of .assoc.linear (or .assoc.logistic) files with the following columns: chromosome code (CHR), variant identifier (SNP), base-pair coordinate (BP), allele 1 (A1), allele 2 (A2), test identifier (TEST) number of observations with nonmissing genotype, phenotype, and covariates (NMISS), regression coefficient , t-statistic (STAT) and asymptotic p-value for t-statistic (P). Note, running the PLINK command with parameter --keep-allele-order forces the original A1/A2 allele encoding and A1 should be the minor allele as originally encoded. PLINK output files are further described here: (−8) associations at 23 loci for 10 immune traits. We also identified an additional 1,196 suggestive (p < 1 × 10−6) associations for 33 traits .The output table includes all genome-wide and suggestively significant SNPs annotated with the mapped epigenetic state from the Roadmap Epigenomics Project Expanded 18-state model. Each epigenome ID/epigenome represent a column with entries designating the epigenetic state  at the SNP chromosome and base pair position .Output files for eQTL will have the following: chromosome, position, gene name, distance from gene, pan-cancer sample size, pan-cancer effect size, pan-cancer p-value, and then the same information repeated for each cancer type.Output file for sQTL will contain association results as follows: chromosome, position, ensemble ID, gene name, splicing event ID.10 QTL p-value of the index SNP and counter SNP, and difference between these values (delta Counter SNP-Index SNP); and the curated expanded range colocalization evidence assessment .Exome files related to samples for which all the covariates and at least one immune trait was available should result in a master file of N = 9,138 samples. There will be 832 pathogenic/likely pathogenic SNPs/Indels events with at least one copy of rare allele in the whole exome sequencing data, corresponding to 586 distinct pathogenic SNPs/Indels mapping to 99 genes. The regression analysis provides p-values and beta coefficients of the association with immune traits .https://www.cri-iatlas.org/), in the "Germline Analysis" module (https://pheweb-tcga.qcri.org/) was setup to visualize GWAS summary statistics of all tested immune traits  is prepopulated with data and results from .The CRI iAtlas "Germline Analysis" module  p-values. The GWAS section provides visualization of significant GWAS hits (p < 10−6), and colocalization results with colocalization posterior probability (CLPP) > 0.01. See tutorial  visualizes GWAS summary statistics of all tested immune traits . SNP significance can be also shown for a specific SNP across all tested traits. External resources for SNPs can be accessed from PheWeb .This protocol and related scripts are tailored for the analyses of matched genomic and immune trait datasets in TCGA but can be applied to other datasets with similar structures. The majority of analyzed immune traits are derived from gene expression data and can be adapted to other studies. Code used for the generation of immune traits from gene expression data are provided, and have been previously applied to RNA-sequencing  and micrBelow we reported specific limitations related to each step of the protocol.Immune Traits: Immune signatures lack cancer-specific cell type resolution. The majority of immune traits were calculated based on specific gene sets from expression data (RNA-sequencing) from bulk tissue to generate estimates of immune cell activation or abundance using different enrichment or deconvolution techniques. Caution should be exercised when interpreting results in the context of specific tumors or cell types. However, many of these signatures were validated in specific tissues and cancers via FACS sorting or immunohistochemistry/immunofluorescence imaging of immune populations.Many of the immune signatures are highly correlated and not independent measures. Interpretation of results should be considered in context of functional modules defined as clusters of highly correlated signatures. Distribution of immune trait values in the dataset should be considered, and transformation of the data should be performed as needed to approximate a normally distributed set. Traits with a high fraction of zero values should be considered for dichotomization.Heritability Analysis: For heritability estimates run via GCTA GREML, the GCTA FAQ (https://cnsgenomics.com/software/gcta/#FAQ) states that at least 3,160 samples from unrelated individuals are needed to get estimates with standard errors (SEs) down to 0.1 for common SNPs. Only the European ancestry group meets this criterion. Nonetheless, heritability estimates were run in the smaller sized ancestry groups with expectation of large SEs to provide preliminary analyses of immune traits in ancestry groups that are not well studied or sampled.Heritability analysis takes into account only common variants. In this protocol, we used MAF > 1% as cut-off. Contribution of rare variants are not accounted for and may explain “missing" heritability.GWAS: Linear regression assumes the residuals are normally distributed. Immune traits with skewed distributions were first log10 transformed, those assessed to have close to normal distribution were used as continuous variables. However, some immune traits remained with very skewed distributions due to a high fraction of 0 values, these traits were converted to binary 0 and 1 values based on the median value and logistic regression was performed instead (see “Table S2” (able S2” ).GWAS was run pan-cancer on the non-hematologic cancers in TCGA which vary in cohort size from 36 (CHOL) to 999 (BRCA). Results may be representative of the most common cancers in TCGA. Post hoc analysis evaluation of associations per cancer (forest plots) can provide insight in the directionality of the betas per cancer and identify potential outliers.2 ≥ 0.5 and MAF ≥ 0.5% as cut-offs for inclusion. The HRC panel (version 1) consists of 64,976 haplotypes at >39M SNPs constructed from 20 whole genome sequencing studies , per-cancer analysis might reveal additional cancer-specific hits, which might be compared with the ones in the related tissue. Because of the relatively limited number of samples available for each cancer type, per-cancer GWAS and colocalization should be preferentially performed by combining additional cancer-specific sources containing both phenotypic and genotypic data beyond TCGA.Colocalization: Our protocol performed colocalization within a 200 SNP window (+/- 100 from the index SNP). In some cases, we observed that there were SNPs outside of that window that had better association with gene expression but weaker or no association with the immune trait. Therefore, we also performed a manual inspection of the entire locus . We only performed this expanded region analysis of colocalization if there was plausible evidence of colocalization (eCAVIAR CLPP > 0.01) for the 200 SNP window. This expanded region analysis was intended to provide a more stringent criterion.10 p-value of association with the immune trait for each SNP in the region on the X-axis and the negative log10 p-value for association with the relevant gene expression  or splicing event . If we found additional SNPs outside of the 200 BP window and they demonstrated a stronger effect for association with gene expression or the sQTL and weaker association with the index SNP, we developed additional criteria for colocalization. If we identified one or more SNPs outside of the window that had a –log10 p-value with expression or splicing that was > 1.5 than the index SNP, we considered that as negative evidence for colocalization. If the SNP(s) with stronger evidence for eQTL or sQTL association had a –log10 p-value that was ≤1.5 compared with the index SNP, we considered the evidence for colocalization as “intermediate.” Finally, if we found no other SNP in the entire region with strong eQTL or sQTL that had a better p-value than the index SNP and the eCAVIAR results gave a posterior probability of colocalization of > 0.01, we considered the evidence to be “strong.”To perform these, we plotted the negative logWhile we used this manual second step in addition to eCAVIAR, an alternative approach would have been to use COLOC . This paWithin the TCGA dataset, colocalization was performed on a pan-cancer level. This analysis can be conducted on each cancer type separately, assuming that GWAS and eQTL analyses are also performed for each cancer type separately. Low sample size can be a limiting factor for the per-cancer analysis.Colocalization is based on gene-expression data from TCGA and GTEx but can also be performed in different datasets that might be available.Rare Variant Analysis: In this analysis, we focused on variants occurring in cancer-predisposition genes, as previously annotated by . Different aggregation in functional categories might be defined by the users. Heterogeneity of germline calls and batch effect prevented us to run a comprehensive exome-wide analysis  as previously defined  < 0.05%) .Cannot load software or run scripts on the high-performance compute server. Implementation of provided GitHub code produces error see “”.Consult your institution’s IT or compute cluster administrator for proper installation of necessary software including all needed libraries based on the high-performance compute environment. Ensure that the proper software versions, including all libraries and dependencies, are installed. Software implementation may be version specific, the versions used in the protocol are provided to ensure reproducibility.•https://cnsgenomics.com/software/gcta.For troubleshooting of heritability analysis in GCTA GREML, see: •https://www.cog-genomics.org/plink/.For troubleshooting of GWAS in PLINK, see: •https://github.com/CRI-iAtlas/iatlas-app.For issues with installation of CRI iAtlas, see troubleshooting guide on the software website: Provided code should be considered as a guide. Adjust parameters based on cluster capabilities and specifications. Job submission scripts are dependent on the resource allocation management system. E.g., the provided GitHub codes for heritability analysis and GWAS were optimized for the high-performance compute environment at University of California, San Francisco employing Portable Batch System (PBS) job scheduling; consult your system administrator to adapt the provided code to your system.https://gdc.cancer.gov/about-data/publications/CCG-AIM-2020  but the GTEx data were in Build 38 (GRCh38) (see "https://genome-store.ucsc.edu/) so these two data sets can be compared.We converted the genomic coordinates in TCGA from GRCh37 to GRCh38 using liftOver  the SNP in question was not present in the 1000 Genomes Project data  which warwsayaman@gmail.com.Further information and requests for resources and reagents should be directed to and will be fulfilled by the lead contact, Rosalyn Sayaman, This study did not generate new unique reagents.


Permanent magnet synchronous motors (PMSM) are widely used in industry applications such as home appliances, manufacturing process, high-speed trains, and electric vehicles. Unexpected faults of PMSM are directly related to the significant losses in the engineered systems. The majority of motor faults are bearing fault  and stator fault . This article reports vibration and driving current dataset of three-phase PMSM with three different motor powers under eight different severities of stator fault. PMSM conditions including normal, inter-coil short circuit fault, and inter-turn short circuit fault in three motors are demonstrated with different powers of 1.0 kW, 1.5 kW and 3.0 kW, respectively. The PMSMs are operated under the same torque load condition and rotating speed. Dataset is acquired using one integrated electronics piezo-electric (IEPE) based accelerometer and three current transformers (CT) with National Instruments (NI) data acquisition (DAQ) board under international organization for standardization standard (ISO 10816-1:1995). Established dataset can be used to verify newly developed state-of-the-art methods for PMSM stator fault diagnosis. Mendeley Data. DOI: 10.17632/rgn5brrgrn.5 Specifications Table· This dataset is acquired from three motors with different powers of 1.0 kW, 1.5 kW, and 3.0 kW, respectively. Two different types of faults including inter-turn short circuits and inter-coil short circuits are seeded. This dataset consists of vibration data which represent the shock of the bearing due to torque unbalance by motor stator faults; and, current data which represent the changes of motor driving power.· This dataset is collected according to ISO guideline (ISO 10816-1:1995). Stator faults are artificially seeded using bypassing resistances allocated in inter-coil circuits and inter-turn circuits. Three motors with different powers of 1.0 kW, 1.5 kW, and 3.0 kW are tested under the same experimental setup including rated rotating speed (3000 RPM), rated load condition , sensor location, and their sampling rates .· Considering dataset for fault diagnosis often requires large amounts of effort and time consumption, this dataset can provide a useful dataset in the fault diagnosis research field 1This dataset was established for deep learning based motor fault diagnosis research. Unlike other studies, it is very difficult to obtain data in the fault diagnosis research field because it is difficult to apply an actual failure. Therefore, there are many difficulties in training of deep learning algorithm. To solve this problem, we simulated motor stator faults according to the motor power, and obtained vibration and driving current data according to the severity of their faults. This dataset is measured based on mechanical engineering knowledge in accordance with ISO international standards. This dataset used for verification of the deep learning based fault diagnosis method.2Collected dataset consists of vibration and current data acquired from the three PMSMs with different powers of 1.0 kW, 1.5 kW and 3.0 kW. In each motor, total 16 stator faults are seeded with 8 inter-coil circuit faults and 8 inter-turn circuit faults. The motors rotate at a rated rotating speed of 3000 RPM and rated load condition . The collected dataset is stored in technical data management streaming (TDMS) files. TDMS file format can be accessed easily with other data analysis program such as MATLAB 2). The vibration data file includes z-direction of PMSM for inter-turn short circuit and inter-coil short circuit. The description of the vibration files as per operating and health conditions of the motor are provided as follows:1.1000W_0_00_vibration_interturn.tdms: This file includes healthy inter-turn short circuit vibration data in z-direction acquired from the motor whose power is 1.0 kW.2.1000W_2_26_vibration_interturn.tdms: This file includes inter-turn short circuit fault vibration data in z-direction with 2.26 % severity acquired from the motor whose power is 1.0 kW.3.1000W_2_70_vibration_interturn.tdms: This file includes inter-turn short circuit fault vibration data in z-direction with 2.70 % severity acquired from the motor whose power is 1.0 kW.4.1000W_3_35_vibration_interturn.tdms: This file includes inter-turn short circuit fault vibration data in z-direction with 3.35 % severity acquired from the motor whose power is 1.0 kW.5.1000W_4_41_vibration_interturn.tdms: This file includes inter-turn short circuit fault vibration data in z-direction with 4.41 % severity acquired from the motor whose power is 1.0 kW.6.1000W_6_48_vibration_interturn.tdms: This file includes inter-turn short circuit fault vibration data in z-direction with 6.48 % severity acquired from the motor whose power is 1.0 kW.7.1000W_12_17_vibration_interturn.tdms: This file includes inter-turn short circuit fault vibration data in z-direction with 12.17 % severity acquired from the motor whose power is 1.0 kW.8.1000W_21_69_vibration_interturn.tdms: This file includes inter-turn short circuit fault vibration data in z-direction with 21.69 % severity acquired from the motor whose power is 1.0 kW.9.1000W_0_00_vibration_intercoil.tdms: This file includes healthy inter-coil short circuit vibration data in z-direction acquired from the motor whose power is 1.0 kW.10.1000W_0_68_vibration_intercoil.tdms: This file includes inter-coil short circuit fault vibration data in z-direction with 0.68 % severity acquired from the motor whose power is 1.0 kW.11.1000W_0_81_vibration_intercoil.tdms: This file includes inter-coil short circuit fault vibration data in z-direction with 0.81 % severity acquired from the motor whose power is 1.0 kW.12.1000W_1_01_vibration_intercoil.tdms: This file includes inter-coil short circuit fault vibration data in z-direction with 1.01 % severity acquired from the motor whose power is 1.0 kW.131000W_1_34_vibration_intercoil.tdms: This file includes inter-coil short circuit fault vibration data in z-direction with 1.34 % severity acquired from the motor whose power is 1.0 kW.14.1000W_2_00_vibration_intercoil.tdms: This file includes inter-coil short circuit fault vibration data in z-direction with 2.00 % severity acquired from the motor whose power is 1.0 kW.15.1000W_3_93_vibration_intercoil.tdms: This file includes inter-coil short circuit fault vibration data in z-direction with 3.93 % severity acquired from the motor whose power is 1.0 kW.16.1000W_7_56_vibration_intercoil.tdms: This file includes inter-coil short circuit fault vibration data in z-direction with 7.56 % severity acquired from the motor whose power is 1.0 kW.17.1500W_0_00_vibration_interturn.tdms: This file includes healthy inter-turn short circuit vibration data in z-direction acquired from the motor whose power is 1.5 kW.18.1500W_1_57_vibration_interturn.tdms: This file includes inter-turn short circuit fault vibration data in z-direction with 1.57 % severity acquired from the motor whose power is 1.5 kW.19.1500W_1_88_vibration_interturn.tdms: This file includes inter-turn short circuit fault vibration data in z-direction with 1.88 % severity acquired from the motor whose power is 1.5 kW.20.1500W_2_34_vibration_interturn.tdms: This file includes inter-turn short circuit fault vibration data in z-direction with 2.34 % severity acquired from the motor whose power is 1.5 kW.21.1500W_3_10_vibration_interturn.tdms: This file includes inter-turn short circuit fault vibration data in z-direction with 3.10 % severity acquired from the motor whose power is 1.5 kW.22.1500W_4_57_vibration_interturn.tdms: This file includes inter-turn short circuit fault vibration data in z-direction with 4.57 % severity acquired from the motor whose power is 1.5 kW.23.1500W_8_74_vibration_interturn.tdms: This file includes inter-turn short circuit fault vibration data in z-direction with 8.74 % severity acquired from the motor whose power is 1.5 kW.24.1500W_16_08_vibration_interturn.tdms: This file includes inter-turn short circuit fault vibration data in z-direction with 16.08 % severity acquired from the motor whose power is 1.5 kW.25.1500W_0_00_vibration_intercoil.tdms: This file includes healthy inter-coil short circuit vibration data in z-direction acquired from the motor whose power is 1.5 kW.26.1500W_4_79_vibration_intercoil.tdms: This file includes inter-coil short circuit fault vibration data in z-direction with 4.79 % severity acquired from the motor whose power is 1.5 kW.27.1500W_5_70_vibration_intercoil.tdms: This file includes inter-coil short circuit fault vibration data in z-direction with 5.70 % severity acquired from the motor whose power is 1.5 kW.28.1500W_7_02_vibration_intercoil.tdms: This file includes inter-coil short circuit fault vibration data in z-direction with 7.02 % severity acquired from the motor whose power is 1.5 kW.29.1500W_9_15_vibration_intercoil.tdms: This file includes inter-coil short circuit fault vibration data in z-direction with 9.15 % severity acquired from the motor whose power is 1.5 kW.30.1500W_13_12_vibration_intercoil.tdms: This file includes inter-coil short circuit fault vibration data in z-direction with 13.12 % severity acquired from the motor whose power is 1.5 kW.31.1500W_23_20_vibration_intercoil.tdms: This file includes inter-coil short circuit fault vibration data in z-direction with 23.20 % severity acquired from the motor whose power is 1.5 kW.32.1500W_37_66_vibration_intercoil.tdms: This file includes inter-coil short circuit fault vibration data in z-direction with 37.66 % severity acquired from the motor whose power is 1.5 kW.33.3000W_0_00_vibration_interturn.tdms: This file includes healthy inter-turn short circuit vibration data in z-direction acquired from the motor whose power is 3.0 kW.34.3000W_1_78_vibration_interturn.tdms: This file includes inter-turn short circuit fault vibration data in z-direction with 1.78 % severity acquired from the motor whose power is 3.0 kW.35.3000W_2_13_vibration_interturn.tdms: This file includes inter-turn short circuit fault vibration data in z-direction with 2.13 % severity acquired from the motor whose power is 3.0 kW.36.3000W_2_65_vibration_interturn.tdms: This file includes inter-turn short circuit fault vibration data in z-direction with 2.65 % severity acquired from the motor whose power is 3.0 kW.37.3000W_3_50_vibration_interturn.tdms: This file includes inter-turn short circuit fault vibration data in z-direction with 3.50 % severity acquired from the motor whose power is 3.0 kW.38.3000W_5_16_vibration_interturn.tdms: This file includes inter-turn short circuit fault vibration data in z-direction with 5.16 % severity acquired from the motor whose power is 3.0 kW.39.3000W_9_81_vibration_interturn.tdms: This file includes inter-turn short circuit fault vibration data in z-direction with 9.81 % severity acquired from the motor whose power is 3.0 kW.40.3000W_17_86_vibration_interturn.tdms: This file includes inter-turn short circuit fault vibration data in z-direction with 17.86 % severity acquired from the motor whose power is 3.0 kW.41.3000W_0_00_vibration_intercoil.tdms: This file includes healthy inter-coil short circuit vibration data in z-direction acquired from the motor whose power is 3.0 kW.42.3000W_2_49_vibration_intercoil.tdms: This file includes inter-coil short circuit fault vibration data in z-direction with 2.49 % severity acquired from the motor whose power is 3.0 kW.43.3000W_2_98_vibration_intercoil.tdms: This file includes inter-coil short circuit fault vibration data in z-direction with 2.98 % severity acquired from the motor whose power is 3.0 kW.44.3000W_3_69_vibration_intercoil.tdms: This file includes inter-coil short circuit fault vibration data in z-direction with 3.69 % severity acquired from the motor whose power is 3.0 kW.45.3000W_4_86_vibration_intercoil.tdms: This file includes inter-coil short circuit fault vibration data in z-direction with 4.86 % severity acquired from the motor whose power is 3.0 kW.46.3000W_7_12_vibration_intercoil.tdms: This file includes inter-coil short circuit fault vibration data in z-direction with 7.12 % severity acquired from the motor whose power is 3.0 kW.47.3000W_13_10_vibration_intercoil.tdms: This file includes inter-coil short circuit fault vibration data in z-direction with 13.10 % severity acquired from the motor whose power is 3.0 kW.48.3000W_23_48_vibration_intercoil.tdms: This file includes inter-coil short circuit fault vibration data in z-direction with 23.48 % severity acquired from the motor whose power is 3.0 kW.Vibration data were measured using accelerometer (PCB352C34) and acquired using NI9234 module for 120 seconds with sampling frequency of 25.6 kHz. Each vibration data file contains two columns namely ‘Time Stamp’, and ‘amplitude’. The unit of the vibration amplitude is ‘gravitational constant (g)’ ’. The description of the current files as per operating and health conditions of the motor are provided as follows:33.1PMSM testbed was built to measure the vibration and current data of healthy state and faulty states from PMSMs with different powers as shown in 3.2Failure modes of the motor stator can be categorized into: first, the increase of the resistance of the stator (open-like fault); or second, the decrease of the resistance of the stator (short-like fault). In case of open-like fault, a part of the state coil is damaged increasing the stator resistance so that driving current decreased proportional to the resistance change for given input voltage. Hence this type of failure is relatively easy to detect by reading the overall decrease of the current. On the other hand, most of difficult failures come from the second failure mode such that part of stator coil is damaged to have a short-like circuit between turns ; or between coils . These type of short circuit faults introduce a bypassing path of the driving current so that the normal current flowing through the stator coil is reduced by the Kirchhoff's law. As result, the motor experiences reduction of electro-magnetic field in turn the induced torque as well. Considering these types of short circuit faults, we seeded inter-turn short circuit fault and inter-coil short circuit fault controlling the bypass resistances in the short circuits as follows.Rbypass is the bypassing resistance values, and the R is stator resistance values.The smaller the bypass resistance value, the larger driving current flows to the bypass resistance, then the smaller driving current flows through the motor stator due to Kirchhoff's law. In this case, the severity of the motor's fault is regarded as high. Therefore, the fault was representatively seeded by adding a short circuit connecting turns (or coils) using the bypassing resistance to the motor winding as shown in Human Lab., Department of Mechanical Engineering, Korea Advanced Institute of Science and Technology, Daejeon, South Korea has given the consent that the datasets may be publicly-released as part of this publication. We declare that the manuscript adheres to Ethics in publishing standards and the submitted dataset is the real data recorded in the experiment, and there is no act of stealing other people's data or modifying data.Wonho Jung: Conceptualization, Methodology, Software, Validation, Visualization, Data curation, Writing – original draft, Writing – review & editing. Sung-Hyun Yun: Data curation. Yoon-Seop Lim: Investigation. Sungjin Cheong: Investigation. Yong-Hwa Park: Funding acquisition, Writing – review & editing, Supervision.The authors declare that they have no known competing financial interests or personal relationships that could have appeared to influence the work reported in this paper.


The saccadic pathway involves numerous regions of the brain cortex, the cerebellum and the brainstem. Saccadic movement latency, velocity and precision parameters assess the efficacy of central nervous system (CNS) control over rapid eye movements. Very few disorders which alter the CNS are missed when these parameters are carefully measured using a computer. Pendular tracking assesses the integrity of the oculomotor system in controlling slow eye movements - vulnerable to CNS and vestibular system dysfunctions. Optokinetic nystagmus represents a stereoceptive response which compensates environment movements by psycho-optical inputs.to compare the oculomotricity values found in children with and without learning complaints.prospective study. We included in the study 28 children of both genders, within the age range between 8 and 12 years, with learning disorders (study group) and 15 without (control group). We carried out the fixed and randomized saccadic movement tests, pendular tracking study and optokinetic nystagmus.There was a statistically significant difference between the groups concerning the randomized saccadic movement velocity parameters and in the pendular tracking test.The children with learning disorders presented alterations in some oculomotricity tests when compared to children without complaints. Saccade voluntary control abnormalities have been seen in development disorders such as: dyslexia; learning disorders; hyperactivity and attention deficit. The saccadic pathway involves numerous regions of the brain cortex, cerebellum and brainstem. Latency, velocity and saccadic movement precision parameters assess the central nervous system (CNS) control efficiency over rapid eye movements4Pendular tracking is a test which is strongly affected by the patient's attention span and collaboration. There may be cases of pendular tracking poorly formed in inattentive and non-cooperating patients or even in some elderly individuals, without it meaning a central disorderThe necessary eye movement for reading requires alternate saccade movements and fixation periods. It starts with a saccade that runs for 8 to 10 words mixed with periods of eye fixation and ends with a long saccade in order to start a new lineThe goal of the present study was to compare the eye movement parameters found in children with learning disorders - especially in reading and writing - with children without complaints.QUESTIONNAIRE TEMPLATEChild: ________________________________________________________________Current date: ____/____/ ________Parent/guardian: ________________________________________________________The questionnaire below aims at studying learning difficulties. Please, answer it by checking with a × in the option you think correct and fill in the blanks when requested. The data hereby expressed serve research purposes (data computing) and will be kept confidential. It is very important that you return this form to us. The questionnaire must be returned on the day of the medical consultation.Does your child have or has had:Difficulties reading: yes  no  - Which? _____________________________Difficulties writing: yes  no  - Which? _____________________________Poor school performance: yes  no  Repeated a school year (s): yes  no Why do you think this happened? ___________________________________________________________________________________________________________________________Problems of attention and concentration at school: yes  no The population studied was made up of 43 children of both genders, of age range between 8 and 12 years, being 28 (study group) with diagnosis of learning disorders (reading and writing) and 15 belonging to the control group without any learning disorder. All the children, from both groups, did not wear glasses. We carried out fixed and randomized saccadic movement test, pendular tracking test in the frequencies of 0.20Hz, 0.40Hz and 0.80Hz and optokinetic nystagmus test. Equipment: digital vectonystagmophapher with the VECWIN software, a Neurograff Eletromedicina® bar of led. The parents/guardians received a questionnaire about learning-related symptoms. The analyses were automatically done by the software. As far as eye movements are concerned, we analyzed the following parameters: accuracy ; velocity ; latency  and gain (measure the relationship between eye velocity and the stimulus velocity used in optokinetic and pendular tracking tests)As far as gender is concerned the control and study groups were homogeneous (p= 0.518). The distribution is on In our study we could notice that the mean values found in fixed saccade movements are within normal ranges in digital vectonystagmography in terms of accuracy, latency and velocityChildren with learning disorders have alterations in some eye movement tests when compared to “normal” healthy children.