dataesr/scientific-paragraphs-categorization huggingface dataset:
Half (23) of the African groups represent subsets of samples collected from nine countries as part of the MalariaGEN consortium. Details on the recruitment of samples in relation to studying malaria genetics are published elsewhere  (Malaria Genomic Epidemiology Network, 2014; 2015). The remaining 23 groups are from publicly available datasets from a further eight sub-Saharan African countries  (Pagani et al. , 2012; Schlebusch et al. , 2012; Petersen et al. , 2013)  and the 1000 Genomes Project (1KGP), with Eurasian groups from the latter included to help understand the genetic contribution from outside of the continent (Figure  1 -figure supplement 1). With the exception of Austronesian in Madagascar, African languages can be broadly classified into four major macro-families: Afroasiatic, Nilo-Saharan, Niger-Congo, and Khoesan  (Blench, 2006) ; and although we have representative groups from each (Supplementary file 1), our sample represents a significant proportion of the sub-Saharan population in terms of number, but not does not equate to a complete picture of African ethnic diversity.
We created an integrated dataset of genotypes at 328,000 high-quality SNPs and use established approaches for comparing population allele frequencies across groups to provide a baseline view of historical gene-flow. We then apply statistical approaches to phasing genotypes to obtain haplotypes for each individual, and use previously published methods to represent the haplotypes that an individual carries as a mosaic of other haplotypes in the sample (so-called chromosome painting  [Li and Stephens, 2003] ). We present a detailed picture of haplotype sharing across sub-Saharan Africa using a modelbased clustering approach that groups individuals using haplotype information alone. The inferred groups reflect broad-scale geographic patterns. At finer scales, our analysis reveals smaller groups, and often differentiates closely related populations consistent with self-reported ancestry  (Tishkoff et al.
Results Broad-scale population structure reflects geography and language Throughout this article we use shorthand current-day geographical and ethno-linguistic labels to describe ancestry. For example we write "Eurasian ancestry in East African Niger-Congo speakers", where the more precise definition would be "ancestry originating from groups currently living in Eurasia in groups currently living in East Africa that speak Niger-Congo languages"  (Pickrell et al. , 2014). We also stress that the use of Khoesan in the current setting refers to groups with shared linguistic characteristics which does not necessarily imply shared close genealogical relationships  (Gu ¨ldemann and Fehn, 2014). Our combined dataset included 3283 individuals from 46 sub-Saharan different African ethnic groups and 12 non-African populations (Figure  1A  and Figure  1 figure  supplement 1 ).
, 2014)  (in our dataset, the mean pairwise F ST between Eurasian and African populations is 0. 157; Figure  2A  and Figure  2 -source data 2). To some extent this also applies to Khoesan groups (green in Figure  3A ), who are also relatively differentiated from other African groups (mean pairwise F ST between Ju/'hoansi and all other African populations in our dataset is 0. 095; Figure  2A  and Figure  2 -source data 2). In light of this, and the observation that curves involving groups from different ancestry regions are often not different from each other, it is difficult to infer the proportion or nature of the African, Khoesan, or Eurasian admixing sources, only that the sources themselves contained African, Khoesan, or Eurasian ancestry. Moreover, given uncertainty in the dating of admixture when using different maps and MALDER parameters, these results should be taken as a guide to the general structure of genetics relationships between African groups, rather than a precise description of the gene-flow events.
, 2013; Grollemund et al. , 2015) , an observation supported by genetic analyses  (Li et al. , 2014). The current dataset does not cover all of Africa. In particular, it contains no hunter-gather groups outside of southern Africa, and no representation of the western Bantu except the Herero from Namibia. Nevertheless, we explored whether our admixture approach could be used to gain insight into the Bantu expansion. Specifically, we wanted to see whether the dates of admixture and composition of admixture sources were consistent with either of the two major models of the Bantu expansion. In the remaining discussion, we make the following assumption: when we observe ancestry from contemporary groups residing in Cameroon (Semi-Bantu and Bantu) this is a proxy for direct gene-flow from the origin of the Bantu expansion.
Given that ancestry from Malawi is often observed in large proportions in the admixture sources of East and Southern African Niger-Congo speakers, and its position between eastern and the most southern groups, Malawi represents the closest proxy in our dataset for the intermediate group that split from the western Bantu. We also see an admixture source in Malawi with a significant proportion of non-Bantu (green) ancestry (2nd event, minor source in Figure  4 ), ancestry which we do not observe in the mixture model analysis, but which is also evident in the other east Southern Niger-Congo speakers (the AmaXhosa and SEBantu) implying that gene-flow must have occurred between the expanding Bantus and the resident hunter-gatherer groups  (Marks et al. , 2014). In summary, the early date of Bantu admixture in Malawi, its presence as an admixture surrogate across eastern and southern Africa, and the observation of later direct Central West African (Bantu) admixture in western south African groups, highlight the complex dynamics, and multiple waves of migration associated with the movement of Bantu agriculturists from the region around Cameroon into southern and eastern Africa.
Our dataset is not an exhaustive sample of African populations, and there are likely to be other events than those reported here that have been important in generating the current genetic landscape of Africa. Our analyses show that patterns of haplotype sharing across the sub-Sahara can be characterised by historical gene-flow events involving groups with ancestry from across and outside of the continent. We have identified gene-flow across Africa, implying that haplotypes have been moving over (potentially large) distances in a relatively short amount of time. As a rough estimate, given that events in southern African groups involving Bantu sources have occurred within the last 2000 years (Figure  6 ) and the distance between Cameroon and south-east Africa is around 4000km, haplotypes have moved across and into different environments at a rate of roughly 2 km/year.
Interpreting haplotype similarity as historical admixture Analyses that model the correlations in allele frequencies (such as those performed here in the Allele frequency differences show widespread evidence for admixture section) provided initial evidence that the presence of Eurasian DNA across sub-Saharan Africa is the result of gene-flow back into the continent within the last 10,000 years  (Gurdasani et al. , 2014; Pickrell et al. , 2014; Hodgson et al. , 2014a) , and that some groups have ancient (over 5 kya) shared ancestry with hunter-gather groups (Figure  3 )  (Gurdasani et al. , 2014). Whilst the weighted admixture LD decay curves between pairs of populations used by MALDER suggests that this admixture involved particular groups, the interpretation of such events is difficult. Firstly, because our dataset includes closely related groups, it is not always possible to identify a single best matching reference, implying that sub-Saharan African groups share some ancestry with many different extant groups.
Overview of the dataset The dataset comprises a mixture of 2504 previously published individuals from Africa and elsewhere (see below) plus novel genotypes on 1366 sampled by the Malaria Genomic Epidemiology Network (MalariaGEN) Figure  1 -source data 1. The MalariaGEN samples were a subset of those collected at 8 locations in Africa as part of a consortial project on genetic resistance to severe malaria: details of the study sites and investigators involved are described elsewhere  (Malaria Genomic Epidemiology Network, 2014). Samples were genotyped on the Illumina Omni 2. 5M chip in order to perform a multicentre genome-wide association study (GWAS) of severe malaria: initial GWAS findings from The Gambia, Kenya and Malawi have already been reported  (Band et al. , 2013; Malaria Genomic Epidemiology Network, 2015)  and a manuscript describing findings at all 8 locations is in preparation.
Quality control Detailed quality control (QC) for the MalariaGEN dataset was performed for a genome-wide association study of severe malaria in Africa and is outlined in detail elsewhere  (Malaria Genomic Epidemiology Network, 2015). Briefly, genotype calls were formed by taking a consensus across three different calling algorithms (Illuminus, Gencall in Illumina's BeadStudio software, and GenoSNP)  (Band et al. , 2013)  and were aligned to the forward strand. Using the data from each country separately, SNPs with a minor allele frequency of <1% and missingness <5% were excluded, and additional QC to account for batch effects and SNPs not in Hardy-Weinberg equilibrium was also performed.
Combining the MalariaGEN populations with additional populations The post-QC MalariaGEN data was combined with published data typed on the same Illumina 2. 5 M Omni chip from 21 populations typed for the 1000 Genomes Project (1KGP; data downloaded on 16th October 2013 from ftp://ftp. 1000genomes. ebi. ac. uk/vol1/ftp/technical/working/ 20120131_omni _genotypes_and_intensities/), including and accounting for duos and trios, and with publicly available data from individuals from several populations from Southern Africa (Figure  1 source data 1) (1000 Genomes Project  Consortium, 2012; Schlebusch et al. , 2012). We merged samples to the forward strand, removing any ambiguous SNPs (A to T or C to G). Merging was checked by plotting allele frequencies between populations from both datasets, which should be generally correlated (data not shown).
We combined these data with further publicly available samples typed on different Illumina (Omni 1 M) chips, containing individuals from southern Africa  (Petersen et al. , 2013)  and the Horn of Africa (Somalia/Ethiopia/Sudan;  Pagani et al. , 2012)  to generate a final dataset containing 4216 individuals typed on 328,176 high quality common SNPs. To obtain the final set of analysis individuals we performed additional sample QC after phasing and removed American 1KGP populations (Figure  1 -source data 1).
Phasing We used SHAPEITv2  (Delaneau et al. , 2012)  to generate haplotypically phased chromosomes for each individual. SHAPEITv2 conditions the underlying hidden Markov model (HMM) from  Li and Stephens (2003)  on all available haplotypes to quickly estimate haplotypic phase from genotype data. We split our dataset by chromosome and phased all individuals simultaneously, and used the most likely pairs of haplotypes (using the -output-max option) for each individual for downstream applications. We performed 30 iterations of the MCMC and used default values for all other parameters. As mentioned, we used known pedigree relationships to improve the phasing, using family information from both the 1KGP and The Gambia Genome Variation Project.
Removing non-founders and cryptically related individuals Our dataset included individuals who were known to be closely related (1KGP duos and trios; Gambia Genome Variation Project trios) and, because we took multiple samples from some population groups, there was also the potential to include cryptically related individuals. After phasing we therefore performed an additional step where we first removed all non-founders from the analysis and then identified individuals with high identity by descent (IBD), which is a measure of relatedness. Using an LD pruned set of SNPs generated by recursively removing SNPs with an R 2 >0:2 using a 50 kb sliding window, we calculated the proportion of loci that are IBD for each pair of individuals in the dataset using the R package SNPRelate  (Zheng et al.
1KGP American populations and Native American Ancestry in 1 KG Peruvians With the exception of Peru, post-phasing, we dropped all 1KGP American populations from the analysis dataset(97 ASW, 102 ACB, 107 CLM, 100 MXL and 111 PUR). We used a subset of the 107 Peruvian individuals that showed a large amount of putative Native American ancestry, with little apparent admixture from non-Amerindians (data not shown). Although Amerindians are not central to this study, and it is unlikely that there has been any recurrent admixture from the New World into Africa, we nevertheless generated a subset of 16 Peruvians to represent Amerindian admixture components in downstream analyses. When this subset was used, we refer to the population as PELII. The removal of these 606 American individuals left a final analysis dataset comprising 3283 individuals from 60 different population groups (Figure  1 -source data 1).
Painting chromosomes with CHROMOPAINTER We used fineSTRUCTURE  (Lawson et al. , 2012)  to identify finescale population structure and to identify high level relationships between ethnic groups. The initial step of a fineSTRUCTURE analysis involves 'painting' haplotypically phased chromosomes sequentially using an updated implementation of a model initially introduced by  Li and Stephens (2003)  and which is exploited by the CHRO-MOPAINTER package  (Lawson et al. , 2012). The Li and Stephens copying model explicitly relates linkage disequilibrium to the underlying recombination process and CHROMOPAINTER uses an approximate method to reconstruct each 'recipient' individual's haplotypic genome as a series of recombination 'chunks' from a set of sample 'donor' individuals. The aim of this approach is to identify, at each SNP as we move along the genome, the closest relative genome among the members of the donor sample.
, 2014). We outline the details of this analysis below, but note here that, because this approach is based on the comparison and analysis of painted chromosomes, it offers a different perspective from approaches based on comparisons of allele frequencies. Inferring admixture with the f 3 statistic and ALDER We computed the f 3 statistic, introduced by  Reich et al. (2009) , as implemented in the TREEMIX package  (Pickrell and Pritchard, 2012). These tests are a 3-population generalization of F ST , equal to the inner product of the frequency differences between a group X and two other groups, A and B. The statistic, commonly denoted f 3 (X:A,B) is proportional to the correlated genetic drift between A and X and A and B. If X is related in a simple way to the common ancestor with A and B, we expect this quantity to be positive.
Modelling populations as mixtures of each other using linear regression Copying vector summaries generated from painted chromosomes describe how populations relate to one another in terms of the relative time to a common shared ancestor, subsequent recent admixture, and population-specific drift  (Hellenthal et al. , 2014; Leslie et al. , 2015). For the following analysis, we used the GLOBETROTTER package to generate the mixing coefficients used in Figure  4. Given a number of potential admixing donor populations, a key step in assessing the extent of admixture in a given population k is to identify which of these donors is relevant; that is, we want to identify the set T Ã containing all populations l 6 ¼ k 2 ð1; :::; KÞ believed to be involved in any admixture generative to population k.
Overview of GLOBETROTTER analysis pipeline In the current setting we are interested in identifying the general historical relationships between the different African and non-African groups in our dataset. We used GLOBETROTTER  (Hellenthal et al. , 2014)  to characterise patterns of ancestral gene-flow and admixture. Individuals tend to share longer stretches of DNA with more closely related individuals, so we used a focused approach where we disallowed copying from local populations. GLOBETROTTER was originally described by  Hellenthal et al. (2014)  and a detailed description of the algorithm and the extensive validation of the method is presented in that paper. Here we run over the general framework as used in the current study, with the key difference between our approach and the default use of the algorithm being that we do not allow any groups from within the same ancestry region as a target group to be donors in the painting analysis.
Gene-flow maps We generated maps with the rworldmaps package in R. To generate arrows, we combined the inferred ancestral components (i. e. 1ST and 2ND EVENT SOURCES in Figure  3 ) for each population and estimated the proportion of a group's ancestry coming from each component, summed across all surrogates from a particular country. For example, if an admixture contained source contains components from both the Jola and Wollof (both from The Gambia), then these components were added together. As such, the arrows point from the country of component origin to the country of the recipient. We then plot only those arrows which relate to events pertaining to the different broad gene-flow events. For each map, we plot arrows for any event involving the following:.
Source data 1. Overview of sampled populations describing the continent, region, numbers of individuals used, and the source of any previously published datasets. DOI: 10. 7554/eLife. 15266. 004 Figure supplement 1. Map of populations used in the analysis. DOI: 10. 7554/eLife. 15266. 005 Figure supplement 2. An example of hierarchical clustering to chose two groups of similar individuals from the Fula based on a PCA of The Gambia. DOI: 10. 7554/eLife. 15266. 006 Figure supplement 3. fineSTRUCTURE analysis of the full dataset. DOI: 10. 7554/eLife. 15266. 007.
Acknowledgements We thank all the MalariaGEN study sites that contributed samples to this analysis: a list of researchers involved at each study site can be found at https://www. malariagen. net/projects/host/consortium-members. MalariaGEN is funded by the  Wellcome Trust  ( WT077383/Z/05/Z ,  090770/Z/09/Z ) and the  Bill and Melinda Gates Foundation through the Foundation for the National Institutes of Health  ( 566 ). Genotyping was performed at the  Wellcome Trust Sanger Institute , partly funded by its core award from the  Wellcome Trust  ( 098051/Z/05/Z ). This research was also supported by  Centre  grants from the  Wellcome Trust  ( 090532/Z/09/Z ) and the  Medical Research Council  ( G0600718 ). CCAS. was supported by a  Wellcome Trust   Career Development Fellowship  ( 097364/Z/11/Z ).
We thank  Clare Bycroft ,  Lucy van Dorp , and  Cristian Capelli  for critically evaluating the manuscript,  Francesco Montinaro  for insightful discussions on interpretation of MALDER analyses, and  Alexander Mee-Woong Kim  for suggesting (via Twitter) that the Eurasian admixture in East Africa may be explained by an Austronesian migration. The full merged and computationally phased dataset of 4216 individuals typed at 328,000 SNPs will be made available at www. malariagen. net/data. Genotypes for the MalariaGEN samples included in this paper are a subset of a large study on malaria susceptibility, the data from which will be made available at the European Nucleotide Archive (accession number TBC).
: Source data 1. Overview of sampled populations describing the continent, region, numbers of individuals used, and the source of any previously published datasets. DOI: 10. 7554/eLife. 15266. 004 Figure supplement 1. Map of populations used in the analysis. DOI: 10. 7554/eLife. 15266. 005 Figure supplement 2. An example of hierarchical clustering to chose two groups of similar individuals from the Fula based on a PCA of The Gambia. DOI: 10. 7554/eLife. 15266. 006 Figure supplement 3. fineSTRUCTURE analysis of the full dataset. DOI: 10. 7554/eLife. 15266. 007.
SYSTEM OVERVIEW To support our experiments with virtual agent's control from a single affective dimension, we designed a complete software platform, which is presented in Figure  1. From the user's perspective, the virtual agent behaves autonomously as a response to what it perceives as the user's mental disposition towards itself. Users are instructed to express positive feelings towards the agent in order to capture its interest. This should in turn result in the agent responding to the user with an expression matching the perceived interest in both valence and intensity. Users' attitudes are captured through their levels of PFC asymmetry, using fNIRS to measure differences in activity in left vs. right PFC (Figure  1A ). This is based on extensive work relating the approach/withdrawal affective dimension to PFC asymmetry, measured through EEG  (Davidson et al.
BCI Input We used an fNIR400 Optical Brain Imaging Station by Biopac Systems, with a 16-channel sensor and a fixed 2. 5 cm sourcedetector separation for BCI input (for channel locations, see  Ruocco et al. , 2014). This device measures intensity changes in two wavelengths (730 nm and 850 nm) to calculate changes in oxygenated and deoxygenated hemoglobin concentration (HbO and HbR, respectively) using the modified Beer-Lambert law (see  Ayaz, 2010). Raw data and HbO values were collected with 2 Hz sampling frequency using software provided by the device manufacturer (COBI Studio and FnirSoft v4. 1), and was sent to a remote client experimental software over TCP/IP (using FnirSoft DAQ Tools). We selected the HbO signal to provide real-time feedback, which has been applied successfully in research involving affectrelated manipulation in the DL-PFC  (Tuscan et al.
This value, updated with the same 2 Hz frequency of the sampling rate, reflects inter-hemispheric difference in HbO change in micromolar units (µMol/L). The collection of fNIRS data was organized into blocks, each consisting of a sequence of epochs (short time periods with a specific task). We describe the structure of blocks and the experimental tasks during each epoch in the next section. HbO values on each channel were extracted using time synchronization markers. To compensate for the approximately 7 s delay in the hemodynamic response  (Bunce et al. , 2006) , we excluded data from the first 7 s in each epoch and included data from the first 7 s after the completion of each epoch (Figure  4 ;  Aranyi et al. , 2015a).
Subjects, Procedure, and Feedback Mapping Eighteen english-speaking adult subjects participated in the experiment (eight female, mean age = 35. 11 years,  SD = 11. 25, range: [21; 60] ). Data from one subject was discarded due to technical problems during data collection. Subjects were right-handed and were not treated for psychiatric conditions. The study was approved by Teesside University's Research Ethics Committee. Subjects provided written consent prior to participation and received an online retailer voucher equivalent to $30 upon completing the experimental protocol. We followed the recommendations of  Solovey et al. (2009)  for the use of fNIRS in a HCI setting. Subjects seated approximately 47 (120 cm) away from a 24 monitor displaying experimental instructions and stimuli (including visual feedback during NF) in a dimly-lit, quiet room in a comfortable chair to minimize movement artifacts, with the fNIRS sensor positioned on their forehead, covered with non-transparent material to prevent ambient light from reaching the sensors.