The fast development of high throughput genotyping has opened up new possibilities in genetics while at the same time producing considerable data handling issues. TheSNPpit is a database system for managing large amounts of multi panel SNP genotype data from any genotyping platform. With an increasing rate of genotyping in areas like animal and plant breeding as well as human genetics, already now hundreds of thousand of individuals need to be managed. While the common database design with one row per SNP can manage hundreds of samples this approach becomes progressively slower as the size of the data sets increase until it finally fails completely once tens or even hundreds of thousands of individuals need to be managed. TheSNPpit has implemented three ideas to also accomodate such large scale experiments: highly compressed vector storage in a relational database, set based data manipulation, and a very fast export written in C with Perl as the base for the framework and PostgreSQL as the database backend. Its novel subset system allows the creation of named subsets based on the filtering of SNP  and manually applied sample and SNP lists at negligible storage costs, thus avoiding the issue of proliferating file copies. The named subsets are exported for down stream analysis. PLINK ped and map files are processed as in- and outputs. TheSNPpit allows management of different panel sizes in the same population of individuals when higher density panels replace previous lower density versions as it occurs in animal and plant breeding programs. A completely generalized procedure allows storage of phenotypes. TheSNPpit only occupies 2 bits for storing a single SNP implying a capacity of 4 mio SNPs per 1MB of disk storage. To investigate performance scaling, a database with more than 18.5 mio samples has been created with 3.4 trillion SNPs from 12 panels ranging from 1000 through 20 mio SNPs resulting in a database of 850GB. The import and export performance scales linearly with the number of SNPs and is largely independent of panel and database size. Import speed is around 6 mio SNPs/sec, export between 60 and 120 mio SNPs/sec. Being command line based, imports and exports can easily be integrated into pipelines. TheSNPpit is available under the Open Source GNU General Public License (GPL) Version 2. High throughput single nucleotide polymorphism (SNP) genotyping is evolving at a staggering rate, developing into a powerful tool in genetic analyses in all areas of biology . AlthougIn dairy cattle for example, more than 1.2 mio genotyped animals had been registered in the US CDCB database [Apart from the initial raw data management issues, SNP data analysis workflows often include filtering SNPs, thereby creating genotype subsets for different purposes. Keeping track of a multitude of derived SNP datasets is possibly a bigger issue than disk space requirements. Therefore, it makes sense to organize data management through the use of a relational database, which provides SNP access to multiple users.A number of database developments have tried to address some of the above mentioned issues –6. HowevBeing defined as a data repository, TheSNPpit does not have any data analysis features of its own, since excellent software packages like PLINK  are avaiLack of standardization of SNP data formats and ensuing problems are well known and their pitfalls have been discussed by Nelson et al. and Nicolazzi et al. , 11. IndTo circumvent this issue it was decided to use the quasi standard PLINK ped/map format  for dataAny researcher that does data analysis of genomic data in such a context has to be aware of the integration/annotation problem, thus, our defined starting point of PLINK ped/map data does not add a new level of complexity or uncertainty.There are no restrictions for panel sizes, allowing their free mixture in the database. With this pre-condition data from different genotyping platforms—each with their own annotation—can be dealt with in one database.Proliferating copies of the original SNP data, which are produced through filtering processes, will sooner or later lead to management and disk space issues. TheSNPpit should avoid the storage of multiple copies of nearly identical datasets: after their use the files can be removed, as they are easily and quickly restorable from the database. Obviously, such export/analyze/delete cycles are only a practical proposition if the exports are very fast.TheSNPpit should be a SNP data storage system with an emphasis on management support. Consecutive subset definitions should be recorded automatically for documentation purposes.SNP data files can be very large and indeed overwhelming both in terms of raw disk space as well as resulting processing time. With possibly millions of SNP genotype records from high density panels, both should be minimized.Any biallelic system should be supported, such as AB or ATGC, which can be recovered on export exactly as previously imported.Often phenotypes are recorded together with the SNP data. TheSNPpit should be sufficiently general to cover all SNP use cases, no matter from what organism the data is derived. Thus, no phenotypes can be implemented that are specific to certain use cases. Instead, a generalized phenotype system, which allows storage and retrieval of any phenotype attached to a sample or individual is required.TheSNPpit should use a generalized internal format for SNP storage, thereby allowing import from any source.The database must scale to allow storage of SNP data on millions of samples and different panel sizes, including SNPs from whole genome scans.A command line interface aids the easy inclusion of TheSNPpit into workflows, following the UNIX paradigm of one program performing a small, accurately defined task and doing it well.Solely open source software (OSS) including the operating system should be used to allow for widespread use and encourage adaption and further development by interested parties.The objectives for the development of TheSNPpit were:In their contribution Groeneveld and Truong  presenteFor a better understanding of the following implementation, its principles will be repeated briefly.For a given SNP panel, a fixed number of SNPs is always genotyped for every sample. Each SNP is named—if known—and placed on the chromosome by base pair position and chromosome number. Accordingly, each SNP is usually considered an individual entity which is modeled accordingly in the database design through an instance of an entity with the genotype or its alleles being the only net data. For one plate with 96 wells for a 800K panel more than 76.8 million rows are created. Adding the keys for sample identification and SNP names to the genotypes easily leads to hundreds of MB to store just data from one plate in a relational database if SNP data are modeled as one SNP per row.Alternatively, all SNPs can be viewed as elements of a vector, whose description is identical for each sample. As a result, no SNP-specific information needs to be stored with the genotype data, as the map is stored only once and the relevant SNP information can be derived from the SNP’s vector position. Thus, for the above mentioned plate only one record will be stored instead of the 76.8 mio. Obviously, each will be much longer: with an 800K panel it will consist of 1600K bytes, if the alleles are stored as one ASCII character each.In biallelic systems only three states exist: the two homozygous genotypes for allele 1 and 2 and the heterozygous genotype. This requires only 2 bits, which can even accommodate no-calls or missing values. The genotype record can thus be viewed as a bit vector: the 800K record can now be stored in 1600K bits i.e. 196KB. More general, one byte can store 4 SNP genotypes, which amounts to 4.096 mio SNP for one MB.Genotype data are usually produced by genotyping labs in batches and need to be stored as they are delivered to the user. For analysis, on the other hand, often a data set comprising certain SNPs from a defined set of samples is required. Thus, the import or loading of new data will happen in smaller or larger batches, while the extraction or export should allow specification of SNPs and samples.individual_selection and snp_selection. The former is a list of sample IDs used for locating the genotype vector of certain samples. The latter has the dimension of the panel size with a 1 in the SNP position to be extracted. Both vectors are used in the export phase: retrieval of the compressed genotype vectors is determined through the entries in the individual selection vector, while the SNP selection vector determines which SNPs are to be written to the export vector. For repeated use of a particular genotype set—be it as the basis for a new subset definition or for export—only the two vectors need to be stored in the database and be given a name: the exports can be executed solely on the basis of the genotype set name [This is achieved through two selection vectors set name .The storage space requirements for a genotype set in the database are minimal: the 800K panel requires an equal number of entries, 800K, in a bit array, amounting to 97.7KB, while the individual selection vector only has the length of the number of samples in the export set.Sometimes phenotypes are recorded along with genotype data. We have implemented a generalized mechanism for storing additional data for each sample which can be freely defined by the user.TheSNPpit has been written exclusively using open source software and is distributed under the GNU General Public License (GPL) Version 2 or newer . The fragenotype_bits in table genotype_data. This vector uses 2 bits per SNP for storing the four states: homozygous for allele 1, homozygous for allele 2, heterozygous and the no-call, as described above. In PostgreSQL only a 4 byte overhead is incurred for each such bit array, with no practical limitations to its length, which has been tested for panel sizes up to 50 mio SNPs.genotype_bits vector. Thus, for an 800K SNP record only 25KB are needed. The individual selection vector is implemented as an integer array, storing the integer keys of the sample_id from table individual. Even with possibly tens of thousands of samples, this vector requires relatively little storage space, in the order of kilo- to megabytes.As described in more detail below in Listing 4, a SNP and an individual/sample selection vector define a genotype set. The SNP selection vector is implemented as a ‘bit varying’ data type, using one bit for each SNP in the snp_selection and individual_selection and one record in genotype_set resulting in a few KB or perhaps MB. This is the reason why subsets can be defined at virtually no storage costs.Defining a new subset of the originally loaded SNP data thus amounts to only storing a new SNP and individual selection vector in tables Timestamps are added to all records in the database, which gives the user the opportunity to follow up on certain batches of data.All functions are implemented in the standard UNIX format as command line instructions with a number of options. This facilitates an integration of TheSNPpit actions into genomic pipelines and workflows.TheSNPpit is intended to be a highly efficient database for storing, defining subsets and extracting SNP data. Accordingly, its features are limited to actions required for this scope. The program can either be invoked as ‘TheSNPpit’ or ‘snppit’ for practical reasons. The main functions are:This function inserts new panels as well as SNP data (see Listing 2). Standard PLINK maps and peds are processed . SNP datThe standard map file consists of the columns: chromosome name/number, SNP name, position, and possibly the biallelic variant for the SNP, such as AB or AT GC. The latter is not part of the PLINK map file format but was added to support storage of alleles and their recovery upon exports.For each data import a standard PLINK ped and map  file is The definition of subsets and/or genotype sets is a strong feature of TheSNPpit.genotype_data table with content as given in line 5-11 with 8 SNP for panel 1 and 4 SNP for panel 2. The genotypes are 0, 1, 2, 3 standing for homozygous 1, heterozygous, no call and homozygous 2. The loading process, with a function call similar to line 2 in Listing 2, not only loads the SNP data, but also creates an individual selection vector  and a SNP selection vector .In Listing 3 the process of defining subsets is explained. Initially, SNP data from two panels are loaded resulting in the is_003, as shown in Listing 3, line 19. The selected samples are loaded from the file is_selection1.txt, shown in line 1 of Listing 4. The SNP selection is specified through a SNP selection vector  loaded from a file ss_selection1.txt . Those SNPs that are not part of the new subset are identified through a 0.Next, we assume that we want to define a subset for panel 1 which only includes SNPs 3, 4, 6, and 8 for samples 23, 25, and 35. The selection of individuals is reflected in a new vector gs_003 is defined by inserting a new line in table genotype_set as shown in line 37 of Listing 3. Through the name of the genotype set its SNPs and individuals are uniquely defined, which is used for exporting and further subset definition.As the last step, a new genotype set Apart from explicitly defining selection vectors based on sources external to the database, as shown in Listing 4 and through the initial data import (Listing 3) these two selection vectors can also be created within the database on the basis of filters based on major allele frequencies (maf), frequencies of no-calls for samples and SNP, and chromosomes. Each such filtering can create a new genotype set, which can be the basis for subsequent filtering. An example is given in Listing 5.gs_001. Line 13 states that gs_001 is based on is_001 and ss_001, while lines 26 and 38 give further details on those two vectors: line 26 provides the information on the panel size (580961 SNPs), and line 38 states that 5498 samples are involved.Line 1 through 5 of Listing 5 are subset operations executed in the database after the initial data have been imported into an empty database, which resulted in the genotype set gs_001) included duplicates, which are removed in line 1, thus creating a new genotype set gs_002. This genotype set, gs_002, uses the full SNP selection vector, but the smaller is_002, which has 11 fewer entries than the original is_001, as seen in lines 14 and 39.The input data .Line 3 now filters low quality samples and SNPs by setting the no-call frequency threshold to .05 and that for the SNPs to .03 based on the genotype set Lines 4 and 5 from Listing 5 finally each add a filter on the basis of major allele frequencies, first at .03 and then additionally at .05 based on the set from the .03 filter. As before, the SNP and individual selection lists provide the detailed outcome of these filtering steps.Source information.The format chosen should help to keep track of subsets through the indention and the Often phenotypes are recorded along with genomic data. For a generalized approach we have implemented an entity-attribute-value model. Usually phenotype traits are column names in the database structure. This is appropriate, when a well defined set of phenotypes is to be stored. However, the TheSNPpit developers do not know, what phenotypes the users will want to store. This functionality allows the user to specify phenotype names and values as part of the data to be loaded. The phenotypes are linked to the sample name with no restriction in the number of different phenotypes. Upon export, the database is scanned for phenotypes from those samples included in the export. If found, they are exported as a csv file for further processing, one line for each sample with the sample ID, the phenotype names and data across.Listing 6 gives an example of the phenotype input file and the snppit command to import it. The first column is the sample ID, followed by the phenotype names. The following lines show the actual phenotypes for each sample ID, all values in standard comma separated value (csv) format.Being a SNP repository, exports of previously defined genotype sets are the main activities of TheSNPpit. The philosophy is: define a subset in TheSNPpit, export, use and delete it. If this file needs to be used again, then a very fast export will provide the data file. The default output format is PLINK: each export produces one map and one ped file . The “01Listing 7 shows the pseudocode of how subsets are actually created from the genotype set names and their defining SNPs and individual selection vectors. As can be seen, the database is only accessed once to recover all SNPs for a sample independently of the panel’s size: be it 8 SNPs as used in the example or millions from high density panels or even whole genome sequences.For housekeeping and database management, a number of reports can be generated. The listings provide information on the database size, size of panels and the number of SNPs stored. Furthermore, each record is tagged by a timestamp at database insertion. Samples with more than one genotype record can be listed. Content of specified selection vectors as well as phenotypes of a given genotype set can be produced. Also, SNP names and sample IDs can be exported for given subsets. To keep track of subsets, the user can specify comments. If chosen prudently, these comments will help to document database actions as part of the database content.A number of delete and update functions have been implemented that should be sufficient for normal operations. Deletes can be made for all major entries like panel, individual, genotype sets, individual and SNP selection vectors, and genotype records. Depending on what is to be deleted cascading deletes will be performed.TheSNPpit design goals were high execution speed, great storage efficiency and scaling to very large databases. In the following we shall investigate the scaling of TheSNPpit with respect to panel sizes for import and exports for various sets and subsets of SNP data. All timings where obtained on an Ubuntu system with 16GB of RAM and a quad core Intel i5-4670 CPU and recorded as wall clock time. The timings include only the actual inserts and exports and not the initial reading of the map information from the database at start up, which would unduly punish genotype sets with small numbers of records.Synthetic SNP records were generated for various panel sizes to investigate scaling and performance.In the first run 111368 samples with a genotype record and 900 mio SNPs were loaded into the empty database. This process was repeated 4 times resulting in batches of 445472 samples with a total of 3600 mio SNPs to test the scaling of import speed as the database fills. The import performance was measured as million SNPs per second and plotted separately for each batch .Loading the 100000 individuals with the small 1K panel incurred a substantial overhead, resulting in a performance of just below 2 mio SNPs per second. But already from the 10K panel on, the performance is basically constant at around 6 mio SNPs per second. Thus, loading 100 mio SNPs takes only around 16 seconds. Only when records from the 10 and 20 mio panel were imported, a small reduction down to 5.5 mio/sec was incurred.Thus, the import rate is nearly independent of the panel size across the vast range of 10K to 20000K. Therefore, SNP records derived from whole genome sequences can be handled just as well as regular low and high density SNP arrays.Furthermore, the import rate speed is also independent of the fill of the database over the range investigated.Repeated export-analysis-delete cycles of SNP data, to avoid subset file accumulation, are only feasible, if exports are no bottle necks. In databases, which store single SNPs recordwise exports can easily take hours.Benchmarking the exports will provide an answer if the highly optimized C implementation does indeed facilitate repeated export-analysis-delete cycles of SNP data.It can be observed that the speed of export increases with both panel size and number of samples in the export set. Export speeds for the 50K panels were around 40 mio SNPs per second, going up to more than 120 mio SNPs for the larger panels. It should be noted that exporting the 2000 sample 700K genotype set took only 15 sec wall clock time for the 1.4 billion SNP.The lines for the 50K and 100K genotype sets do not show the increase in export performance that the larger panel sizes exhibit . HoweverFiltering on the basis of no-calls and major allele frequencies or exclusion of certain chromosomes leads to new subsets of genotypes. To assess the export speed of subsets and to quantify the performance penalty when a subset is exported relative to the full set, we created new SNP selections on the basis of chromosomes 1, 3, 5, 12, 17, 25, and 29 totalling 233319 SNPs, instead of the original 1.5 million. We tested genotype sets with 100, 500, 1000, 1500, and 2000 samples for a 1500K panel, but with only 233319 active SNPs each.To be able to export the reduced SNP set, the complete 1500K packed genotype record is transferred from the database to the client program, where those indicated by the SNP selection vector are decoded. These are then copied to the output vector, which is finally written to the export file.As can be seen from the bottom line (subset) in In absolute terms, exporting the 3000mio SNPs from the 2000 sample/1.5 mio genotype in this benchmark took only 25 sec.Highly compressed storage must be met with a large capacity to handle massive data in a database. This was tested by importing SNP data from more than 18 million samples of various panel sizes ranging from 1K through 20000K. The resultant database stored the 3.4 trillion SNPs in 840GB for the genotype data plus around 9GB for everything else including SNP names and sample IDs as shown in Listing 8. The 868 genotype sets created during the import phase used a mere 216KB, Listing 8, line 28, supporting the statement that derived genotype sets can be stored at nearly no costs.The export rate was independent of the database size. For a very large database with millions of samples, only the initial startup time may take some seconds longer. The ensuing export speed will then be identical in large and small databases. Thus, we conclude that massive databases with efficient imports and exports are possible with TheSNPpit, well beyond the here tested 850GB.TheSNPpit software does not have inherent capacity limitations, but external factors may have effects. These can be the inherent limits of the file system used, the memory available and limitations of PostgreSQL. Clearly, with increasing panel sizes, more RAM will be required. With 64bit machines, the RAM will be no problem as only one genotype vector is handled at a time.genotype_bits in genotype_data as it increases with panel size. However, with our compressed storage a panel size of 4,294,967,290 SNPs could be handled by PostgreSQL in its 1GB, a limit that even data from whole genome scans will not approach.As of PostgreSQL-9.4 the maximum database size is 32TB with a limit of 1GB for a field. The 32TB will rarely be a limitation given our compressed SNP storage. The 1GB limit could conceivably only be reached by the packed TheSNPpit is a fast database system for storage and management of large volumes of SNP data. It can handle panels of any size, even those derived from whole genome scans. Through its compressed storage of genotypes, very large numbers of SNPs can be stored and exported efficiently. However, there are a few other software packages available that could possibly also be used for the intended purpose of TheSNPpit. SNPpy was already published in 2011 with an update in 2013 , 15, whiIn In the 139 mio SNPs HapMap dataset, importing took around 10 minutes for dbVOR and SNPpy while TheSNPpit finished this task in 22 seconds. The exports of all 139 mio genotypes took 4 to 5 minutes for dbVOR and SNPpy versus 7 seconds with TheSNPpit. When it comes to exporting SNPs from chromosome 1 only, the difference becomes smaller but is also much less relevant because of the much shorter absolute time.The more realistic second dataset with its 3.2 billion SNPs gives a better understanding of the relevance of processing speed. Import times are not really that crucial because loading of data is done only once. But still, also here, the import in TheSNPpit was much faster, taking only 10 minutes while the users needed to wait 1 hour and 7 minutes with dbVOR and nearly 4 hours when using SNPpy.Exports are done more often, therefore, fast execution is more important. The excution timings are around 3 and 1.5 hours for dbVOR and SNPpy, respectively, while TheSNPpit finishes after 76 seconds.When exports are done to a solid state drive (SSD) instead of the traditional hard disk drives (HD) the wallclock time for TheSNPpit halves going down to a mere 35 seconds, while the export time for dbVOR and SNPpy barely change.It must be noted that SNPpy can make use of multiple CPUs. When using all four processors of our benchmarking system, the load time goes down from around 4 hours to less than 3 while the exports of all genotypes went down from 1.5 hours to 30 minutes. Still, TheSNPpy is much faster than either dbVOR and SNPpy.While faster program execution is always nice to have, it allows or prevents some use cases once a certain limit is reached.With exports of 3 hours the processing time will become unacceptably long. Users will rather keep copies over copies of derived files with genotype sets, instead of deleting and exporting them again when required. Thus, the high export speed not only reduces waiting time, but also allows—together with the novel genotype set system implemented in TheSNPpit—“export-analyze-delete” cycles, a very advanced approach to data management.Another issue is scaling. For the HapMap dataset dbVOR exports the 139.5 mio SNPs at a rate of.47 mio/sec. On the larger second dataset (3200.5 million SNPs) this figure goes down to.30 mio/sec which constitutes a drop of 36%. The corresponding figures for SNPpy are.6 mio SNP per second for both datasets. TheSNPpit, on the other hand, exports the HapMap SNPs at 20.0 mio/sec while the second larger dataset gets exported at an even higher rate of 42.1 mio/sec on HD and 91 mio/sec on SSD. Thus, the export performance of dbVOR seems to deteriorate with larger datasets, SNPpy exports at the same rate, while TheSNPpit even increases its export speed going from a smaller to larger a dataset and that on a level that is two orders of magnitude higher.Given today’s rate of genotyping the 5509 dataset is not really large. Based on the benchmark results an export for a 50000 sample dataset would require 30 hours of processing with dbVOR  while the same job would be finished after 760 seconds with TheSNPpit and only 6 min when exporting to an SSD.At the volume of such experiments, disk utilization becomes an issue. Here, the three database systems differ substantially. The SNPpy database grows to nearly 200GB for the larger dataset, while dbVOR uses 8GB and TheSNPpit not even 1GB. If used for the hypothetical 50000 sample high density dataset, the space requirement for SNPpy would increase to two TB.While tens of thousends of samples will not be uncommon in one ‘experiment’, database will likely have to accommodate data from more sources, if centralized data management is considered important. If one wanted to use SNPpy instead of TheSNPpit for a database as given in Listing 8 its size would be in the order of 100TB. This does not sound practical even with today’s low disk storage costs. dbVOR will use much less disk space because of its more efficient storage scheme. However, it will still require close to 10 times more disk space than TheSNPpit.Our conclusion is, that dbVOR and SNPpy are not suited for databases of this size, whereas TheSNPpit scales even to huge datasets as can be seen from Listing 8.The high efficiency of TheSNPpit is to be predicted from our design, which has been abstracted to a high level of simplicity. The few lines in Listing 7 define the export operation for subsets of any proportions on any panel size. Using only one compressed genotype vector for each sample maximizes database transfer speed. In TheSNPpit costly SQL calls are replaced by bit masking vectors with high speed bit shifts implemented in C using pointer arithmetic for maximum speed.TheSNPpit uses ‘panel’ as a constituent component in its design for the definition of genotype sets. Low and high density panels in the database can contain the same SNP names. However, at this time, access to genotype data is strictly within panels. Implementing logical operations on genotype sets as indicated by Groeneveld and Truong  could prWith the rapid development of whole genome sequencing the use of sequence data will become more prevalent. SNPs derived from VCF files can already now be stored in TheSNPpit without any problem. However, VCF file information cannot be handled at this stage, something that CanvasDB has been set up to handle . Here, iInput formats other than PLINK map/ped may be desirable and could be added rather easily, as could further export formats such as the binary PLINK formats.Command line interfaces (CLI) are common in bioinformatics as they support scripting which is highly advantageous in pipelines. However, some users might appreciate a graphical user interface (GUI) for a steeper learning curve. Both user groups would find their ideal interface, if a GUI and a CLI would coexist.INSTALL script on the target system under /usr/local/ with the constraint that PostgreSQL has to be of version 9.3 and up. Multiple users can be defined to interact with a database with layered access rights.An automated procedure has been developed for TheSNPpit installation on Debian/Ubuntu Linux machines . All sofTheSNPpit is freely available under the GNU General Public License version 2.A 65 page user’s guide is available. If interested contact the authors.S1 FileInstallation information.(INSTALL)Click here for additional data file.


Apios americana Medik.), once a staple food source of Native American Indians, produces protein-rich tubers, tolerates a wide range of soils, and symbiotically fixes nitrogen. We report the first high-quality de novo transcriptome assembly, an expression atlas, and a set of 58,154 SNP and 39,609 gene expression markers (GEMs) for characterization of a breeding collection. Both SNPs and GEMs identify six genotypic clusters in the collection. Transcripts mapped to the Phaseolus vulgaris genome–another phaseoloid legume with the same chromosome number–provide provisional genetic locations for 46,852 SNPs. Linkage disequilibrium decays within 10 kb , consistent with outcrossing reproduction. SNPs and GEMs identify more than 21 marker-trait associations for at least 11 traits. This study demonstrates a holistic approach for mining plant collections to accelerate crop improvement.For species with potential as new crops, rapid improvement may be facilitated by new genomic methods. Apios ( Many un- or semi-domesticated edible plants have valuable characteristics not found in existing widely cultivated crops. Such underutilized plants include those adapted to extreme or unusual climatic conditions and soil types; they may also possess resistance against a range of biotic and abiotic stresses. However, the domestication of any new species remains a formidable challenge.Chenopodium quinoa) breeding has rapidly progressed in the last 4 to 5 years, along with its recent wide acceptance as a food on the world market12Thinopyrum intermedium) has been quite successful, with yields increasing by ~77% following two rounds of phenotypic selectionHappily, there are recent examples of rapid progress and success for a few underexploited crops. Quinoa (Apios americana Medik.) is a candidate crop that merits further investigation. Apios is a perennial legume that produces a podded fruit aboveground (as do most other legume crops), which is edible but with small seeds and variable fruit set. More importantly for agricultural use, starchy tubers develop from swellings on stolons (modified subterranean stems) as observed in the potatoApios  Developing a gene expression catalog; (3) Identifying SNPs, gene expression markers (GEMs), and genotyping the collection using RNA-Seq; (4) Investigating heterozygosity, pedigree and population structure; (5) Examining linkage disequilibrium; (6) Identifying marker-trait associations using SNPs and gene expression markers; and (7) Combining phenotypic and genetic data to assist in making parental selections for subsequent cultivar development. The results obtained in this study will have broader implications for other plants with limited genomic resources, as well as for staple crops that can be further mined for crop diversity and cultivar development.In the present study, we have generated extensive genomic resources using RNA-Seq and combined them with the previously generated phenotypic data. The goals of this study are as follows: (1) Building a The plant material used in this study derives from Blackmon and Reynolds’s breeding program from 1985–1994 . Field bA. americana was built by sequencing 14 above- and belowground samples, from six tissues, from genotype 2127  the average pair-wise divergence among genotypes, or nucleotide diversity per bp, π (pi), was 0.35; and (2) the expected number of polymorphic sites per nucleotide, or expectation of π, θ (theta), was 0.22. These values are somewhat higher than that of four soybean populations  negative correlation was observed between inbreeding coefficients and “number of tubers/plant” , mother tuber weight , and mother tuber width .Inbreeding coefficient estimates for each genotype are analogous to the proportion of heterozygous loci in each genotype, but in the opposite direction–that is, the correlation coefficient is −1.0 between the inbreeding coefficients and heterozygosity of each genotype . The inbs/plant” . PositivUsing estimates of Identity-by-Descent (IBD) and the proportion of IBD values, we identified parent-child or half-sib relationships between 24 pairs of genotypes . Of the We analyzed the structure using five approaches (see Methods for details). These identified at least six clusters . BayesiaP. vulgaris chromosomes, under the assumption that the Apios and P. vulgaris chromosomes are generally syntenic–an assumption that we believe is warranted considering that most species in the Milletieae tribe have 11 chromosomes29312 thresholds, as well as along each chromosome, across the genome, and along the transcripts (2 ≤ 0.15) across the genome. Although LD decays rapidly across the genome, it is well known that the extent of LD varies in different regions of the genome. Using a sliding window of 2 Mb along each chromosome, we identified 4,222 haplotype blocks (see Methods for details on haplotype block), averaging 7.4 kb in size. The distribution of haplotype blocks along each of the chromosomes indicated enrichment of large haplotype blocks in the pericentromeric regions–this result is unsurprising, because pericentromeric regions experience lower rates of recombination , and implemented them in two packages. We inspected the performance of each of the mixed model by using quantile-quantile (QQ) plots. Based on the QQ plots, the most successful model (implemented in the GCTA package) accounted for population structure, using a familial relatedness matrix . For 19 de novo reference assembly. A normalized expression dataset was generated from these mappings (P < 0.0000013), resulted in 34 GEM-trait associations  was consistent with classification based on SNP genotyping: five of the six groups identified by fastSTRUCTURE remained intact in the phylogeny generated using GEMs. This validates the GEMs and suggests that gene expression data can be effectively used as molecular markers for understanding the population structure, and its accuracy may be comparable with SNP-based methods.A clear understanding of pollination biology is essential for performing hybridization experiments. According to Bruneau and Anderson35Brasssica napus, and the marker-trait association identified and validatedMarker-trait associations identified using association analysis can be utilized in at least two ways: (1) implementation of marker-assisted selection (MAS) in a breeding program; (2) identification of potential parents containing favorable alleles . The high heterozygosity and clear population structure in our dataset prompted us to test different models and packages for association analysis. Of the five models tested, the one that best accounted for population structure incorporated “familial relatedness” in the mixed model and was implemented in the GCTA package. This also appeared to give the most reliable results, based on QQ-plots. Controlling for population structure by incorporating “familial relatedness” has recently been shown to be helpful in association analysis involving highly structured populations with admixtureSNP markers used in this study are from the transcribed regions, and this allows for preliminary verification of marker-trait associations using the annotations of the transcripts containing SNPs of interest. A few of the marker-trait associations for which there are suggestive transcript annotations are: (1) S_23737486 (SNP)/comp54771_c0_seq1 , associated with “weeks to first leaf emergence.” This enzyme has been previously shown to regulate seedling germination3941et al.Selection of parents is the first key step in cultivar development. In our previous studyP. vulgaris, where they are separated by 318.1 kb. Although there are no SNPs within either transcript, there are 96 SNPs identified in genes falling between them (assuming conserved synteny with Phaseolus). The average LD (r2) among these 96 SNPs was 0.18, which is slightly higher than the background LD value of 0.15. Further investigation is required to test whether this region was selected during the Blackmon and Reynolds’s breeding program. Overall, GEM-based association analysis provided several candidate genes that merit further functional evaluations. GEM-based associations will need to be validated in a different collection or in bi-parental mapping populations prior to implementation in gene discovery or marker-assisted selection efforts.Gene expression in the genotypes can be correlated with their phenotypes, and is valuable in identification of candidate genes for phenotypic traits38454647384749de novo transcriptome assembly, an expression atlas of six tissues, and 58,154 highly reproducible SNPs and 39,609 GEMs across the collection. Both SNPs and GEMs successfully identified the pedigree and population structure, and association analysis identified favorable alleles and potential candidate genes for both aboveground and belowground traits. Lastly, the success of GEMs here is exciting and suggests broad utility of this method for both new and well-studied crops.In summary, this study in Apios demonstrates how a combination of high-throughput genomics and phenotypic information may accelerate the mining of a germplasm collection for a little-studied crop. We have built a large collection of genomic resources for Apios, including a high-quality reference http://www.biotech.iastate.edu/facilities/flow/).The collection used in the study was developed by Blackmon and Reynolds14® Plant mini kit and following the manufacturer’s protocol. The RNA samples were treated with Ambion® TURBO DNA-free™ DNase to eliminate any DNA contamination, and the quality and quantity were then inspected using an Agilent 2100 Bioanalyzer. Illumina® libraries were prepared, and the samples were sequenced on Illumina® GAIIx, and Illumina® HiSeq 2000 platforms (https://goo.gl/Q73j48). The reads that passed the quality trimming and were at least 25 bp in length were utilized to build the de novo transcriptome assembly using the Trinity packageArabidopsis thaliana . The six legume species included Glycine max , Medicago truncatula (v 3.5.1), Cajanus cajan (v 1.0), Phaseolus vulgaris (v 1.0), Lotus japonicus (v 2.5) and Cicer arietinum (v 1.0). Functional annotation of transcripts was performed using Trinotatede novo transcriptome assembly using Bowtie, and the abundance estimation per transcript and component (loosely termed as gene) were estimated using RNA-Seq by Expectation Maximization (RSEM)Total RNA was isolated from 14 samples, including six different tissues from accession 2127 , using Qlatforms . Both siet al.de novo transcriptome assembly construction. Illumina® libraries were prepared at the DNA Facility at Iowa State University (http://www.dna.iastate.edu), and the samples were sequenced on Illumina® HiSeq at National Center for Genome Resources (NCGR), Santa Fe, NM to generate single-end, 50 bp reads . Lastly, pedigree relationships between genotypes in the collection such as “parent-child” and “half-sib” were identified using estimates of identity-by-descent (IBD) as described in Stevens et al.The two commonly used diversity estimates, average pairwise divergence or nucleotide diversity per bp, π (pi), and number of segregating sites per nucleotide, θ (theta) were generated using the option “Diversity” in TASSEL. Similarly, the Tajima’s D was produced in TASSEL to understand the evolutionary history of the breeding collection. The extent of heterozygosity in the collection, and its effect on phenotype, was investigated by estimating inbreeding coefficients for each genotype using the “–het” option in PLINK. The correlations between inbreeding coefficients and REML-based LS means of phenotypic traits recorded in Ames, IA in 2011–2012 were performed in R  Phylogeny reconstruction using the package SNPhylo2.” The r2 values were generated for all marker pairs located within and between transcripts using the options “–r2, inter-chr and –ld-window-r2 0.0” in PLINK. We further mapped the Apios transcripts to the Phaseolus vulgaris genome assembly (version 1.0) using gmap (2014-05-15.v3) with the following settings: “–cross-species, –format = coords, –npaths = 0, –chimera-margin = 0, intronlength = 10034, –totallength = 60969,” and retrieved the likely location information for ~81% of the SNPs. These marker locations were then utilized to investigate the decay of LD along each of the “pseudo-Apios” chromosomes, as well as across the genome, with the assumption that the genome structure is conserved between the two phaseoloid legumes A. americana and P. vulgaris. The background LD estimated as the 90th percentile of the r2 value of marker-pairs on different chromosomes, and the commonly used criteria (r2 = 0.1 and 0.2) across the genome, were used to set a threshold to determine the LD decay. Haplotype blocks were estimated using the options “–blocks, no-pheno-req and –blocks-max-kb 2000” in PLINK. The maximum haplotype block size was set to 2 Mb. In this method two SNPs are considered to be in ‘strong LD’ if the lower limit of the 90% D-prime confidence interval is greater than 0.7, and the upper limit of the confidence interval is at least 0.98. Generally, for a haplotype block the number of ‘strong LD pairs’ must be more than 95% of the total number of informative pairs. The pericentromeric start and end coordinates of each of the chromosomes were obtained from the P. vulgaris genome browser hosted at the Legume Information System (legumeinfo.org).Linkage disequilibrium in the collection was investigated using the LD statistic “ret al.P-value less than 0.0001 were considered as significant associations38The phenotypic dataset used for association analysis is previously reported in Belamkar 2 and significance (P) values were recorded per trait for each of the GEMs. The associations were: (1) filtered by applying Bonferroni correction of P < 0.05, which resulted in a new threshold of P < 0.0000013 (0.05/39609). (2) The associations that passed the Bonferroni test were examined for assumptions of linear regression. FPKM normalized expression values were represented along Y-axis, and REML-based LS means for the phenotypic trait were plotted along the X-axis. The significant associations that passed both the Bonferroni test and met the assumptions were tabulated, and also displayed using Manhattan plots. The significant associations were further verified by comparing the associated phenotypic trait with the annotations of transcripts.Linear regression analysis was performed in R with 39,609 GEMs as dependent variables, and each of the 20 phenotypic traits as independent variables. The adjusted-rhttp://www.r-project.org/). R code for replicating the analysis and plots are provided in The statistical analyses described in this article were performed in R .


In this article, an Arrival and Departure Time Predictor (ADTP) for scheduling communication in opportunistic Internet of Things (IoT) is presented. The proposed algorithm learns about temporal patterns of encounters between IoT devices and predicts future arrival and departure times, therefore future contact durations. By relying on such predictions, a neighbour discovery scheduler is proposed, capable of jointly optimizing discovery latency and power consumption in order to maximize communication time when contacts are expected with high probability and, at the same time, saving power when contacts are expected with low probability. A comprehensive performance evaluation with different sets of synthetic and real world traces shows that ADTP performs favourably with respect to previous state of the art. This prediction framework opens opportunities for transmission planners and schedulers optimizing not only neighbour discovery, but the entire communication process. The Internet of Things (IoT)  is an inSmart cities are just one of the envisioned IoT applications  because opportunity to convey information across different domains. In fact, it is well known that mobility can increase capacity [From a networking point of view, this scenario implies the need for increased connectivity between IoT devices and for a better way to manage their communications. While historically, in such settings, mobility of IoT devices has been seen as an added constraint into networking, more recently  it has bcapacity  of tradiOpportunistic IoT ,10 is thResource constrained IoT devices with lower computational, storage or battery capabilities could assign heavier tasks to more powerful or easily rechargeable IoT devices  as well Recent research has shown that is possible to either learn ,20,21 abonline without requiring extensive training or data collection campaigns, and requires very few data and computational capabilities to output predictions. In addition, ADTP’s learning can take place both on the static and the mobile IoT devices, meaning that it is suitable for any type of resource constrained device, being it mobile or not. Finally, a short prediction errors history is used to recognize abrupt changes in mobility patterns and take immediate action to re-act to changes.In this paper, an algorithm for Arrival and Departure Times Prediction (ADTP) of IoT devices is presented, thus capable of also making estimates of durations of future encounters. The Least Squares Temporal Difference (LSTD) ,25 learnADTP is evaluated against previous state-of-the-art extensively both in accuracy of prediction and in neighbour discovery performance on different synthetic and real world mobility traces under different mobility conditions typical of urban scenarios . The results show that ADTP outperforms previous state of the art in all scenarios taking into account both energy spent and discovery latency.Especially concerning energy spent, the results show that ADTP introduces additional energy savings for both synthetic and real world traces and just increases its energy expenditure in order to keep a performance edge in latency over CARD in scenarios presenting a high degree of randomness, however still consuming very little energy if compared to other probabilistic state-of-the-art approaches. In fact, as reported in the evaluation section, if both wasted time and wasted energy for discovery are taken into account, a performance edge is shown for ADTP.Most importantly, contrary to the previous work, ADTP can allow for optimization of the communication process since knowledge about contact times and durations can allow for adjusting the data transmission process accordingly, e.g., not starting a data transmission if the contact time will mean it will fail midway. This allows for additional saving energy and bandwidth due to the avoided failed transmissions and retransmissions.The remainder of this publication is organized as follows. Urban scenarios typical of a Smart City enable a new series of proximity services due to the opportunistic nature of interactions between mobile and static IoT devices such as smartphones, wearables and wireless sensors/actuators. A typical scenario such as the one depicted in Even though some IoT devices  have readily available power supplies, other devices such as i.e., mobile data collectors attached to bicycles or livestock, static sensors/actuators deployed in garbage bins, drones and smartphones might rely on efficient power management mechanisms for prolonging their lifetime and not impacting user experience. It is important to note also that, given the heterogeneous nature of IoT devices, many devices might incorporate multiple radios, thus acting as bridges for opportunistic communication, but also needing to manage additional radios and the associated multiple power consumption to be able to discover different networks. The diversity and heterogeneity of IoT radio technologies further impacts the number of transmission opportunities in dense deployments such as Smart Cities, where many devices might not implement Wi-Fi but other low power radio technologies, thus requiring to rely on other IoT devices as relays.Opportunistic IoT in urban scenarios allows for new applications affecting globally citizens around the world. For example, a person (A) could collect data about pollution/noise  (B) and In this scenario of Opportunistic IoT, mobility plays the important role of enabler of pervasive communication. By correctly recognizing opportunities for communication, neighbour discovery techniques based on knowledge about patterns of mobility  are in fTemporal mobility knowledge can be obtained just by gathering statistics about temporal features between IoT devices, computed in a distributed manner on each device. For example, the adaptive energy conserving algorithms by Drula et al.  for oppoHan and Srinivasan  introducChakrabarti et al.  report oDyo and Mascolo  instead Sensor Node Initiated Probing for Rush Hours (SNIP-RH) by Wu et al.  concentrThe work by Gao and Li  defines Finally, the Context Aware Resource Discovery of Pozza et al.  reports ADTP allows to make predictions about future encounters of an IoT device based on the learned temporal pattern of interactions with other devices. An example prediction scenario is presented in The algorithm therefore provides estimates about when in time and for how long a contact will occur with high probability in the future, based on the knowledge acquired over time about the encounters already occurred. This is achieved by learning about contact arrival and departure times, which also allows to compute the forecasted contact duration as their difference. Based on such predictions, ADTP plans for every contact an optimal discovery action scheduling which allows for additional savings with respect to previous state-of-the-art. In that work, a trial-and-error action scheduling, composed also of sub-optimal actions, leads to learning the optimal sequence of actions which maximizes the reward, proportional to the latency with which a contact is discovered. It is to note that no spatial knowledge is used since it would require additional hardware (and power consumption) to gather such knowledge, thus impacting the applicability range of ADTP.ADTP’s predictions are used in this work to perform a low latency fast discovery when a contact is foreseen with high probability,  as its Common applications of reinforcement learning include robotics, games, human-computer interactions and financial economics. In fact, the main objective in such settings is to learn how to control the behaviour of some agent in a real world environment, guided by positive or negative rewards for performing actions over time. However, as Sutton proposed in his pioneering work , temporapolicy evaluation environment in which the agent’s actions are not influenced by the trajectory in the state space, being there no policy improvement steps.After an investigation, it was actually observed that the temporal evolution of mobility an IoT device follow is not influenced by the choice of the IoT device’s actions but it is actually the owner or user of such IoT devices that influences its mobility, i.e., someone’s walking route to work, the public transportation means route. This implies that the learning environment fits better that of a π. For example for the state t, the value function is updated as such:α represents the step-size parameter or learning rate (a measure of how fast new information is incorporated) and t. In the n-step case, such a reward is equal to a discounted sum of future rewards:γ is the discount factor .Conceptually, the objective of the temporal difference prediction framework is to learn in a step-by-step process a value function named eligibility traces, which is a mechanism for allowing averaged long term rewards to backpropagate based on the The temporal difference learning methods make also use of λ indeed sets the decay speed of the rewards propagation, with the degenerate case of The parameter function approximation for the value function was introduced, resulting in:feature representation in the state space and θ is the parameters vector to be learned. The parameters vector is updated at every iteration as such:episode considered  and δ represents the temporal difference update. This is computed as such:Since ADTP’s framework aims at predicting temporal values, which might cause the state space to be large, λ)) algorithm for approximate policy evaluation , which performs stochastic gradient descent on a cost function of the parameters, LSTD(λ) builds estimates of (a constant multiple of) a vector d and a matrix C, solving a system of equations as such:Algorithm 1: LSTD(λ) for approximate policy evaluation - Boyan (1999)The Least Squares Temporal Difference (LSTD(ee Boyan ) capableb and a matrix A as unbiased estimates over n episodes of, respectively The algorithm constructs a vector A and the vector b are updated recursively. The parameters vector can be obtained by a simple matrix inversion  and a matrix-vector product as follows:As it can be seen from Algorithm 1, at every step the matrix exponential windowing factor [Finally, the parameter g factor , which wAs aforementioned, the value functions are approximated by two vectors:In a next contact prediction environment, the current prediction does not intuitively depend on the next prediction, so the discount factor was set to t, considering a history of t obtained by evaluating the value function. At every step, a comparison between the moving average In order to recognize sudden changes in mobility patterns such as a change of pattern between weekdays and weekends, the arrival predictor is equipped with a history of the errors between the predicted values and the values actually observed. A simple moving average of the errors history is used to evaluate the accuracy of the predictions, thus identifying diverging trends. In particular, at step λ) running in parallel and receiving new rewards for every discovered IoT device. Low Probability Schedule (LPS) to be scheduled when contacts are predicted with lower probability thus introducing energy savings.High Probability Schedule (HPS) to be scheduled when contacts are predicted with high probability thus allowing for a timely discovery.Miss Schedule (MS) to be scheduled when discovery did not happen in previous schedules.ADTP’s resource scheduler is based on the arrival and departure times predicted by the two instances of LSTD guaranteeing discovery within a temporal bound Low Latency Action (LLA) guaranteeing discovery within a temporal bound where the parameter D is decided by application requirements. As in CARD, the general temporal overlap driven approach by Dutta et al. [candidate prime value as:Sieve of Atkin in order to obtain a balanced prime pair Similarly to CARD , the acta et al.  was usedselective sleeping was introduced in order to introduce additional energy savings by allowing to selectively sleep during the next LPS schedule according to the correct happening of a discovery during the last HPS schedule. This rewards the resource scheduler with lower power consumption when the predictions are accurate.An additional feature named drift effect is in place, caused by a restriction of the temporal window for the HPS schedule. As a countermeasure, it was introduced a lower bound on Finally, it was noticed that when accuracy is very high a Thus as an average and spanning the minimal duration discussed above.This section introduces the results obtained by evaluating ADTP’s performance, both in the accuracy of the predictor and in the energy and latency trade-off of its resource discovery planner scheme.PyBrain [The design of ADTP and an evaluation of its accuracy has been carried out by relying on the Python-based Reinforcement Learning, Artificial Intelligence and Neural Network  or the generator for the synthetic traces. The mobility traces used consist of the Deterministic and Multiple Deterministic traces with a fixed inter contact time of 30 min, plus the eventual 3 min increase every two days. In addition, Gaussian and Multiple Gaussian traces were simulated, distributing inter contact times according to a ted (see ) propagaThe arrival and departure predictors are then instantiated and initialized with the starting values. It is important to note that the predictor is build based on the Armadillo C++ library   in orderAdditionally, the probabilistic wakeup scheduler (PRWS) of Gao and Li  was seleA simulation set of 50 independent parallel runs  with 95%In This is due to the fact that the 3 min perturbation of periodicity is ten times bigger than the best possible contact duration (18 s), thus leading to a more challenged prediction. Indeed, these changes in mobility patterns, lead to a longer HPS schedule and therefore to higher energy expenditure.As regards PRWS, it is possible to see that the energy spent by this approach in order to discover all contacts with the lowest latency is still far greater than the one needed by both ADTP and CARD. In particular, in the 40 km/h worst case ADTP consumes an energy which is 98.3% less than the energy of PRWS, with CARD consuming as low as 95.4% less than PRWS in the 3.6 km/h case. Concerning the wasted time energy product it is still possible to see a performance edge of ADTP and CARD with respect to PRWS, quantifiable in a 90.6% lower value for ADTP and in a 48.5% lower value for CARD in the worst 40 km/h case.In Additionally, by considering that in the gaussian scenario all the contacts are normally distributed within 300 s at 99.7% of the fixed intercontact time and that the contact durations are 200 s, 36 s and 18 s, it is possible to understand why there is a sharp increase in power consumption as the contact duration decreases.In fact the Gaussian traces randomness pose a great challenge on the predictor capability to predict contact displacements, with the predictor only able to predict those on average and increasing the length of the HPS schedule, therefore dynamically increasing power consumption to keep a lower latency supremacy. In fact, only in the 3.6 km/h case, ADTP has a lower power consumption than CARD, quantifiable in a 17.7% decrease for the Gaussian traces and in a 11.8% decrease in the Multiple Gaussian traces where the change in periodicity leads to an additional challenge on the predictor.Furthermore, it is possible to see that both CARD and ADTP consume less energy than PRWS. In particular, in the worst case of 20 km/h for both traces, ADTP consumes 89.6% and 91.6% less energy than PRWS, respectively for the Gaussian and Multiple Gaussian traces. Similarly, CARD consumes 95.2% and 95.4% less energy than PRWS in the Gaussian and Multiple Gaussian traces at 3.6 km/h. Concerning the wasted time energy product, both ADTP and CARD perform better than PRWS in the 3.6 km/h and 20 km/h cases. In the 40 km/h case, however, due to high randomness only CARD is capable to outperform both ADTP and PRWS with a 53.6% and 54.5% lower value for Gaussian and Multiple Gaussian traces, with PRWS achieving a performance edge on ADTP quantifiable in a 26.2% less for the Gaussian traces and a 7.5% less for the Multiple Gaussian traces. As mentioned, this is due to the high randomness in these scenarios, which poses great challenge to ADTP.Finally, in Concerning the energy spent for discovery while not in contact, the performance edges of ADTP are of 53.7% for the Intel traces, 60.1% for the Cambridge traces and 81% for the Infocom traces. As regards the evaluation against PRWS, ADTP achieves a lower energy value as compared with PRWS, measured in 83.8% for the Intel traces, 77% for the Cambridge traces and 71.8% for the Infocom traces. Finally, the savings in wasted time energy product reached by ADTP is of 83.6% for the Intel traces, 96.5% for the Cambridge traces and 38% for the Infocom traces.Across real world traces the best improvements of ADTP in terms of power consumption are for the Bluetooth traces (85% over CARD and 88.2% over PRWS) and this is due to the fine-grained resolution which allows to recognize also short contacts. However, the best latency advantage of ADTP over CARD is reported for the Infocom traces whereas the latency reduction shown by the Bluetooth traces roughly corresponds to the average across the real world traces, which is 7.8%.This is most likely due to the difference in number of experienced contacts by the Bluetooth trace (≥600) with respect to the Infocom traces (≤50). Moreover, while PRWS achieves lower discovery latency in most cases, this is due to the fact that it stays awake for a considerably larger amount of time , which is illustrated by the amount of energy spent by PRWS which is the largest in most cases.Finally, concerning the results about the percentage of discoveries across the total number of contacts experienced, we omit the representation since across all traces both CARD and ADTP show a very high percentage around 99% with a very little difference In this article, an arrival and departure time predictor for opportunistic IoT has been presented and evaluated. Results show that the proposed algorithm is capable to predict not only next but also future contact arrivals and duration with a good degree of accuracy. In addition, a discovery approach for scheduling communication based on such predictions has been introduced and evaluated against previous state-of-the-art protocols showing jointly improvements in terms of discovery latency and power consumption. In particular ADTP reaches a lower wasted time and energy for discovery if compared with previous state-of-the-art, as reported in the evaluation section, which as explained is indicative of a better overall performance. Moreover, ADTP adapts well to different mobility patterns, i.e., controlled periodic such as those experienced in robotised or micro aerial vehicle networks , periodiFuture plans for ADTP is to further enhance the predictor in order to not only optimize the scheduling for the next contact arrival, but also exploit multiple steps ahead prediction and knowledge of duration of contacts to further optimize not only the discovery but also the actual subsequent communication between devices. The knowledge of future contact durations could be exploited for example for tuning TCP networking or selecting the appropriate radio interface based on bandwidth requirements. Furthermore, prediction also allows optimization of message queues in IoT devices and duration-based caching for opportunistic content dissemination. Moreover, instead of adopting “greedy” schedulers, selection of most favourable  contacts could also happen based on knowledge of multiple steps ahead mobility behaviour.online next arrival and departure times with a higher accuracy further improving our approach. Indeed, additional mobility features could be integrated in the function approximation model to build a more complex representation of the value function and the learning model kernelised to be able to express non-linear relations in the data, thus leading to predictions exploiting multiple sources of knowledge.Knowledge about popularity, community membership and social relations as well as information about location tagging, which do not require additional energy or additional hardware to be generated, could also be exploited outside a data mining context and used to learn and predict Furthermore, temporal knowledge about mobility, combined also with spatial information, could be provided “as-a-service” in the cloud to manage replication and migration of cloud hosted functionalities to match mobility patterns for opportunistic offloading of computation in opportunistic IoT following the edge computing paradigm.Finally, as future work, we plan also to port our implementation of ADTP on dedicated real world hardware devices such as mobile and static IoT devices  in order to enable its exploitation by applications that can take advantage of Opportunistic IoT.


In the decade following publication of the draft genome sequence of the domestic dog, extraordinary advances with application to several fields have been credited to the canine genetic system. Taking advantage of closed breeding populations and the subsequent selection for aesthetic and behavioral characteristics, researchers have leveraged the dog as an effective natural model for the study of complex traits, such as disease susceptibility, behavior and morphology, generating unique contributions to human health and biology. When designing genetic studies using purebred dogs, it is essential to consider the unique demography of each population, including estimation of effective population size and timing of population bottlenecks. The analytical design approach for genome-wide association studies (GWAS) and analysis of whole-genome sequence (WGS) experiments are inextricable from demographic data. We have performed a comprehensive study of genomic homozygosity, using high-depth WGS data for 90 individuals, and Illumina HD SNP data from 800 individuals representing 80 breeds. These data were coupled with extensive pedigree data analyses for 11 breeds that, together, allowed us to compute breed structure, demography, and molecular measures of genome diversity. Our comparative analyses characterize the extent, formation and implication of breed-specific diversity as it relates to population structure. These data demonstrate the relationship between breed-specific genome dynamics and population architecture, and provide important considerations influencing the technological and cohort design of association and other genomic studies. Summary: Successful application of whole-genome sequencing and genome-wide association studies for identifying both loci and mutations in canines is influenced by breed structure and demography, motivating researchers to generate breed-specific strategies for canine genetic studies. Early mapping studies utilized a combination of pedigree and linkage analyses to find genes important in disease susceptibility in dogs i.e. ., 1997. Genome-wide association studies (GWAS) carried out using SNP markers on chips allow for the identification of loci potentially associated with causation, using populations rather than large families. Although published reports describe loci identified from GWAS associated with morphologic traits i.e. ., 2014, Canine researchers are increasingly turning to whole-genome sequencing (WGS) to supplement the limitations associated with the less data-dense methods of pedigree analysis and SNP chip mapping. Success stories include studies of domestication ., 2013, Studies of how breed structure and history can be integrated with industry-standard use of SNP chip analysis and WGS to design the most successful canine genetic studies have yet to be explored. In this paper we consider all of the above in the context of many breeds of differing population substructure, demonstrating that, although a combination of approaches is optimal, population traits can dramatically impact how each should be applied. We define metrics through which population structure can be compared between breeds and determine how that structure should be interpreted with regard to study design and cohort assembly.Selection of breeds for pedigree, SNP and WGS analysis focused both on the availability of data as well as representation of diverse breeds as defined by breed type, history, geographical origin and modern popularity. To avoid selection bias, considerable effort was given to equal representation of breed type, function and size. The pedigree data reflect the current status of each breed in the United States (US), as well as the impact of historical changes such as global importation, breed registry recognition and trends in physical type or variety. There are seven historical American Kennel Club (AKC) breed groupings  that categorize recognized breeds by their traditional function, type or purpose . The pedCombined, the WGS, SNP and pedigree datasets represent 112 dog breeds. Genetic variation at 1,510,327 LD-pruned loci aggregated from WGS of 90 dogs representing 80 breeds was analyzed, providing an impressive breadth of diversity by which to compare breeds and individuals. Complementing this, ten dogs from each of 80 breeds were genotyped using the current industry-standard canine HD SNP array with 173,662 potential sites of variation, providing definition within breeds, but potentially lacking in private variation. The 11 breeds utilized in the pedigree analysis were selected to reflect a range of breed population structures resulting from influences of time, geography and human intervention.F) was calculated three ways: (1) pedigree analysis from five generations, ten generations or the entire breed reference pedigree; (2) from SNP genotype homozygosity analysis averaged over multiple dogs per breed; and (3) from WGS homozygosity analysis of one dog per breed. Calculating F from five- and ten-generation pedigrees evaluates recent trends in inbreeding that occurred at some point after initial breed formation. Additionally, it accounts for differences in pedigree depth when compared to the complete reference population, because there was a large range in the number of effective generations (ge) for pedigree breeds. All pedigree breeds, however, did have ge values greater than ten , with the SNP analysis showing a range of 0.179 (Papillon) to 0.536 (Basenji), and WGS F-values ranging from 0.118 (Portuguese Water Dog) to 0.571 (Basenji)  to 0.267 (Norwich Terrier) for whole-pedigree data, 0.051 (Papillon) to 0.251 (Nova Scotia Duck Tolling Retriever) when considering ten-generation pedigrees, and 0.022 (Bernese Mountain Dog) to 0.064 (Belgian Sheepdog) for five-generation pedigrees . F-valueBasenji) . CompariF-values calculated from the WGS of 0.488, from a minimum of 0.084 (Beagle) to a maximum of 0.571 (Basenji), and a range in SNP-based F-values of 0.423, from 0.113 (Chihuahua) to 0.536 (Basenji). The full list of F-values is shown in Table S1. Breed rankings of SNP- and WGS-calculated F-values showed positive significant correlation ; however, neither the SNP nor the WGS F-values correlate with pedigree-based inbreeding coefficients , is the number of individuals in a population who contribute to offspring in the next generation, or the number of breeding individuals that would be required to explain the diversity apparent in a given generation. We hypothesized that this would vary strongly between breeds, because many breeds have undergone unique bottlenecks. In this case, Ne is measured as the change in the inbreeding value of a reference population with that of their parents' generation, and ranged from 6.5 (Golden Retriever) to 182.3 (Papillon) when measured from pedigree data. Using SNP data, the Ne was calculated for each breed over a time span of 13 to 995 generations prior to the acquisition date of the samples. The most recent Ne values, dated 13 generations ago, ranged from 53 (Bull Terrier) to 230 (Chihuahua). That is, at a reference point of 13 generations ago, the Bull Terrier had a reference population size of 53 dogs and the Chihuahua had an effective population size of 230 dogs.Effective population size  to 430 (Chihuahua). The difference between the slopes in Ne pre-AKC recognition and post-AKC recognition range from −1.77 (Basset Hound) to 5.16 (Chihuahua). The Basset Hound had a pre-AKC recognition slope indicating a loss of 4.21 breeding dogs per generation, whereas the post-AKC recognition slope showed a loss of 2.44 breeding dogs per generation. The Chihuahua had a pre-AKC recognition slope indicating a loss of 6.44 breeding dogs per generation, and a post-AKC recognition slope indicating a loss of 11.60 breeding dogs per generation. This can further be interpreted as the Basset Hound experiencing greater reduction in effective population size prior to breed recognition, and a lesser rate of reduction of breeding individuals after breed recognition. Conversely, the Chihuahua demonstrates the opposite scenario, with a larger generational decrease in effective population size after breed recognition, compared to before breed recognition. There is no significant correlation between the reference population pedigree Ne and the SNP-based generation-13 Ne (P=0.166), with the pedigree Ne values calculated as consistently lower than is revealed by SNP analysis.For each breed,  present A. Althou76 years   was used as a means to estimate the original diversity of the breed at the earliest recorded point in breed history. Calculated from the most recent generation, EDRe ranged from 5.2 (Nova Scotia Duck Tolling Retriever) to 113.1 (Papillon) (a) was shown to range from 4.9 (Nova Scotia Duck Tolling Retriever) to 51.4 (Papillon). According to the metrics of EDRe and EDRa, and the number of effective genomes (EDRg) ranging from 2.2 (Norwich Terrier and Nova Scotia Duck Tolling Retriever) to 16.1 (Papillon), the Nova Scotia Duck Tolling Retriever displays the lowest amount of genetic diversity of all the pedigree breeds, whereas the Papillon shows the highest. The ranked order of the least to most diverse breeds remains nearly consistent whether considering using either the EDRe or EDRa metric, except with regard to the Australian Cattle Dog and Borzoi, which switch order in the rankings when considering non-founder ancestor contribution (EDRa). This suggests that, although the Australian Cattle Dog is less genetically diverse than the Borzoi when considering EDRe, there is notable influence of non-founder ancestors in the Borzoi breed that result in their EDRa value dropping below that of the Australian Cattle Dog. A ratio of EDRe/EDRa of greater than one is indicative of a bottleneck event in the history of the breed. Although minimal in the Nova Scotia Duck Tolling Retriever (1.06), all breeds analyzed showed some indication of a bottleneck event, with the strongest event occurring in the Labrador Retriever (3.67).The earliest documented relatives that contributed genetically to the reference population for each breed (EDRapillon) . When exFig. S2). In 23 of the 80 SNP-genotyped breeds, shared RoH temporarily increased with the addition of the second dog but shared LnH decreased, indicating that large private runs of homozygosity, present in the initial dog, were broken into smaller pieces by the addition of a second dog. At three through ten dogs, both the RoH and the LnH values decreased by exponentially lesser extents with each new additional dog, such that the tenth dog reduced the first dog's private LnH by between 0.28% (Miniature Poodle) and 7.18% (Shetland Sheepdog)  and length of homozygosity (LnH) are therefore common across all representatives of a breed. These were calculated incrementally for each SNP-genotyped breed by randomly adding individuals and recalculating shared homozygosity until all members of the breed, to a maximum of ten, were included ; Fig. S2heepdog) .Fig. 3.Although the same general pattern was observed in each breed, the rate at which each breed decreased in terms of shared LnH varies. The rate of decay for shared LnH, i.e. the proportion by which shared LnH decreased from the first-dog private LnH with each additional dog, ranged from 0.1996 (English Springer Spaniel) to 0.6065 (Miniature Poodle), with a mean of 0.4098 and s.d. of 0.085 .Table 4P=0.899).Because WGS is often available for only a single individual of a given dog breed due to cost considerations, we compared the relative value and utility of SNP chip genotyping on multiple dogs versus WGS analysis of a single dog. The WGS data was first pruned to remove the SNPs in LD with one another. Because the average spacing of SNPs on the Illumina Canine HD SNP chip is approximately 14 kb and the WGS variants are, on average, only 306 bp apart, homozygosity in the WGS was calculated based on length of region rather than number of SNPs. Additionally, SNP chip analysis might call a region as homozygous despite the potential for heterozygosity between genotyped SNPs, whereas, in WGS, essentially every SNP is genotyped, leaving no missed heterozygosity. In order to compare these two disparate datasets, multiple parameters  were used to calculate homozygosity from the WGS data of single-dog breeds varying both the window size and the allowed heterozygosity within the window. Using the metrics of a 70 kb window and zero heterozygotes, approximately equivalent to a five SNP window from the chip data calculations, the single-dog WGS predicted greater LnH than the shared SNP chip LnH values across all breeds. The shared values of LnH from the SNP chip analysis most closely resemble the single-dog WGS LnH values when calculated with parameters of 1000 kb minimal length and zero allowed heterozygotes, although the breed pattern is not correlated , SNP chip genotypes  and WGS  were compared using Pearson's correlation , versus SNP LnH and WGS LnH for long-range, moderate-heterozygote parameters .To determine whether pedigree analysis can predict genomic homozygosity measures of population diversity, calculated from family pedigree history (relation . To obtaP=1.24×10−7) for the 51 breeds common to both data sets; however, none of the pedigree-based inbreeding coefficients correlated with the equivalent values for SNP chip or WGS, for which there were ten and nine common breeds, respectively. Both shared SNP-based measures of homozygosity were positively correlated with whole-pedigree inbreeding coefficients  and WGS homozygosity values when parameters dictated small minimal lengths (70 kb) of homozygosity, and allowed for zero to five heterozygotes. The SNP-based calculation of Ne showed significant negative correlation with SNP RoH (P=3.41×10−11), LnH (P=9.22×10−10) and F (P=4.51×10−8). However, no significant correlation was observed between the SNP-based Ne and pedigree-based Ne values (P=0.166). The pedigree analyses did not correlate with any of the WGS RoH or LnH calculations. Shared LnH calculated from SNP chips correlates most closely with the LnH from WGS analyses using a 70 kb window, allowing for a heterozygote at only one locus. Shared RoH calculated from SNP chips correlates most closely with WGS using a 70 kb window and no heterozygotes .We found that each dog breed has a unique profile of genome diversity, varying by amount of total homozygosity as well as number and size of homozygous regions. Likewise, although we observe variation between members of the same breed, multiple individuals from a single breed can be combined to obtain an accurate reflection of breed-specific homozygosity and knowledge regarding fluidity of variation within breed confines. This allows us to define metrics that inform the design of canine genetic studies while also allowing us to develop an understanding of the intricate complexity of the diversity of dog breeds. Individual diversity metrics are provided for over 100 breeds as a resource for investigators in the field . This trend is likewise reflected in pedigree-calculated Ne values, where the Golden Retriever, despite being ranked among the top five most popular dog breeds by the AKC from 1993 to 2015 (www.akc.org), has an Ne of 6.5, and the Papillion, with popularity ranking of 48th for 2015, records a substantially higher Ne of 182.3. The large range of Ne values does not necessarily coincide with the total number of breed individuals registered per year or the breed's relative popularity. Rather, it speaks to the general within-breed diversity of the breeds and the contribution of popular dams and sires to the subsequent generation.As expected, pedigree records for all breeds were erratic and often incomplete prior to breed establishment in their country of origin. In spite of these inconsistencies, considerable across-breed patterns, as well as breed- or situation-specific fluctuations, were identified through pedigree analysis . Breed rF-values and whole-genome homozygosity measures , concurrent with a lack of correlation with shorter-generation F-values , all analyzed pedigrees showed a peak in inbreeding post-AKC recognition, although the time required to reach that peak ranges from 9 (Labrador Retriever) to 69 (Papillon) years.In some cases, we observed that formation of the original breed club and creation of an official standard seemed to briefly increase the breed pool, thus transiently decreasing inbreeding values, perhaps by legitimizing and unifying previously distinct lines. This diversity is misleading, however, because dogs that seem unrelated at the five- to ten-generation level ultimately trace back to the same small number of founders. This is supported by the correlation between full-pedigree F-values . The bree, EDRa, EDRg), whereas the Papillon demonstrates the highest level of diversity, as calculated from the same metrics, plus whole-pedigree inbreeding measures. These values reflect the historical account of breed formation for these breeds. Whereas the Papillon has a diffuse record of origin, spanning much of Western Europe and staking claim to the small spaniel-like dogs represented in artistic renderings from the 16th century (https://www.papillonclub.org/History/Welcome.html), the Nova Scotia Duck Tolling Retriever is the result of a concerted breeding effort to produce dogs that display a very specific game-luring behavior to aid hunters, centered in the Maritimes of Canada during the 19th century (http://nsdtrc-usa.org/breed/history/).When ranking breeds by level of inbreeding and ancestor contributions, the Nova Scotia Duck Tolling Retriever shows the lowest diversity in a majority of categories  in Borzoi, Golden Retriever, Labrador Retriever and Norwich Terrier , EDRa  and EDRg . Therefore, a decreased number of effective earliest documented relatives, ancestors and genomes correlated with an increase in shared RoH as measured by SNP chip.The databases used for this study were largely US-centric, hence bottleneck events at breed formation or coincident with importation of breeds to the US would be expected, but were not necessarily observed for all breeds. This likely represents events that predate the earliest available records. For example, the first Basenjis were imported to the US around 1941, and our data show that a single male, born in 1939, accounts for 30.3% of the genetic diversity observed in the current reference population. The importation of dogs from central Africa to the US would almost certainly have resulted in a bottleneck event, but this cannot be confirmed without accurate pedigree data for the African Basenji. We can, however, recognize a distinctive drop in inbreeding values in the Basenji during the late 1980s, corresponding with the time at which new African imports of Basenjis were allowed for registration with the AKC. The intensity of the bottleneck does not correlate with any of the molecular measures of population structure. Independently, however, the number of RoH measured by SNP chip showed significant negative correlation with all measures of earliest documented relatives: EDRWhen shared homozygosity measures are calculated within a breed by sequentially increasing the number of dogs in the dataset from one to ten individuals, the LnH that is lost with each additional dog is assumed to be private to the individual or not fixed within that breed. Conversely, there is a point at which the homozygosity identified as shared across a pool of individuals is likely shared within the entire breed . By utilWith a normal distribution across 80 breeds, and a s.d. of 0.085, 54 breeds have a rate of decay within 1 s.d. of the all-breed mean. The breeds located at the extremes of 3 s.d. from the mean include the Miniature Poodle (0.6056) at the high end and the English Springer Spaniel (0.1996), Shetland Sheepdog (0.2070), Scottish Terrier (0.2150) and Briard (0.2169) at the low end . When deCaveats to the above, however, include the fact that decay rate does not speak to the overall amount of homozygosity contained within each breed, only the amount of variation between individuals within that breed. For example, the breed with the largest shared LnH is the Bull Terrier (769.78 Mb), whereas the breed with the smallest shared LnH is the Chihuahua (48.09 Mb) . ComparaRSPO2 gene has previously been associated with the wire or furnished coat type, a phenotype that is fixed and easily recognizable in many dog breeds  and low (0.2150) homozygosity decay rates, respectively. Likewise, the Papillon (high decay rate=0.5226) and Shetland Sheepdog (low decay rate=0.2070) are wild-type at the furnishings locus. The high decay rates suggest that between seven and eight dogs would be necessary to reduce the shared LnH to 1% of the initial, whereas the low decay rates indicate 17 to 19 dogs would be required to produce the same results. Using the ten dogs of each breed genotyped on the Illumina HD SNP array, a standard non-adjusted association analysis was conducted with PLINK software  and LnH  calculated using SNP genotypes shared across ten dogs of each breed, but did not correlate at all with homozygosity measures of F, LnH or RoH derived from individual WGS. This would suggest that deep reference pedigree structure can be captured by SNP analysis of multiple breed individuals, but is not apparent in WGS analysis of only one individual. Likewise, five- or ten-generation pedigree analysis is not sufficient to elucidate the larger breed-specific population structure apparent in the entire pedigree reference populations.Population traits calculated through pedigree analysis did not correlate with genomic measures unless the entire reference pedigree was used. Pedigree-based inbreeding coefficients calculated over the entire reference pedigrees correlated significantly with the RoH  and shared RoH  (F in breeds with similar shared LnH (<1000 kb difference) increased RoH in 53.8% of breed pairs. However, increasing shared LnH in breeds with similar F-values (<0.1% difference) resulted in an increased RoH in 84% of the breed pairs. This suggests that increased inbreeding produces a greater number of homozygous regions, rather than increased length of pre-existing homozygous regions. This finding corroborates the previously discussed negative correlation between lower pedigree-based values of EDRe, EDRa and EDRg and increased SNP-based RoH.When comparing breeds in which shared homozygosity was calculated from SNP data, a significant positive correlation was observed between 0×10−16) , supportt=4.579, P=2.53×10−5, whereas the correlation value for SNP LnH with WGS LnH of the same minimum length but with five allowed heterozygotes was t=2.106, P=0.040 . If multiple dogs have undergone WGS, it often reflects different geographic origins of the lineage and the utility of that data for designing a genomic study in one geographic region might be limited , calculated as described in the Pedigree analysis section, and reflect the modern breeding population of the breed by including at least 10% of the AKC-registered dogs for that breed, determined by registration data for 2014. Exceptions were made for the Labrador Retriever and Golden Retriever breeds, which, due to their immense popularity, reflected only 0.47% and 6.55% of AKC registrations for those breeds, respectively. Despite this, the database reference population sizes for Golden Retriever and Labrador Retriever ranked first and third highest of included pedigree breeds.Data used for pedigree analysis in this study were provided by private breed databases for the following 11 breeds: Australian Cattle Dog, Belgian Sheepdog, Bernese Mountain Dog, Borzoi, Basenji, Golden Retriever, Labrador Retriever, Norwich Terrier, Nova Scotia Duck Tolling Retriever, Papillon and Portuguese Water Dog. Due to breed history, the Belgian Sheepdog database also includes several Belgian Tervurens and Belgian Malinois, and the Golden Retriever database includes early contributing breeds including several Flat-coated Retrievers, Irish Setters and Labrador Retrievers. The abbreviations used for each breed throughout this study can be found in Breed databases were predominantly compiled by volunteer enthusiasts using registries, studbooks, historical records, dog-show entries and personal breeder records. Initial pedigree analysis required an internal error check whereby improbable relationships are flagged for manual correction. Breeds were removed from study inclusion when the pedigree database contained insurmountable inconsistencies. When data regarding country or year of birth was missing from the raw database, estimated values were extrapolated based on equivalent data from siblings, offspring, dam and sire, and assuming a standard generation interval of 2 years. Demographics from the datasets are provided in http://www.akc.org/press-center/facts-stats/page-3/). The databases used in these analyses, however, record parentage as far back as the 1830s (Labrador Retriever), 1840s (Golden Retriever) and 1860s (Borzoi). Of the breeds included in the study, the Nova Scotia Duck Tolling Retriever was the most recent to gain recognition by the AKC, obtaining breed status in 2003. Pedigree data for this breed, however, dates back to 1930. North America is listed as the predominant region of birth or initial registration for all 11 breeds, representing between 37.04% (Norwich Terrier) and 76.29% (Portuguese Water Dog) of dogs within the pedigrees of the modern dogs. The dogs not listed as being born in North America derive primarily from Europe, Asia and Oceania.The AKC began accepting breeds for registration in the 1880s and the earliest recognized pedigree breed in this study is the Borzoi from 1891  to 204,893 (Golden Retriever) and covered between 11.5  and 24.8 (Golden Retriever and Borzoi) effective generations. All subsequent calculations were based on the reference pedigree.ge).Pedigree completeness, inbreeding coefficients, and effective numbers of founders, ancestors and founder genomes were calculated using PEDIG software . On the F) were calculated for each dog in the reference pedigree by computing relationship matrices for the individual and their ancestors  was calculated as the difference in inbreeding (ΔF) between the reference population and the parents of those individuals:Inbreeding coefficients , defined as the number of equally contributing EDRs expected to produce the amount of genetic diversity observed in the reference population, was calculated as:Because the EDR include founder animals as well as recent genetic contributors with missing parentage data, the effective EDR  was calculated aswhere pedigree . To accopk is the marginal contribution of each ancestor in the relevant reference pedigree , which measures the probability that an EDR haplotype is still present at a given locus in the reference population and which accounts for all random loss of alleles during segregation and due to genetic drift, was calculated with the ‘segreg’ function of PEDIG (where pedigree . EDRa isof PEDIG  was utilof PEDIG  as:(4)ri is the fraction of an EDR's alleles presumed to have been retained in the population  was calculated as:The LnH of the first randomly selected dog of each breed was decreased with each additional same-breed dog added to the sequential shared LnH calculations, such that the difference between one-dog private LnH and two-dog shared LnH is exponentially greater than the difference between nine-dog and ten-dog shared LnH. For each breed with ten representatives, exponential rate of decay , yt is the difference in shared LnH between t−1 and t, and a is the amount of LnH lost by the addition of the second dog. Therefore, the number of dogs required to reduce the shared LnH by 1% of the first dog's LnH was calculated with the equation:where yt is 1% of the first-dog LnH. Likewise, yt=1 was used to determine the number of dogs required to reduce the shared LnH by only one nucleotide, estimating the point at which the first-dog private LnH will not be decreased further by the addition of more dogs.where Ne) with the SNP genotypes from each breed. Predicted Ne values for 13 to 995 generations prior to sample age were calculated and values were interpolated using a generation interval of 3.76 years  from previously published studies, or sequenced for this study by the National Institutes of Health (NIH) Intramural Sequencing Center (NISC) using the Illumina TruSeq DNA PCR-Free Protocol (Cat.# FC-121-3001) from DNA samples provided by the Ostrander laboratory (Table S2). Previously unpublished data from 27 sequenced dogs are deposited in the Sequence Read Archive (http://www.ncbi.nlm.nih.gov/sra). Libraries were sequenced on the Illumina HiSeq 2000 platform with 100 bp paired-end fragments of 300-500 bp. Paired data was aligned to the CanFam3.1 reference genome (http://genome.ucsc.edu/cgi-bin/hgGateway?db=canFam3) with the BWA 0.7.10 MEM algorithm (https://github.com/broadinstitute/picard).WGSs were compiled using data from 90 purebred dogs representing 80 distinct breeds. Seventy-two breeds were represented by one sequenced dog each, two dogs were sequenced for each of six breeds , and three dogs were sequenced for each of two breeds . Data were obtained via the Short Read Archive . The resulting set of SNVs was used in subsequent analyses.Sequences were locally realigned based on documented and novel insertions-deletions  using GAThe list of 7,095,427 SNVs from the 90 WGS dogs was pruned for excessive linkage using the ‘indep’ function of PLINK v1.07 ., 2007, Inbreeding coefficients were calculated for each of the dogs across 154,230 SNPs from the chip genotyping dataset and 1,510,327 SNPs from the pruned WGS data using the ‘heterozygosity’ function of PLINK v1.07 ., 2007. F-values were calculated per individual within the WGS and SNP chip analyses, breed values were determined by averaging all contributing dogs of the same breed for each genotyping method. As such, a total of 11 breeds were represented in the pedigree data, 80 breeds in the SNP chip data, and 80 breeds in the WGS data. Fifty breeds were common to the WGS and SNP data, nine breeds to the WGS and pedigree data, and 11 breeds between SNP and pedigree data.The cor.test function of the Hmisc R package was used to calculate Pearson correlation statistics and significance values between SNP-based inbreeding coefficients, RoH and LnH, WGS-based inbreeding coefficients, RoH and LnH, and pedigree-based inbreeding coefficients. Correlation analyses utilized all breeds shared between each pair of data acquisition methods. Because