dataesr/scientific-paragraphs-categorization huggingface dataset:
METHOD DETAILS Affymetrix Genome-Wide SNP 6. 0 Quality Control: Birdseed files were read in R v3. 5. 0 using the Affymetrix SNP Array 6. 0 (release 35) annotation file, and 905,422 variants were successfully loaded and analyzed in PLINK version 1. 9. Samples were cross-referenced against previously included genotyping samples  (Thorsson et al. , 2018). Based on established TCGA barcode identifiers, samples annotated with Analyte code "G" Whole Genome Amplification were further excluded. A final set of , included samples with Analyte code "D" DNA were retained for quality assessment. Stringent quality control measures were applied to the SNP genotyping data (Figure  1 , top QC panel). SNPs and individuals with greater than 5% missingness were excluded; leaving a total of 861,351 variants and 10,917 samples for subsequent analysis.
Stranding and Reference Panel Imputation: The quality-controlled genotyping file was stranded and imputed against the Haplotype Reference Consortium (HRC)  (Loh et al. , 2016a ) (McCarthy et al. , 2016). Prior to HRC stranding, all palindromic SNPs (A/T or G/C) were removed. Stranding was then performed using the McCarthy Group tools (HRC-1000G-check-bim-v4. 29), which compares our data genotyping alleles to the corresponding SNP alleles from HRC (v1. 1 HRC. r1-1. GRCh37. wgs. mac5. sites. tab), leaving 680,389 correctly matched variants for imputation. Phasing and imputation were performed using a standard pipeline on the Michigan Imputation Server (MIS). Phasing was performed using Eagle version v2. 3  (Loh et al. , 2016b)  on the variant call file (VCF). To reduce the run time, the VCF file was divided into 22 files corresponding to individual autosomal chrs.
By default, Eagle restricts analysis to bi-allelic variants that exist in both the target and reference data. Minimac3 was used to run the imputation. For each of the 22 VCF files, the MIS breaks the dataset into non-overlapping chunks prior to imputation. For HRC imputation, the HRC r1. 1. 2016 reference panel was selected using mixed population for QC, with a total of 39,127,678 SNPs returned after imputation. Final Ancestry Calls: PCA was performed on the final quality-controlled genotyping file and final PAM-based ancestry clusters were computed for the 10,128 individuals for optimal k=4. We found very high concordance of initial and final ancestry assignments (99. 98% matching, the 2 samples varying between initial and final ancestry cluster computation assigned to NA). The four ancestry cluster are as follows: (  1   S1 ).
Covariate selection: For each analysis we included age, sex, cancer types and genetic ancestry from the PCA (PC1-7) as covariates. Self-reported age (age at diagnosis in years) from clinical data and PC1-7 were used as continuous covariates. Cancer type based on TCGA study assignment and curated genotype-imputed sex assignments were used as categorical covariates. Due to missing self-reported sex, and discrepancy in self-reported and genotype-type based sex in the data, we carefully curated sex assignments. We recovered sex information by using X chr homozygosity estimate (XHE) after removal of the pseudo-autosomal region of the X chr. For those with missing sex information, individuals with XHE < 0. 2 were assigned as females and individuals with XHE > 0. 8 were assigned as males (N=21 males, N=28 females).
05 (calculated from SNPs with MAF > 0. 01) prior to running GREML. We calculated heritability using an unconstrained approach (allowing heritability to be < 0). Constraining the heritability to a range of 0-1 may lead to an upwards bias of the low heritability values, which is likely to be worse in smaller datasets. We used the likelihood ratio test (LRT) implemented in GREML to test if heritability is different than zero for each of the immune traits analyzed and used Benjamini-Hochberg adjustment  (Benjamini and Hochberg, 1995)  to calculate the FDR. We present both FDR adjusted p values and unadjusted p values in the manuscript. All heritability analyses were run with age, tumor type, sex and PC 1-7 as covariates unless otherwise indicated. We also used GREML to determine whether there are any contextual factors that interact with genome-wide common variant effects, including the major immune subtypes as determined by Thorsson et al and somatic mutations (divided into tertiles and dichotomized at 10 MB).
4,  (Middha et al. , 2017) ). For such comparisons, regression analyses were adjusted for sex, age, and PC1-7. All rare variant analyses were performed using R (http://www. R-project. org/). Epigenome chromatin states: Mnemonic bed files for the Expanded-18-state model, which takes into account six chromatin marks from ChIP-seq datasets (H3K4me3, H3K4me1, H3K36me3, H3K27me3, H3K9me3, H3K27ac), were downloaded for 98 annotated epigenomes (https://egg2. wustl. edu/roadmap/web_portal/chr_state_learning. html#exp_18state). We identified 25 of these epigenomes to be specifically immune-related, including those associated with primary immune cells, as well as bone marrow-derived mesenchymal cells, leukemiaassociated cells, thymus and spleen (Table  S4 ). The first 12 states were defined to be active states associated with expressed genes, while the last six states were defined to be inactive or repressed states.
Epigenome IDs were mapped to corresponding Standardized Epigenome Names (https://docs. google. com/spreadsheets/d/1yikGx4MsO9Ei36b64yOy9Vb6oPC5IBGlFbYEt-N6gOM/edit#gid=15). The chromatin state at each significant and suggestive SNP was extracted based on positional overlaps with each epigenome. In Silico Analysis of Non-synonymous amino acid substitutions: We used Chimera 1. 14 to display the structure of the STING protein with the H232 and R232 alleles and to align these to the ligand  (Pettersen et al. , 2004). We aligned the A chains of the structures from the PDB files 4LOH (containing the H232 allele) and 6DNK (containing the R232 allele) using the Matchmaker function from Chimera. Gene expression and splice quantitative trait locus analysis, and Colocalization: We performed eQTL and sQTL analyses in TCGA and used summary statistics from the GTEx datasets to search for potential candidate genes.
We excluded the HLA and IL17RA loci since SNPs at these loci are known eQTLs for genes that are part of the immune trait. For the significant and suggestive SNPs, we tested all genes within +/-1MB for eQTL and all transcipts within +/-500KB for sQTL. We used a shorter range for sQTLs with the assumption that SNPs affecting splicing are likely to act at a shorter distance. TCGA dataset: RNA-seq gene expression and splicing data were downloaded from the NIH Genomics Data Commons (https://gdc. cancer. gov/about-data/publications/pancanatlas and https://gdc. cancer. gov/about-data/publications/PanCanAtlas-Splicing-2018 (Kahles et al. , 2018). For the sQTL analysis, we considered the following splicing categories: ', ', exome skipping, intron retention, and mutually exclusive exon events quantified by the Percent Spliced In (PSI)  (Kahles et al.
GTEx dataset: We downloaded all summary statistics for expression quantitative loci (eQTL -GTEx_Analysis_v8_eQTL_all_associations), and splicing quantitative loci (sQTL -GTEx_Analysis_v8_sQTL_all_associations) from GTEx project (https://console. cloud. google. com/storage/browser/gtex-resources) using the results from the latest version of the GTEx database (Version 8). For each SNP that had a genome-wide significant or suggestive association with one of the 33 immune traits by GWAS, we extracted all of the association statistics from the summary statistics for eQTL within +/-1MB and for sQTLs within +/-500 KB from all tissues in the GTEx summary statistics dataset. We then calculated FDR for each SNP, correcting for all of the genes at the locus across all tissues as we did for TCGA. For eQTL and/or sQTLs that had FDR p < 0.
Colocalization analysis: We performed colocalization analysis using eCAVIAR  (Hormozdiari et al. , 2016)  on both TCGA and GTEx results. eCAVIAR computes a posterior probability of causality based on association data and LD structure for the eQTL/sQTL and the trait GWAS and then calculates the joint probability of both of these being causal. It requires both summary statistics from GWAS and from the eQTL/sQTL analysis and the LD matrix of SNPs used in both analyses. For TCGA, we began with all SNPs that had FDR p < 0. 1 with at least one gene and/or transcript and computed the eQTL and sQTL associations for the surrounding SNPs from the index SNP for that same gene/transcript using the same approach as outlined above. For GTEx, we began with SNP-gene expression or SNP-gene splicing pairs that met our FDR p < 0.
1 criteria and extracted the eQTL and sQTL results for the surrounding SNPs from the summary results. For the GWAS and TCGA analyses, we calculated the genotype correlation (r) at each locus from the genotype data. For the GTEx analysis, we downloaded the individual genotype data from dbGAP for GTEx participants (https://www. ncbi. nlm. nih. gov/projects/gap/cgibin/study. cgi?study_id=phs000424. v8. p2) and calculated genotypic correlation between SNPs in R. We then ran eCAVIAR separately for each FDR p < 0. 1 eQTL and sQTL association from TCGA and GTEx, considering models at each locus that assume one or two causal variants. For each SNP-gene expression or SNP-gene splicing category pair, 200 SNPs (+/-100 SNPs) around the index SNP were included in colocalization analysis. The CLPP of each SNP being causal was calculated, and also a regional CLPP by summing all 201 SNP CLPPs.
We used a posterior probability of > 0. 01 to consider plausible colocalization, including both the 1 and 2 locus model and considering the sum of the posterior probability SNPs in the colocalization results. Expanded region criteria for colocalization: Since eCAVIAR identified multiple genes at the same locus for many loci that have plausible colocalization within a +/-100 SNP boundary, we sought stronger evidence for colocalization at the loci where eCAVIAR found colocalization by examining an expanded region. We reasoned that a gene or transcript that is causal for the immune trait should not be more strongly associated with another SNP in the region that has little or no evidence of association with the immune trait. Therefore, for each gene or splice variant that had plausible colocalization by eCAVIAR, we performed an expanded region search (+/-1MB for eQTLs and +/-500KB for sQTLs) to see if we can identify one or more SNPs that had a stronger effect in the eQTL sQTL analysis in the same tissue dataset, which we called "counter-evidence" SNPs.
Acknowledgements: We are grateful to the  Society for Immunotherapy of Cancer (SITC)  for the logistical support of the investigator meeting within the  SITC Cancer Immune Responsiveness Workshop  ( San Francisco CA, US, April 2018; Houston, TX, US, May 2019 ). We are also grateful to  Noah Zaitlen  and  Andy Dahl  for useful discussions on heritability interaction analyses. This work was funded in part by the  National Institutes of Health   R01CA227466  and  K24CA169004  to EZ and T32CA221709 postdoctoral fellowship to RWS,  Qatar National Research Fund (QNRF)   NPRP11S-0121-180351  grant and the  Sidra Precision Medicine Program internal grant  ( SDR100035  and  SDR400023 ) to DB,  Associazione Italiana per la Ricerca sul cancro (AIRC)  grant  IG2018-21846  to MC, the  Cancer Research Institute  funding to VT, and the  Fundació Bancaria La Caixa , a  La Caixa Junior Leader Fellowship  ( LCF/BQ/PI18/11630003 ) to EP-P.
, Ellinghaus, E. , Stuart, P. E. , Capon, F. , Ding, J. , Li, Y. , Tejasvi, T. , Gudjonsson, J. E. , et al. (2012). Identification of 15 new psoriasis susceptibility loci highlights the role of innate immunity. Nat. Genet. 44, 1341 1348. expression modules as clinically relevant hallmarks of breast cancer diversity. PloS One 9, e88309. Yang, J. Y. C. , and Sarwal, M. M. (2017). Transplant genetics and genomics. Nat. Rev. Genet. 18, 309 326. Taura The summary statistics from the GWAS have been deposited to FigShare (https://figshare. com/s/8c579f78c65261bb6167). Details for software availability are in the Key Resources Table. The code generated during this study has been deposited to github (https://github. com/rwsayaman/TCGA_PanCancer_Immune_Genetics; to be made public at upon acceptance/publication].
In this sense, the ICWR model  (Lechuga-Crespo et al. , 2020a)  has been applied to the global scale. It has yielded the first map on average annual ionic fluxes, derived from the chemical weathering of rocks to rivers. Nevertheless, its ability to simulate the dynamics of chemical weathering derived ionic loads and its performance on local catchments have not been tested yet. In this sense, the coupling of the SWAT and ICWR models poses an opportunity to evaluate spatially-explicit geochemical fluxes, since a basin's hydrology in SWAT is described using the Hydrological Response Unit's (HRU) semi-distributed approach. Consequently, ionic loadings from chemical weathering may be assessed and, if the atmospheric contribution is known, this tool may work with observed data to estimate how much anthropogenic saline effluent found in a catchment.
Coupling the ICWR model to SWAT The approach to spatially discretising the catchment area in the SWAT model has been modified to include a fourth layer in the definition of the HRUs: the lithological groups. This modification has been performed in the QGIS geographic information system plugin used to set up the model, QSWAT  (Dile et al. , 2016) ; the modified version is hereby called QSWATLitho. The SWAT code has not been modified to maintain the possibility of using external software, such as SWAT CUP  (Abbaspour et al. , 2007) , for autocalibration. Instead, an extra module (SWATLitho. py) has been written to read the QSWATLitho and SWAT outputs and compute the geochemical fluxes and loads. The workflow of the model's configuration is shown in Figure  1.
ICWR module -SWATLitho Once a QSWATLitho project has been set up, the calibration of the hydrology is needed, since this is the main dynamic input data for the ICWR model. Because the chemical weathering process occurs mainly in the vadose zone of the water cycle, the main water fluxes to be considered are groundwater (qgw) and lateral flows (qlf). The ICWR model has been adapted to include them (qlf+qgw) instead of the total average specific discharge (qann), which would also include runoff. Here, the runoff is considered as the main driver for the dilution of the total load rather than including it in the calculation of the daily geochemical loads. A new module has been created so that the user can use the SWAT results, in combination with the QSWATLitho tables, to obtain geochemical loadings' daily time series.
The module consists of six main steps that are integrated into two loops. For each HRU, data like area, lithological group, and soil type is extracted from the hrus_lithology. csv file (a modified version of the hrus file in the Project. mdb) and, if necessary, used to set the soil shielding effect, fsx (cf. Lechuga-Crespo et al. , 2020a). Then, the output. hru file is read to obtain the specific discharge in the lateral and groundwater fluxes to the river. With this information, together with the globally fitted parameters, the geochemical loads are calculated for each time step of the simulation and each HRU. This process generates a table with the loads of each HRU to the river stream for each time step. Then, all of the loadings are summarised at the subbasin scale in each time step and saved as output.
Case study: Deba River catchment A case study is set up to explore the model's application. The validation comprises three steps: first, the annual comparison of the results to evaluate the model's sensitivity and select the input data among different combinations; second, the analysis of geochemical loadings in all subbasins derived from the QSWATLitho + SWATLitho combination (spatial downscaling); and last, the comparison of the daily representation in three gauging stations (temporal downscaling). The case study selected for this purpose is the Deba River catchment (Figure  3 ), on which numerous studies related to urban and industrial pollution on its sediments and waters have been conducted  (Martínez-Santos et al. , 2015; García-García et al. , 2019; Unda-Calvo et al. , 2019; Lechuga-Crespo et al.
Set up of the QSWATLitho project A local Digital Elevation Map (DEM, 25m resolution cell) was used to create the stream network, locate the outlet of the catchment, and delimit the drainage area. Subbasins were merged to obtain their draining to the sampling locations of the monitoring campaigns. A European land use map from the CORINE Land Cover project (100m resolution), a soil map from the Harmonized World Database (a 30 arc-second resolution), and a local lithological map reclassified for the categories found in  Hartmann and Moosdorf (2012)  were combined with the DEM-derived slope map to create the HRUs (the description and source of the datasets may be seen in Table  1 , Table  2 , and Figure  3 ). While setting up the model, three slope ranges were established (0%-5%, 5%-10%, >10%) and no simplification was performed to reduce the number of HRUs.
The weather input data was obtained from a hydrometeorological station located close to the outlet (Figure  3 ), consisting of precipitation as well as maximum and minimum temperature daily time series from January 1994 to December 2017. The observed data for discharge was covered from January 2004 to December 2017 for three gauging stations located close to the outlet and near the outlet of the two major subbasins of this catchment (see Figure  3 ). SWAT has been used to compute the hydrological representation of the case study, using the QSWATLitho HRU definition for the spatial discretization, but using the same water balance as the SWAT model. Observed data for riverine chemical concentration ranged from April 2014 to January 2017. A monitoring program samples the river waters monthly or bimonthly using a pre-washed polypropylene bottle which was carried to the laboratory at 4ºC and filtered through 0.
45µm filters. One replicate was acidified to 0. 2% with HNO3 (68%) for base cations (Ca 2+ , Mg 2+ , Na + , and K + ) using ICP-OES (Perkin Elmer Optima 2000). The other non-acidified replicate was used to analyse anions (Cl -, NO3 -, SO4 2-) through ion chromatography (DIONEX ICS 3000). Alkalinity was measured using a Total Organic Carbon Analyzer (TOC-L Shimadzu). The ionic charge balance (ICB) was within ±10% for all samples used in this study. For the modelling of the geochemical loads, groundwater and lateral flows from the SWAT hydrological representation have been used as a source of lithological chemical weathering derived loads, while runoff has been attributed to lower concentrations, inducing dilution in the stream's concentration. Following the recommendations of ASABE (2017), three periods were defined in this project: a warmup period to reduce the effect of state variables' initial values (six years, January 1998-December 2003), a calibration period to optimise the parameters (ten years, January 2004-December 2013), and a validation period to test the model capabilities in an independent dataset (four years, January 2014-December 2017).
Model's sensitivity to input data Average annual loadings obtained for the four input data combinations are shown in Table  4. The original ICWR model (Lechuga-Crespo et al. , 2020a) was calibrated and validated using global data (method UNH+GLIM in Table  4 ) and data on rivers worldwide from the GLORICH database. The highest values among all methods considered are found for the UNH+GLIM method, and the greatest differences are found not between the two hydrological datasets but between the lithological maps. This confirms that the lithological representation has a major impact on the loadings computed by the model. Regarding the values obtained with the four datasets in comparison with the observed values (Gauging station in Table  4 ), the closest values are found for the EUS+GEUS method, the local data for hydrology and lithology.
A more mechanistic model is needed to account for this evolution, as well as the chemical equilibrium between phases (as done in  Bailey et al. , 2019). However, the more mechanistic a model is, the harder it is to find available input data. In the present study, a digital filter to deconvolute the hydrograph -distinguish surface runoff from baseflow and lateral flow with the total discharge time series-has been tested as a potential alternative when it is not possible to set up QSWATLitho projects, either because of a lack of input data or computational resources  Lines indicate the mean value, while the shade represents the 1 st and 3 rd quartiles for the January 2014 to December 2017 time series. The vertical axis is shown in logarithmic scale.
Conclusion An empirical model used to estimate the annual average geochemical loads to rivers through chemical weathering has been downscaled from global to local scale, and shifted from an annual average estimation to a daily dynamic output, based on the coupling with SWAT, an extended hydrological model. The coupling method is described along with the case study, using different input datasets to check the influence of hydrology and lithology resolution in the outputs of the model. The use of globally fitted parameters for the model has yielded average loadings with a model underestimation of 17. 96% with regards to the observed data, though the model's performance is "reasonable" on the representation of spatially explicit daily geochemical loadings to stream the a catchment level. The limitations of the model have been addressed, such as the poor performance of the model when springs are present in the study area, or when the lithological input dataset does not contain information hydrogeochemically relevant units, such as gypsum intrusions, which are too small to be mapped but relevant enough to affect the water chemistry and loadings.
An alternative has also been presented for those cases in which a QSWATLitho project cannot be set up: the application of a digital filter to measure data in a gauging station, together with the drainage basin description (lithology and soil classes). The results do not present significant differences from those of the SWATLitho, which suggests that both methods may be applied when it is not possible to set the first one up or that spatially explicit results are not in the scope of the modelling. The present work introduces a hydrogeochemical tool which is useful for estimating dynamic chemical weathering loadings out of a catchment at a local scale and also for the estimating of ionic fluxes that derive from the chemical weathering of rocks in a spatiotemporal context.
original ICWR model(Lechuga-Crespo et al. , 2020a)  was developed for an annual average specific flux output for which only the average specific discharge was needed for hydrology. To explore the possibilities of applying this model at lower spatial and temporal scales, three assessments have been performed: a model's sensitivity analysis, a spatial evaluation, and a temporal assessment. The model's sensitivity to input data was evaluated by testing different global and local datasets combinations. Two lithological maps, one clipped from the Global Lithological Map (GLiM, Hartmann and Moosdorf, 2012) , and a local one obtained from the Gipuzkoa Council (geoeuskadi. eus), together with two annual average specific discharges, one obtained from a global dataset (UNH/GRD, Fekete et al. , 2002)  and other from the Gipuzkoa Council Hydrological Department (www.