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.


FST and top 1% of Nucleotide diversity ratio were obtained. After genome annotation, these 122 candidate genomic regions were found to contain a total of 184 candidate genes. Finally, the results of KEGG enrichment analysis showed four significantly enriched pathways (P < 0.05): beta-Alanine metabolism , Pathways in cancer , Non-homologous end-joining (MRE11), Epstein-Barr virus infection . Finally, we identified four important KEGG enrichment pathways and 10 candidate genes that are closely related to milk production in East Friesian sheep. These results provide valuable candidate genes for the study of milk production traits in East Friesian sheep and lay an important foundation for the study of milk production traits.The East Friesian sheep is one of the important high-yielding dairy sheep breeds, but still little is known about their genetic and genomic variation during domestication. Therefore, we analyzed the genomic data of 46 sheep with the aim of identifying candidate genes that are closely related to milk production traits. Our genomic data consisted of 20 East Friesian sheep and 26 Asian Mouflon wild sheep. Finally, a total of 32590241 SNPs were identified, of which 0.61% (198277) SNPs were located in exonic regions. After further screening, 122 shared genomic regions in the top 1% of  In recent years, the rapid development of next-generation sequencing (NGS) technology has provided important techniques and tools for the analysis of genetic traits. This development provides new opportunities to study economically important traits in animals –3. Recenhttps://www.ncbi.nlm.nih.gov/sra). During the analysis, we used methods such as, phylogenetic tree analysis, population genetic structure analysis, principal component analysis (PCA), FST, nucleotide diversity (Pi) and Kyoto Encyclopedia of Genes and Genomes (KEGG).The East Friesian sheep (EFS) is one of the most productive dairy sheep breeds, providing dairy products and by-products needed for daily human life. The East Friesian sheep lactation lasts about 230 days and produces 500–700 kg of milk in a single lactation . East FrAll experiments in this study were carried out in accordance with the approved guidelines from the Regulation of the Standing Committee of Gansu People's Congress. All experimental protocols, including the sample collection protocol, were approved by the Ethics Committee of Gansu Agriculture University (China) under permission no. DK-005.https://www.ncbi.nlm.nih.gov/sra; We selected 10 East Friesian sheep (EFS) from Beijing Aoxin Animal Husbandry Co., LTD., China, for whole-genome resequencing  17). Th. Th17). The main data processing process is as follows: (1) Use Fastp (version: 0.12.4) software to filter the raw data with parameters: fastp --in1 A_1.fastq --in2 A_2.fastq --out1 A_clean_1.fastq --out2 A_clean_2.fastq -h A_fastp.html -j A_fastp.json . (2) Usehttps://evolution.genetics.washington.edu/phylip.html). Finally, FigTree was used to visualize the result file(http://tree.bio.ed.ac.uk/software/figtree/).A total of 32590241 high-quality SNPs were used for principal component analysis and phylogenetic tree construction. Use VCFtools (version: 0.1.16) to generate PLINK format files . Then, tπ) and fixation index  . By com/ θπEFS) . For the ggplot2  and ggEx ggplot2 .FST top1% and the θπ ratio top1% of the genomic interval as candidate regions. ANNOVAR was used to annotate the SNPs in these regions to genes , and the remaining SNP loci were mainly distributed in intergenic and intronic regions  was performed using the SNP dataset obtained above. The results showed that the first PCA axis clearly separated the EFS population from the WS population . We thenFST; FST and the top 1% of the θπ ratio as the final candidate windows. Finally, a total of 122 shared genomic regions were obtained , Pathways in cancer , Non-homologous end-joining (MRE11), Epstein-Barr virus infection .The SNPs in the 122 candidate windows obtained above were annotated to genes using ANNOVAR, and a total of 184 candidate genes were obtained . IncludeIn this study, we performed whole-genome resequencing of 10 East Friesian sheep (EFS) and used whole-genome resequencing data of 10 East Friesian sheep (EFS) and 26 Asian mouflon wild sheep (WS) from the NCBI SRA database to develop subsequent analyses. We used a method similar to the previous study , compareThe population genetic structure of EFS and WS was first analyzed, and the statistical results revealed that in the PCA analysis, PCA1 clearly divided the EFS and WS populations into 2 Clusters . ImmediaFST , pathways in cancer , non-homologous end-joining (MRE11), Epstein-Barr virus infection . Therefore, we predict that these genes play an important role in lactation. For example, the GLI2 gene was identified as a candidate gene for the Chronic subclinical mastitis trait in dairy cows, a disease that, when it occurs, can reduce milk production or lead to culling of cows , pathways in cancer , non-homologous end-joining (MRE11), Epstein-Barr virus infection . Some of these genes were identified as candidates for milk yield traits in dairy cattle studies, but the biological functions that these candidate genes play in milk production in sheep still need further validation. In conclusion, these results provide valuable candidate genes for the study of milk yield traits in East Friesian sheep and lay an important foundation for the study of milk yield traits.This is an analysis of genome-wide data from the East Friesian dairy sheep breed. We identified four important KEGG enrichment pathways and 10 candidate genes that are closely associated with milk yield in East Frisian sheep: beta-Alanine metabolism  can be found below: 22870753 .The animal study was reviewed and approved by Ethics Committee of Gansu Agriculture University (China) under permission no. DK-005. Written informed consent was obtained from the owners for the participation of their animals in this study.FDL, XXZ and WMW designed the experiments. XLL, XXZ, LFY and WMW analyzed the data. XLL wrote the manuscript. DYZ, YZ, JBC, DX and LMZ contributed to sample collection and prepared biological samples. XXZ, WMW and XLL revised the manuscript. All authors read and approved the final manuscript.This work was supported by the Earmarked Found for National Key R&D Program of China (2021YFD1300901), National Natural Science Foundation of China (31960653) and National Joint Research on improved breeds of Livestock and Poultry [grant no.19210365].The authors declare that the research was conducted in the absence of any commercial or financial relationships that could be construed as a potential conflict of interest.All claims expressed in this article are solely those of the authors and do not necessarily represent those of their affiliated organizations, or those of the publisher, the editors and the reviewers. Any product that may be evaluated in this article, or claim that may be made by its manufacturer, is not guaranteed or endorsed by the publisher.


Tilletia indica is a quarantine fungal pathogen that poses a serious biosecurity threat to wheat-exporting countries. Acquiring genetic data for the pathogenicity characters of T. indica is still a challenge for wheat breeders and geneticists. In the current study, double digest restriction-site associated-DNA genotyping by sequencing was carried out for 39 T. indica isolates collected from different locations in India. The generated libraries upon sequencing were with 3,346,759 raw reads on average, and 151 x 2 nucleotides read length. The obtained bases per read ranged from 87 Mb in Ti 25 to 1,708 Mb in Ti 39, with 505 Mb on average per read. Trait association mapping was performed using 41,473 SNPs, infection phenotyping data, population structure, and Kinship matrix, to find single nucleotide polymorphisms (SNPs) linked to virulence genes. Population structure analysis divided the T. indica population in India into three subpopulations with genetic mixing in each subpopulation. However, the division was not in accordance with the degree of virulence. Trait association mapping revealed the presence of 13 SNPs associated with virulence. Using sequences analysis tools, one gene (g4132) near a significant SNP was predicted to be an effector, and its relative expression was assessed and found upregulated upon infection. The main economic effect of Karnal bunt disease is a reduction in grain quality rather than quantity. It reduces the viability and weight of the seed, as well as the quality of the flour  were sown in 12-inch pots under the net house conditions during the winter season (November–March). To make the inoculum, sterile distilled water was poured over the fungal slants cultures and scraped gently with a glass rod to liberate allantoid secondary sporidia. To remove media debris, the spore suspension was filtered through a double layer of muslin fabric, and the spore concentration was set at more than 10,000 sporidia per ml. Five healthy plants per pot were inoculated at the booting stage (Z-49 stage) .SphI and MluCI double digestion of genomic DNA (1 μg) of each T. indica isolate was conducted. After that, Ampure beads were used to clean the digested products before they were ligated using T4 DNA ligase with the forward and reverse P1 and P2 barcoded adaptors. The ligated products were then pooled, cleaned, and size selected using 2% agarose gel electrophoresis . PCR amplification was carried out to enrich and add the Illumina specific adapters and flow cell annealing sequences. The quality was checked on a bioanalyzer high sensitivity DNA kit , followed by final pooling and sequencing in AgriGenome Labs Pvt Ltd. Upon sequencing, indexes were removed from raw and checked for the presence of rad-tags on both reads using in-house scripts. The dDocent (v.2.6.0) was used to remove any low-quality bases  and adapters , and the bi-allelic SNPs were filtered with bcftools (v.1.6) and Agri Genome Inhouse scripts at read depths of 5 and 10. The homozygous polymorphic marker identification was carried out using the bi-allelic genotype at read depth 10. The kinship matrix was generated on TASSEL (v 5.2.31)  was calculated for each marker using the relevant R2 in TASSEL software v 5.2.31.Genome-wide association study (GWAS) was carried out based on the mixed linear model (MLM) to calculate the relationships between markers and phenotyping data using TASSEL software v 5.2.31  was used to design the specific primers for the putative effector gene . GAPDH gene was used as a reference gene . GCC Biotech (India) Pvt. Ltd. synthesized the designed primers. The expression of the potential effector was measured using a real-time PCR technique and the fold changes value was calculated using the 2 (“delta delta CT) method  and susceptible (WH542) wheat genotypes were sowed in 12-inch pots (10–15 seeds per pot). Five healthy plants per pot were inoculated at the booting stage (Z-49 stage)  showed variability in virulence among the isolates. The coefficient of infection (CI) ranged from (3.88) in Ti 21, Tonk, Rajasthan which was less virulent to (32.5) in Ti36, Taroari, Karnal, Haryana which was highly virulent , while the lowest was W (either Adenine or Thiamine) with 1,540 times  spectrum exhibited a substantial skew toward rare alleles, indicating that there were no recent genetic bottlenecks or mutations and that the detected major alleles for the SNP are preserved .T. indica isolates tested was determined using the STRUCTURE 2.3.4 software. The population was analyzed using a total of 41,473 SNPs detected in 39 isolates. To determine the appropriate number of subpopulations, the number of clusters (K) was plotted against ΔK . A total of 41,473 detected SNPs, saved in HapMap were used as genotypic data for GWAS. In order to find virulence genes, the disease reactions on susceptible wheat genotype (WH 542), principal components analysis (PCA), population structure, and Kinship matrix were used to conduct SNP-trait association analysis and revealed significant single nucleotide polymorphisms associated with the disease virulence at 13 positions in the genome (The SNP matrix used for association mapping in this study was generated by genotyping by sequencing (GBS) of 39 e genome .kb) around of the peak SNPs identified a total of 43 potential genes near significant SNP  was found upregulated in both genotypes at 3 days post inoculation (dpi). A sharp statistically significant increase (p < 0.05) in the susceptible wheat genotype (WH 542) compared to the resistant genotype (HD30) was detected at 7 dpi reaching its maximum expression 108 fold. After 13 days, the expression decreased up to 53 fold in the susceptible genotype, while the maximum expression in the resistant genotype (HD30) was 38 fold at 3 dpi  related to virulence, the location of the retrieved markers on the genome was located, and BLAST analysis validated the homology of the sequences surrounding each SNP (250 Kb upstream and downstream). However, the majority of the markers found were in genes encoding putative proteins whose translation products are still unknown. According to a previous study, the genome of the T. indica has more than 10,113 genes, 31.2% of them remaining unannotated -containing receptor perception in the host, inducing ligand-triggered immunity. This has been observed in a variety of fungal and bacterial pathogens , this enzyme enables the transfer of glucose into glycogen. Recent studies have reported the role of glycogen in pathogen colonization and virulence. The breakdown of glycogen may play an important role in the interactions between the host and pathogens which accumulate glycogen throughout their life cycles . These findings will improve the knowledge of T. indica-wheat molecular interaction, and enhance the breeding program for durable Karnal bunt resistance. To our knowledge, there have been only two other pathogens apart from this pathogen that have been studied using genotyping by sequencing for population analysis and genetic variability, both of them were performed on ascomycetes fungi Magnaporthe oryzae and Verticillium dahliae , widely distributed throughout the genome, which can be used in specific diagnostic markers development, showing the usefulness of using genotyping by sequencing as a high density genotyping tool .The data presented in the study are deposited in the NCBI, Sequence Read Archive (SRA) repository, accession number PRJNA796749  for this research study.The authors declare that the research was conducted in the absence of any commercial or financial relationships that could be construed as a potential conflict of interest.All claims expressed in this article are solely those of the authors and do not necessarily represent those of their affiliated organizations, or those of the publisher, the editors and the reviewers. Any product that may be evaluated in this article, or claim that may be made by its manufacturer, is not guaranteed or endorsed by the publisher.


Avian viruses of economic interest are a significant burden on the poultry industry, affecting production traits and resulting in mortality. Furthermore, the zoonosis of avian viruses risks pandemics developing in humans. Vaccination is the most common method of controlling viruses; however current vaccines often lack cross‐protection against multiple strains of each virus. The mutagenicity of these viruses has also led to virulent strains emerging that can overcome the protection offered by vaccines. Breeding chickens with a more robust innate immune response may help in tackling current and emerging viruses. Understanding the genetic evolution of different lines will thus provide a useful tool in helping the host in the fight against pathogens. This study focuses on the interferon genes and their receptors in different chicken lines that are known to be more resistant or susceptible to particular avian viruses. Comparing genotypic differences in these core immune genes between the chicken lines may explain the phenotypic differences observed and aid the identification of causative variations. The relative resistance/susceptibility of each line to viruses of interest  has previously been determined. Here we identify single nucleotide polymorphisms in interferons and downstream genes. Functional prediction tools were used to identify variants that may be affecting protein structure, mRNA secondary structure or transcription factor and micro‐RNA binding sites. These variants were then considered in the context of the research lines and their distribution between phenotypes. We highlight 60 variants of interest in the interferon pathway genes that may account for susceptibility/resistance to viral pathogens. IFNα, IFNβ, IFNκ), type II (IFNγ) and type III (IFNλ) interferon genes. Once produced, these interferons can induce an antiviral state by interacting with complementary receptor complexes as detailed in Figure Study of the innate immune system is important as it is seen as a generalised first line of defence and a step in the initiation of immune responses to a pathogen. Induction of the interferon (IFN) signalling pathway is central to this response. The IFN system in chickens is of particular interest as it bears many similarities to the human system, but its simplified nature makes it an ideal model for studying this system. The interferon response in chickens is induced by pattern recognition receptors (PRRs) that react to pathogenic materials such as viral RNA, and this causes a signal cascade, resulting in upregulation of the type I (IL‐28Rα (IFNLR1) receptor appears to be preferentially expressed in specific cells such as epithelial cells. This suggests that the type I system works in a more systemic fashion compared with the cell‐specific type III interferon system  affected. However, whilst type I receptors are expressed in most cells, the 8Rα IFNLR receptorThe economic impact of avian viruses on the poultry industry cannot be overstated. Infections can result in a reduction in egg production, the condemnation of consumable meat, immunosuppression leading to secondary infections and mortality. In the context of this study, we will focus on resistance to four economically important viruses: Marek’s disease virus (MDV) , whereas lines N, P2a and Wl are only partially inbred (with inbreeding coefficients ranging from 0.37 to 0.59). Line 0, so called because it contains no avian leukosis virus subgroup E (ALVE) genes, was not developed as an inbred line, but does show a low level in this study. Data from Kaiser et al.  was used to identify the interferon pathway genes of interest and their genomic co‐ordinates. Genomic positions from this release were used for interrogating sequence data from the research lines mapped to the GRCg6a chicken reference genome (GenBank assembly accession number GCA_000002315.5). Paralogues with >95% target identity were also identified and examined in this study  version 3.8 and Picard 2.9.2 packages were used throughout the variant calling process following the best practices workflow for germline short variant discovery  in the chicken genome from Ensembl (release 92) were used in the BaseRecalibrator step as known variants to be masked from consideration as sequencing errors during the recalibration process. gatk’s HaplotypeCaller function was used to call short variants. This resulted in a GVCF file for each line, and the files were then combined into one VCF file using the GenotypeGVCF function. The variant quality score recalibration (VQSR) approach was applied for filtering variants  was used with a sensitivity filter of 99% to remove SNPs with a VQSLOD score lower than the top 99% of the truth set, as these are likely to be false positives. To further minimise the inclusion of false positives, SNPs with a VQSLOD score <20 were removed.The ry gatk, . Picard’ts gatk, . For thits gatk,  were useensembl variant effect predictor (VEP) webtool (https://www.ensembl.org/info/docs/tools/vep/index.html) was used to annotate SNPs identified within and around the genes of interest. Variants were defined as upstream (if within 1 kb upstream of a transcription start site), downstream (within 1 kb downstream of the gene), 3′ untranslated region (3′UTR), 5′ untranslated region (5′UTR), intronic, synonymous or missense variants  predicts domains within the protein sequence. Variants affecting particular protein domains could therefore be identified  algorithm to predict whether an amino acid substitution, owing to a missense SNP, affects protein function based on sequence evolutionary conservation and the physical properties of each amino acid. Default settings were used for the prediction of the sift score for each missense SNP  is another method to investigate the impact of amino acid substitution on the biological function of a protein  uses a neural network‐based classifier for distinguishing between functional and neutral variants within the protein sequence where the prediction algorithm is trained using more than 100 000 experimentally annotated variants from multiple online databases  and HumVar  online database . SNP positions were compared with known TFBSs and any changes recorded. Parameters used were ‘high quality matrices only’ and to ‘minimise false positives’  binding sites, 3′UTR variants were compared with miRNA binding sites identified via the miRDB (rnasnp (https://rth.dk/resources/rnasnp/) and snpfold (http://ribosnitch‐ compute.bio.unc.edu/snpfold/SNPfold.html) webtools alongside the mRNA sequence of the affected gene of interest. rnasnp assesses the effect of an SNP on a RNA secondary structure, as structural characteristics are essential for the correct functioning of RNA molecules  passed VQSR and 79% (9584464) had a VQSLOD score >20. Of these, 1760 were found to occur within the defined locations of the genes of interest, including 1 kb up‐ and downstream of the genes. The distribution of these SNPs after being defined by VEP can be seen in Table 36 passedIFNα paralogues contained SNPs, all of which were upstream of the gene. IFNλ and its two paralogues were also not found to contain SNPs. It was considered that this may be due to these genes being highly conserved. However, this finding prompted examination of the sequence read depth of these genes in each line, and this identified low coverage for these regions. For example, the IFNλ paralogue (ENSGALG00000050947) with the highest coverage across all lines had an average read depth of only 1.55x. Compared with a longer gene with no paralogues, such as IFNAR1, the average read depth across lines was found to be 15×. The issues of coverage observed are probably due to the presence of multiple similar paralogues in the genome and the short length of reads (101 bp) used in this study, as this will result in failure to distinguish unique genomic regions during read alignment. High GC content in particular regions will also mean problems with sequence coverage. Given this finding and the importance of both IFNα and IFNλ in these pathways it would be advisable to carry out long‐read sequencing where reads can cover the entire gene region, as this would allow unique reads to be mapped and variants to be identified.Only one of the gatk’s VQSR method for filtration) compared with the hard filtration applied in the previous analysis.However, many more SNPs were detected in our current analysis using GRCg6a compared with the previous analysis that used the Galgal4 reference genome  as predicted by sift, provean and snap2 scores can be found in Table sift or provean score of <0.05 or − 2.5 respectively, indicates a predicted deleterious change, whereas a snap2 score of greater than zero predicts an impact on protein function. Thirteen of the amino acid substitutions were predicted to have an effect by at least one of the webtools, with five of these being predicted by two and the Y500D substitution in JAK1 predicted to have an effect by all three. The locations of all 36 SNPs predicted protein domains impacted can be seen in Figures The potential functional consequences of identified missense SNPs  was indicated to significantly impact secondary structure by both webtools. This SNP occurs in the AIV resistant line 0, but is absent from the susceptible C line; therefore it could be perceived that this variation affects the IFNκ mRNA in a way that may contribute to AIV resistance. In the context of viral infection and how the SNPs distribute between the lines considered in this study, 31 instances of these could be related to viral resistance, whereas 21 instances could be related to susceptibility  lies in a predicted band 4.1 (B41) domain of TYK2. This SNP is present in the IBV‐ and MDV‐susceptible line 7IFNGR2 mRNA in the IBDV‐resistant line N and was predicted to significantly affect the secondary structure. IFNGR2 exhibits greater levels of expression after infection with virulent IBDV , 5′UTR and 3′UTR SNPs may affect a transcript’s secondary structure by altering base pairing within the mRNA. Such structural alteration may affect mRNA stability. Altered secondary structure around the 5′UTR region may impact translation initiation efficiency by affecting the ability of the ribosome to bind to the mRNA, whereas secondary structure changes in the 3′UTR region may affect the accessibility of miRNAs to binding sites, impacting their ability to silence translation in the mRNA  exists in chickens, sharing 99.7% identity. It is likely that the chicken C‐MAF will bind this same site, with binding affected in lines 61, C, P2a and 0, altering STAT1 expression in these lines. In humans and mice, C‐MAF has been shown to be involved in CD4 and CD8 T‐cell subset differentiation, function and interleukin production  in the studied regions. SNPs in intronic regions could potentially impact splice sites, giving a different mRNA splice variant or affecting splicing efficiency, resulting in varying protein isoforms or expression levels which may affect phenotypes such as disease resistance Cooper, . SNPs ouTYK2 gene is present in the MDV‐susceptible line 72 and absent from resistant line 61. The JAK/STAT pathway has been previously found to contain SNPs exhibiting allele specific expression in response to MDV (Perumbakkam et al., 2. This amino acid substitution was predicted to be deleterious by provean and to affect protein function by snap2. The increased levels of this affected TYK2 may result in less ISG induction, leading to greater viral replication and more severe infection.Also requiring further research is the impact of heterozygous SNPs. As shown in Table The ultimate goal will be to breed for a more resilient bird that can tolerate and recover from challenges without having lost productivity at the end of its rearing or laying period. Previous work indicated that selection for production traits has resulted in weakened immunity in commercial lines, but also suggested that selection for immunity was not detrimental to growth (Van der Most et al., 2. This SNP may enhance the type III interferon pathway’s regulation of apoptosis (Li et al., To enable breeding for more resilient birds we have to define the mechanisms of resistance, as a variant conferring resistance to one virus could lead to susceptibility against another. The observation that some SNPs appear to confer resistance in one line and susceptibility in another may be due to the level of interferon response. For example, some viruses may require a more robust response, which a particular SNP might yield, whilst with other viruses this more robust response may give rise to the observed ‘susceptibility’. For some viruses, a particular IFN may be detrimental and for others it will not because they have an ability to evade that response or to downregulate and block the induction of the IFN response. Hence breeding for resistance to virus A does not imply that it will also impart resistance to virus B. Our study indicated that the SNP at position Chr1:106603910 results in an R318K amino acid substitution in IL10Rβ. This SNP may contribute to IBDV resistance in line C whilst it may also contribute to MDV susceptibility in line 7in vitro, in ovo and in vivo and observing changes in antiviral responses, while also ensuring that responses to other pathogens are not negatively impacted. Our study further highlights the importance of the maintenance of rare, inbred chicken lines, given that they may already contain loci for resistance and once these have been identified a low‐density SNP array could be developed to easily inform breeding schemes.It is only possible to postulate the mechanism by which the SNPs identified in this study function. Further research will be required to validate the effects of these variants on phenotype. It is interesting to note that none of the examined genes are located on chromosome 16, so any role in resistance/susceptibility is not due to co‐selection with the MHC during inbreeding of these lines. Furthermore, the current research is reductionist in considering only one SNP at a time; resistance and susceptibility are polygenic traits where effects may only be measurable in the presence of multiple SNPs working in concert with each other. The validation of candidate SNPs predicted in this work could be achieved by introducing variants In the interferon pathway genes studied, 1760 SNPs were identified, of which 36 change an amino acid, 21 were predicted to affect mRNA secondary structure and three to affect TF/miRNA binding sites. Considering the research line phenotypes and the distribution of these SNPs, 78 instances could be related to resistance and 70 could be related to susceptibility to particular viruses. Further research will be required to validate these SNPs and examine the mechanisms involved in resistance or susceptibility. The current study has identified genomic variants in genes in the interferon pathways of different chicken research lines. This pathway is an integral component in innate immunity and can also contribute to the orchestration and development of the adaptive immune response. Not only will these findings help explain host innate immune responses and disease mechanisms used by these viruses and other micro‐organisms, but it may also assist in the identification of targets for selective breeding, drug design or vaccine improvement. Eventually, this will pave the way for breeding programmes that result in more robust commercial chicken lines.The authors declare that the research was conducted in the absence of any commercial or financial relationships that could be construed as a potential conflict of interest.Table S1Click here for additional data file.Table S2Click here for additional data file.Table S3Click here for additional data file.Table S4Click here for additional data file.