Seasonal migration is a taxonomically widespread behaviour that integrates across many traits. The European blackcap exhibits enormous variation in migration and is renowned for research on its evolution and genetic basis. We assembled a reference genome for blackcaps and obtained whole genome resequencing data from individuals across its breeding range. Analyses of population structure and demography suggested divergence began ~30,000 ya, with evidence for one admixture event between migrant and resident continent birds ~5000 ya. The propensity to migrate, orientation and distance of migration all map to a small number of genomic regions that do not overlap with results from other species, suggesting that there are multiple ways to generate variation in migration. Strongly associated single nucleotide polymorphisms (SNPs) were located in regulatory regions of candidate genes that may serve as major regulators of the migratory syndrome. Evidence for selection on shared variation was documented, providing a mechanism by which rapid changes may evolve. Every year as the seasons change, thousands of animals migrate huge distances in search of food or better climates. As far as migrations go, there might be none so impressive as the trans-oceanic flights made by small migrating songbirds. These birds can weigh as little as three grams and travel up to 15,000 kilometres. Most migrate alone and at night and yet still manage to return to the same location each year. Several strands of research suggest there could be a genetic basis to their migratory behaviour, but exactly which genes control this phenomenon remains poorly understood.One small songbird that has been studied for decades is the European blackcap. This species exhibits a real variety of migration patterns. Some blackcaps travel rather short distances, others much further, and some populations do not migrate at all. Populations that share the same breeding grounds in the summer may migrate in different directions in the autumn. These features make it a good species to study the genetic variation between populations that migrate in different directions and over different distances. However, only in recent years has advancing technology made it possible to comprehensively study an animal’s entire genome, leaving no gene unturned.Now, Delmore et al. have used high-throughput sequencing technologies to trace the evolutionary history of migration in European blackcap and started by assembling a reference genome for the species. Then, the genomes of 110 blackcaps from several populations that take different annual migrations were compared to the reference. This revealed that the populations began to diverge some 30,000 years ago and that there was some apparent gene mixing between groups of migrating and resident blackcaps around 5,000 years ago. The analysis showed only a small set of genes code for their differences in migration. Additionally, while the candidate genes were shown to be common among blackcaps, the genes identified did not match those reported from studies of other migrating songbirds. Finally, Delmore et al. also noted that the differences between the populations tend to be in the parts of the genome that control whether a given gene is switched on or off, which could explain how new migratory behaviours can rapidly evolve.This study is one of the most comprehensive genomic analysis of migration to date. It is important work as songbirds, like other animals, are responding to increasing pressures of environmental and climate change. In time, the findings could be used to support conservation efforts whereby genetic analyses could determine if certain populations possess enough variation to respond to coming changes in their habitats. Sylvia atricapilla is an iconic migratory species that is well suited to work on the genetics of migration. Blackcaps exhibit dramatic differences in migratory behaviour , suggesting that these traits are additively inherited  data and an optical map . Genomic differentiation was low between migratory populations of different distances and orientations, but unlike earlier work using mitochondrial data . At a cluster value of three, populations on the continent were further divided into resident and migratory groups (similar to PC2), and resident island and continent birds showed some admixture with the migratory group  to this reference . We excluded resident island birds from these analyses  and focused on a single resident continent population  within populations that is unrelated to positive selection (in our case selection related to migration). We removed these confounding effects by scaling PBS and subtracting the maximum value of PBS in orthologous windows from that in the non-focal population   and the As noted already, population structure and linked selection can elevate differentiation between populations. We controlled for these effects using hapFLK and ΔPBS, respectively, and emphasise that genomic differentiation between populations of blackcaps is low to begin with . In addiNote that it is possible that the signatures of positive selection that we document here reflect selection based on different ecological variables involved with the colonization of areas further south on the continent, but at least in the case of Super-Scaffold 99, we believe that this is rather unlikely as most ecological variables (biotic and abiotic) are quite distinct between islands and the continent (and between the islands themselves) . The traOur finding that only a few genomic regions under selection contain genes and that the strongly associated SNPs identified by CAVIAR are in non-coding regions could suggest that cis-regulatory changes are important for the transition from migration to residency. In support of this suggestion, an alignment of predicted mRNAs from several bird species and transcripts from a testis transcriptome of the blackcap placed two of the SNPs from CAVIAR in the 3′ untranslated region (3′ UTRs) of two genes . Three prime3′ UTRs can act as posttranscriptional regulators; they contain binding sides for microRNAs, which can inhibit translation or target mRNA for degradation . In factClock, Npas2, and Bmal1) and one basic leucine zipper domain (Nfil3). We found a bHLH motif (GHCACGTG) on Super-Scaffolds 12 and 99 . This motif could disrupt or weaken transcription factor binding  could also be useful. We conducted a preliminary analysis here, using HOMER  to detec2 and 99  and 5. T binding . This is binding . Clock, ehaviour .Concerning the actual identity of genes within regions that are under selection, several have functions that could be related to the transition from migration to residency. For example, LOC100859173  and our results relate mostly to residents. The elevated population differentiation that we noted between resident and migratory birds could reduce our power to identify selection that is specific to migrants . AccordiThe list of genes in genomic regions that are under selection in this analysis focusing on orientation is small, but it also includes genes with functions that are strongly related to the phenotype they are associated with. For example, SDC1 is a region on Super-Scaffold_17 that is under selection in NW migrants. This gene codes for a transmembrane protein that helps to regulate the Wnt signalling pathway. This pathway plays a role in embryonic development and has been shown to influence feather and beak morphogenesis, along with feather molt . NW migrCatharus ustulatus) and Phylloscopus trochilus). Clock) showing consistent results across groups as divergent as insects, fishes and birds  and garden warbler   . Using tmigrant) , we predTo follow up on the former analysis, we constructed a maximum likelihood (ML) tree using sequence data from the region under selection on Super-Scaffold 73. We built this tree using data from all continental blackcaps, garden warblers, and hill babblers, using the willow warbler as an outgroup, and compared this tree to a consensus tree summarizing ML trees constructed for each scaffold in the blackcap reference genome  for the region on Super-Scaffold 73 to SFSs estimated for 1000 random sequences of the same length from throughout the genome. SFSs for the random sequences are similar to expectations under neutrality, with a preponderance of alleles at low frequencies. By contrast, the SFS of Super-Scaffold 73 shows an excess of mid-frequency alleles . GreaterWe conclude our study by examining the genetic architecture of migratory distance. We included all migrants in this analysis, quantified migratory distance as an ordinal variable from short- (1), to medium- (2), to long-distance (3) migrants, and used a Bayesian Sparse Linear Mixed Model  to identify SNPs that are associated with migratory distance  and is 627-bp downstream from the gene KCNIP1, which encodes a potassium channel interacting protein . Combined with the haplotype identified in the hapFLK analysis, which provides a signature of positive selection in short-distance migrants on Super-Scaffold 17 (Our results suggest that a large percentage of variance in migratory distance can be explained by our SNP set (PVE = 0.90 ± 0.28), but only one SNP showed a strong association with this focal trait (posterior inclusion probability >0.01). This SNP is located on Super-Scaffold 79, occurs in an area of elevated ffold 17 , these lEarly research on blackcaps was pivotal for demonstrating the existence of a genetic basis of migration and studying its evolution. This is due in large part to the tractability of this species and its variability in migratory behaviour. Here, we have expanded this study system beyond phenotypic and marker-based approaches, launching it into the genomic era and conducting one of the most comprehensive genome-wide analyses of migration to date. Populations of blackcaps began to diverge ~30,000 years ago, but differentiation remains low between migratory populations. There is evidence for past gene flow between migratory and resident populations on the European continent but comparison of the contemporary structure of these populations suggests that gene flow may be limited. This is certainly the case for resident island birds. It has been suggested that one single genetic mechanism controls migratory traits and may be shared across broad taxonomic groups. We do not find evidence for one common genetic mechanism across species here, and no protein-coding change is shared across the three focal traits  that we examined in unison. Future work on gene expression may identify major regulators that control multiple migratory traits, and both NPY and bHLH transcription factors are good candidates. Combined with the additional results that we presented here (such as the importance of standing genetic variation), this information is vital for understanding how predictable the evolution of migration and other complex behavioural traits may be.Blackcaps have not only been relevant to work on the evolution and genetics of migration. Early work in this system suggested that differences in migration might serve as reproductive isolating barriers early in speciation. For example, hybrids were shown to exhibit intermediate orientation behaviour that was predicted to be inferior because it would bring hybrids over large ecological barriers that pure forms avoid . More reBlood samples from two male blackcaps from the Mooswald breeding population at Freiburg im Breisgau, Germany, classified as medium-distance SW migrants (on the basis of morphometrics and isotope signatures) were used to assemble the reference genome. Full details on all steps in our genome assembly can be found in We used SatsumaSynteny  to deterWe annotated genes with putative functions and protein domains using MAKER. Gene prediction was performed using a de novo testis transcriptome of blackcaps and cDNAs from three avian species  from the ensembl database. Following MAKER, we obtained the predicted protein sequences to annotate genes functionally using blastp and Interproscan. For the final annotation, we only included gene predictions that either had an Annotation edit Distance (AED) <0.5 and/or a blastp hit (with the thresholds described above) and/or a predicted protein domain.We obtained whole genome resequencing (WGS) data from 110 male blackcaps . High molecular weight DNA was extracted from blood withdrawn from the brachial vein, following a standard salt extraction protocol. Individual samples were collected across the European breeding range including three island populations  and covering the entire range of migratory phenotypes. Population phenotype was scored on the basis of morphometry, stable isotope signature and/or ringing-recovery data from selected individuals see . We prepmem (https://github.com/faircloth-lab/phyluce/). GATK (http://broadinstitute.github.io/picard) were used to identify and realign reads around indels  as well as remove duplicates .All analyses made use of data from resequencing reads that were aligned to the reference genome using bwa mem  or stamp/). GATK  and picaWe recalibrated the resulting bam files using GATK’s base quality score recalibration (BQSR). Specifically, we called SNPs for each population separately using three different programs and default settings: UnifiedGenotyper from GATK, samtools  and FreeMost of our analyses made use of the BQSR recalibrated bams, calling genotype likelihoods (GL) with ANGSD  and the vcf produced from VQSR. Default parameters were used in smartpca except for the addition of a correction for LD across SNPs (nsnpldregress = 2). We conducted an admixture analysis using GLs from ANGSD and running them through ngsADMIX  with 8 vSTF between all populations using GLs from ANGSD, starting by estimating unfolded site frequency spectrums (SFS) for each population  and using them to obtain joint frequency spectrums  for each pair of populations. These 2DSFSs were used as priors for allele frequencies at each site to estimate STF . In order to estimate unfolded SFS, we needed an ancestral sequence, or the ancestral state of variants segregating in blackcaps. This sequence was generated using WGS from garden warblers and hill babblers. Specifically, we used samtools to generate fasta files for each garden warbler and hill babbler  and used rules outlined in We estimated We obtained consensus fasta sequences for each population using ANGSD (-doFasta 2 –doCounts 1 –minQ 20 –setMinDepth 5) and used IQTREE  to constWe used MSMC2 to infer the demographic history of blackcaps in our dataset. MSMC2 implements the multiple sequentially Markovian coalescent (MSMC) model, estimating effective population size by time and relative cross-coalescence rates between any two populations. It allows inference of the expansions and contractions of a population and of the extent and timing of population divergence . Specifihttps://github.com/stschiff/msmc-tools; https://github.com/inzilico/kselection/ After phasing our data using fastphase , we combhttps://github.com/stschiff/msmc-tools) and computed the relative cross-coalescence rate by dividing the between-populations coalescence rate by the average within-population coalescence rate. We scaled results using a mutation rate of 3 × 10−9/gen/site and a generation time of 2 years  and covariance across them . We used the vcf from VQSR as input for this analysis, applying two additional filters for the inclusion of variants: minimum number of individuals/phenotype = 5 and minor allele frequency of 0.05. hapFLK also requires an estimate of the number of clusters into which haplotypes can be grouped. We ran this analysis for the complete dataset including all populations, and for a restricted dataset including only medium-distance migrants. We determined the number of clusters for each dataset separately using fastPHASE . We used results from an analysis with FLK and limited to genomic regions, which showed evidence of positive selection from hapFLK, to identify independent strongly associated SNPs with CAVIAR . CAVIARSTF, but can include more than two populations and identifies regions within each population that exhibit differences in allele frequencies. This statistic was originally designed for three populations, but can be expanded to include more populations (STF following the procedure described above (summarized into windows of 2500 kb) and used the equation below to estimate PBS from these values. This equation is an example that was applied to resident populations (R), where T is log transformed STF between the populations indicated in exponents:We used a modified version of PBS (Population Branch Statistic) to complement results from hapFLK. PBS is similar to ulations . We usedSTF can be elevated by reductions in within-population variation alone and that there are many factors that can reduce variation within populations, including linked selection in areas of reduced recombination that may result from purifying selection . STF in focal populations would have to extend beyond that in non-focal populations to be considered important in generating the trait of interest. We used the same approach for PBS. For example, ΔPBS for resident continent populations was estimated by finding the difference between PBS in residents and maximum PBS in medium-, short- and long-distance migrants.Recent papers have noted that lection, ). It is The former analyses (hapFLK and PBS) rely on comparisons between phenotypes. In this last analysis, we focus on the affects that selection can have within a population instead. Specifically, selective sweeps can reduce variation at both the locus under selection and its neighbours . Local rhttps://github.com/szpiech/selscan) and the same vcf used in hapFLK, but split by phenotype (and scaffold). We ran the data through fastPHASE first to phase haplotypes . We normalized estimates of nSL into the same 2500-kb windows used for PBS.For this analysis, we used selscan  . We chos In the interests of transparency, eLife publishes the most substantive revision requests and the accompanying author responses.[Editors’ note: the authors submitted for reconsideration following the decision after peer review. What follows is the decision letter after the first round of review.]eLife. Your article has been reviewed by three peer reviewers, one of whom is a member of our Board of Reviewing Editors, and the evaluation has been overseen by a Senior Editor. The reviewers have opted to remain anonymous.Thank you for submitting your work entitled "The evolutionary history and genomics of European blackcap migration" for consideration by This manuscript compiles an enormous dataset to address questions about the genetic basis of migratory behavior in a classic model system in the field. The reviewers and reviewing editor were enthusiastic about the topic and united in finding the dataset extremely impressive. They also thought several key results of the paper were important. In particular, the data add to growing evidence that there is not a common genetic mechanism underlying migratory behavior. Furthermore, the attempt to decompose a complex behavior into component parts  was novel and interesting.eLife. We have therefore recommended rejection of this manuscript in its current state. Given the great promise of the dataset, however, the reviewers encourage submission of a significantly revised manuscript as a new submission in the future.Despite this enthusiasm for the work, a number of significant issues were raised about the current presentation of the data and some of the analyses. These major concerns are synthesized below. After extensive discussion, the revisions required for the paper to be acceptable were deemed to be too substantial to be completed in the two month period allowed for revisions at 1) A primary issue identified by all reviewers is that the paper was generally hard to follow and contained many unrelated analyses. The Introduction does not set up clear questions and gives little background information on why the blackcap system is uniquely well-suited for addressing questions about the genetic basis of migratory behavior. The Introduction also does not set up the key findings of the paper. It is recommended that the authors re-focus the overall framing of the paper to highlight their key results, remove tangential analyses (see below for specifics), and generally streamline and contextualize results within the existing literature throughout the entire paper.2) There was concern from all reviewers about the phylogeography section. These analyses were not clearly integrated with the rest the paper. Furthermore, the way the PCA and ADMIXTURE plots were used to interpret ancestral state seemed very ad-hoc, and the maximum likelihood tree was not well supported. The inference that migration is the ancestral state and was lost on islands is generally reasonable, as that is a pattern found in other taxa. However, if the authors choose to include the phylogeography section moving forward, removal of the PCA and ADMIXTURE interpretations is recommended. The authors should also acknowledge the limitations of their inference more openly, given the weak support in their data. Further, the overall contribution of the phylogeographic analysis to the main conclusions of the paper should be clarified throughout the text.3) The use of SMC++ to infer divergence times was considered problematic, as this method assumes populations do not exchange genes after divergence. To more accurately date divergence times, the authors should use a demographic modeling approach based on the joint site frequency spectrum (e.g. dadi or moments) or evaluate alternative models with and without migration in an ABC framework. Alternatively, the authors could refocus that section on variable demography rather than the timing of splits. Demographic trajectories diverging earlier than previously estimated split times could then be a "suggestive" point, but shouldn't be the primary finding of that analysis. It might be useful to refer to Mazet et al., 2016 (https://www.ncbi.nlm.nih.gov/pmc/articles/PMC4806692/) for guidance with these interpretations.4) There were concerns about the authors overinterpreting causal associations between migratory behavior and loci putatively under selection in both the orientation and residency sections. Particularly in the transition to residency section, outliers cannot be separated from population structure, and could therefore be due to a variety of factors unrelated to migration. The authors suggest that finding an elevated region on super scaffold 99 in both island and resident populations indicates this region may be associated with the transition to residency. This analysis is rather unconvincing, as these shared elevated regions could be due to shared ancestry. It is also not clear if the extensive subsequent discussion of candidate loci focuses only on this shared elevated region on scaffold 99, or looks at all outliers. The language in this section should tempered, alternative explanations discussed, and it should be made clear which populations are included when identifying candidate loci.5) Analyses of selection on standing genetic variation: as with the inferences about phylogeography, these sections read as somewhat ad-hoc and did not use previously validated methods. The first section about standing genetic variation  is weakly supported- removal this section is recommended. The second section, if retained, should use methods that have been previously shown through theory or simulation to distinguish selection on standing genetic variation. It is also recommended that the authors articulate clear predictions about expected results if migratory behavior arises from selection on novel vs. standing variation.6) More information needs to be given about sampling and phenotyping. This is particularly important for explaining how phenotypes were assigned to "short-distance SW migrants," which fall into two different clusters on PC2. This is a major gap in the paper.7) There were concerns about the analysis of migratory distance, both in classifying distance as a categorical trait and in why a different method for identifying outliers was used in this section. The analysis of distance, if retained, should either apply the same approaches for outlier detections as were used for the analyses of propensity and orientation, or clearly explain use of a different approach. There should also be further justification for classifying distance as a categorical variable.Reviewer #1:This paper uses the European blackcap, a classic model system in migration research, to reconstruct the evolution of migratory behavior and identify genomic regions associated with different components of migratory phenotype. To me, the most impactful results are that the authors do not find candidate loci associated with migratory behavior in other systems to be under selection in the blackcap, adding to growing evidence against a common underlying genetic architecture of migratory behavior. Also important is that the authors looked at multiple components of migratory behavior . However, while the dataset and analyses are very impressive, I think that the authors try to do too much at the expense of clarity and a focused message. Several sections of results are unclear, key information about sampling is missing, there are many tangential and speculative sections, and the paper as a whole does not have a strong unifying framework or question.1) While the dataset here is remarkable, the structure of the paper is quite challenging. The Introduction, in my opinion, does not articulate a clear overarching question, and the questions that are laid out in the Introduction are not linked well to the analyses presented in the paper. For example, the Introduction seems to set up a study focused on the genetic architecture of migration. However, the first part of the paper is a lengthy analysis of population structure and phylogeography that seems unrelated to any topics introduced in the Introduction and is not connected to the background provided on the system. When we get to the genetic architecture component of the paper, it is not contextualized well with previous knowledge of the system, and it is therefore hard to evaluate the significance of the results. It is also not clear how the earlier pop structure and phylogeography component is related to analyses of selection and genetic architecture.2) Very little information is given about the sampling or how phenotypes were identified. The only information provided is in the legend of Figure 1, which states that samples were collected on the breeding grounds with the exception of a few collected during the winter or during migration. This is problematic, given that the paper relies on individual-level phenotype assignments for these samples in all analyses. Explanations of how migratory distance, propensity, and orientation are determined for individual samples are needed.3) The section on inferring ancestral state reads as very ad-hoc and confusing. The way the PCA is interpreted is not convincing and is not supported by any citations. The results from TREEMIX and ADMIXTURE are conflicting, but no explanation for how to interpret this discordance is offered. The purpose of this section overall is also not entirely clear- how do these analyses link back to overall questions about genetic architecture of migration?4) The treatment of short-distance migrants is confusing. Based on the PCA, ADMIXTURE plot, and the map, it looks to me like these populations are admixed between residents and migrants . It is unclear to me how any of these data support variation in migratory behavior arising from standing genetic variation. Are the authors suggesting that individuals in the short-distance migrant population have different migratory strategies (e.g. some are residents and some are migrants) due to variation within the population? Later evidence for the role of standing genetic variation is more convincing. The purpose of this section needs to be made clearer.5) I was surprised, given low support for the maximum likelihood tree and the history of gene flow indicated by TREEMIX, that the authors didn't use a method of demographic reconstruction that allows migration and determination of the timing of admixture events.6) The way results on the propensity to migrate are presented strongly suggests that regions under selection in non-migratory populations are directly associated with loss of migratory behavior. However, these regions could just as reasonably be under other sources of divergent selection between these populations . Couldn't shared regions under selection in island and resident populations also be due to gene flow and shared ancestry in these populations, as indicated by TREEMIX? Overall, I don't find it very convincing that regions under selection in non-migratory populations are directly associated with migratory propensity. The authors should either temper this section and discuss alternative explanations, or make the support for their assertion clearer.7) In the first analyses of genomic regions under selection, the authors "consider all three traits together." What does this mean? What groups of samples were actually compared?8) I wondered why a different method was used for the analysis of migratory distance than was used for orientation and propensity. Why not make these analyses comparable? This last section in general felt somewhat tacked-on and not well integrated into the rest of the paper.9) Overall, I think the results could be more clearly contextualized within the broader literature throughout the paper. The authors have a very cool dataset, but the parts that are novel and exciting are not highlighted very well throughout. The amount of background information given seems to assume familiarity with the blackcap system, which limits the accessibility of the paper to a broad audience. I think more effort needs to be put towards explaining why this system is so well-suited for asking these questions, and what new things we learn about migratory behavior from these analyses.Reviewer #2:In this manuscript, the authors use whole-genome data to study the genetic basis of three migratory traits in European blackcaps: the propensity to migrate, distance, and orientation. Leveraging the diversity of migratory strategies in blackcaps, the authors document associations between migratory behavior and SNPs in regulatory regions – providing the first genome-wide characterization of migratory behavior in this species. Not only is this an interesting study system, but the sampling and experimental design also provide a robust foundation for investigating the genomic basis of migratory behavior. In addition, I found the methodological approach to be sound and thorough and was particularly impressed with the sample sizes/coverage for re-sequencing data as well as the quality of the reference genome. Overall, I thought it was an interesting data set and enjoyed reading the manuscript.I have a few comments/questions outlined below. It is my opinion that, if these concerns are addressed, this work would make a nice contribution to the existing literature.Subsection “Resident populations evolved from a migratory ancestor”: While I like this section, I think you can combine the TREEMIX and demographic analyses to cover most of this section in a more compelling way. While I don't entirely disagree, I find the use of the PCA and ADMIXTURE results to infer ancestral state a bit weak compared to the demographic data. I think you have enough analyses outside of the PCA and ADMIXTURE results to draw conclusions regarding ancestral state that are more appropriate for this type of question. I would recommend that you narrow this section down to focus on fewer, but more definitive, analyses, as it would strengthen the overall argument.Subsection “Evidence for standing genetic variation in short distance migrants”: Similar to my comment above, I found parts of this section distracting and less compelling compared to the rest of the manuscript. I think you could remove this section as I am not really sure it adds much to the paper. I feel similarly about subsection “Selection on shared genetic variation could facilitate rapid changes in migration”.Subsection “Resequencing analysis” paragraph three: This is more just curiosity: did you try using HaplotypeCaller from GATK? I think the fact that variant calling in GATK is combined with other programs makes this a robust approach but was wondering why you chose UnifiedGenotyper.Subsection “Linkage disequilibrium”: I don't believe that there is any mention of linkage disequilibrium in the main text of the manuscript. May be worth mentioning somewhere in the resultsFigure 4: Add a Y-axis label to panel cFigure 5: I think the figure is very aesthetically pleasing, but I am really struggling to understand what is going on in this figure. It may just be a matter of clarifying the legend, or perhaps it is just me. But I am not convinced this figure adds much. Also, I think you mean to say "panel f shows haplotype.…."Reviewer #3:In this study the authors analyze genetic variation in what has historically been the model species for songbird migration and present a set of results covering both phylogeographic history and selection on genes putatively associated with migratory behaviors. Helbig and Berthold's captive breeding studies in black-caps showing that migratory orientation is heritable are classics in ornithology, and an obvious followup question is "what genes are responsible for this behavior?", so I was excited to see a rigorous genome-wide analysis of the species. From that perspective I think one of the most interesting thing here is that this is now the third study  looking for associations of specific genomic regions with migratory behavior, and as far as I can tell there are zero overlapping outlier regions across these studies. The authors make this point but I think it could be emphasized, particularly given that much of the interest in migration as a tractable trait for genetic mapping is driven by the captive breeding studies conducted in this species.In general I thought the new data in this paper was very good, but the results presented cover so much territory that individual analyses sometimes feel rushed and the whole picture is hard to follow. I have a few methodological issues with the phylogeography, and for the selection/association analyses I think the more speculative post-hoc analyses of specific genes should be limited. One general issue that should be addressed more directly when describing results for regions putatively associated with migratory behaviors is that migration itself may be tangential to the actual selective force – climatic variation on either the breeding or wintering range, dietary differences across geographic regions, or any other environmental factor varying among populations could create the basis for selection that could be detected by approaches like PBS. Because migratory phenotypes covary with many of these other environmental factors, it is inevitably going to be difficult to identify genes that drive (rather than being driven by) aspects of migration like orientation, distance, or phenology.That being said I think this is an important paper in the area of migration genomics because it is in the only system with truly compelling captive-breeding results from crosses and because the dataset is excellent.Subsection “Differentiation between populations is low”: Are migrant populations differentiable on other PC's? What about if PCA is run on just continental, or just migrant populations alone? Because PCA will represent variance in the full dataset, running it with divergent island populations may mask differentiation among migrant populations. Probably same issues in the admixture analysis. I'd like to see a supplemental figure showing at least PC1-2 when the analysis is run on just continental birds.Subsection “Resident populations evolved from a migratory ancestor”: The methods for ancestral state reconstruction here were unfamiliar to me and seemed ad-hoc. Are there citations available for studies outlining the logic of using PCA and/or admixture results for this task? As it is the clearest evidence seemed to be from the phylogenetic analysis, which relies on poorly supported nodes in a topology constructed using a method that effectively assumes no gene flow.Subsection “Divergence began ~250,000 year ago”: SMC++ assumes populations are isolated, so it isn't an appropriate method for dating population splits in groups that continue to exchange genes after divergence. In addition, the mutation rate and generation times (though they look about right relative to other migratory birds) don't appear to be pulled from the citation listed , and these will directly scale the inferred timing of population size changes. The message that divergence is old is likely right – if gene flow occurs but isn't being captured by the analysis then divergence times should be *even older*, but if divergence time estimation is the goal then a demographic inference method explicitly incorporating gene flow and returning estimates of split times should be employed, and the empirical rates should be better justified. I'd suggest demographic modeling of the joint site frequency spectrum in dadi or moments. In addition, the end of this section regarding the possible speed of evolution of variation in migratory traits should acknowledge that much of that literature is based on the documented contemporary evolution of the NW migration and not on biogeographic reconstruction of island colonizations.Subsection “The transition to residency may be controlled by regulatory elements” paragraph two: It was hard to tell what in this paragraph referred to results from this study, vs results from previous studies. Are Clock/Npas2/bmal1 in an outlier region here? Or is it just that there is one bHLH motif found in an outlier region? If the latter, I'd suggest cutting the second half of this section as the evidence of any specific regulatory element being involved seems quite weak.Subsection “Examining genes associated with the transition to residency” paragraph one: Needs citations.Subsection “Limited overlap with previous genomic studies examining this trait” paragraph two: Worth making the point here that though this gene is *associated* with migratory orientation, the proposed mechanism is not at all *causal* for orientation. This point could be more generally made in the Introduction, as well.Subsection “Considerable variance in migratory distance is controlled by genetic variation”: This analysis did not seem particularly compelling, and  the binning of distance as an ordinal trait seems likely to offer little power to identify causal alleles in a small cohort like this. It also isn't clear to me why a new method is used here that wasn't used in the previous association/selection analyses. I suggest cutting this section.Subsection “Selection on shared genetic variation could facilitate rapid changes in migration”: I like this question quite a bit and think there are some cool results here, but I found this section hard to follow. I think it needs a rewrite, and the methods should be better justified. I suggest starting with a paragraph laying out expectations for what you expect given selection from novel vs standing variation , and using only analyses that have been previously proposed and shown through either theory or simulation to distinguish these processes.Subsection “GWAS.”: What specifically was the factor used to represent population structure here? A matrix of pairwise genetic distance over the whole genome? Please provide a little more detail on your implementation of this method.Figure 1C: These colors seem to partially but not entirely match the map, which is confusing . I'd use different colors than in the map. Greyscale would work ok with K=3.Figure 5 legend: the letters seem to be off here – please check that e and f are correctly referenced, and discuss panels in order (a-e).eLife. Your revised article has been evaluated by Patricia Wittkopp (Senior Editor) and a Reviewing Editor.Thank you for resubmitting your work entitled "The evolutionary history and genomics of European blackcap migration" for further consideration by The manuscript has been improved but there are some remaining issues that need to be addressed before acceptance, as outlined below:All three reviewers found the manuscript much improved. Only reviewer 1 had a substantial outstanding comment that requires clarification. After consultation, the other two reviewers and the Reviewing Editor concur with the points raised by reviewer 1. Please address the below questions about how individuals were assigned to different phenotype groups in the different analyses. The manuscript is provisionally recommended for acceptance pending satisfactory revision on these points. The authors are also encouraged to consider the minor points raised by all three reviewers.Reviewer #1:I find the resubmitted manuscript to be a substantial improvement over the initial submission. The authors are to be commended for their thorough revision and for incorporating reviewer comments.The only major comment from my previous review that I feel is not clarified in the revision is the way the three different migratory phenotypes are combined in the demographic analyses and the initial hapFLK/PBS/nSL analyses that include all populations (point #7 from my review). Let me better explain my confusion: in the analyses of population structure , there are nine populations with distinct phenotypes: continental residents, short distance sw migrants, long distance SE migrants, medium distance SW, SE, and NE migrants, and the three island populations. However, in subsequent analyses, these populations are grouped together in different ways that are not clearly explained. For the demographic analysis, the medium- and long- distance migrants are grouped together, despite variation in orientation among these populations. Why is this? Likewise, in the analyses of the genetic basis of traits, the authors describe analyzing all three phenotypes ; however, each of these of course has multiple categories . In the legend for Figure 3, they note that they are grouping birds into 5 phenotypes for panels A and B and 3 phenotypes for panels B and C. Figure 3—figure supplement 1 shows six different phenotypes  for the ΔPBS analysis. The authors note that islands were excluded and residents limited to a single population, but it is otherwise unclear to me what these different phenotype groups are. Adding to the confusion is that 1) the analysis of differentiation and selection comes after the demographic modeling, which did not consider orientation in the grouping of phenotypes; 2) Figure 5 also combines the medium and long- distance migrants and removes orientation; and 3) sample sizes are not given for each population used in the comparisons. Some clarification of exactly which populations and phenotypes are being compared in the analyses, throughout this this section is needed, as well as justification for why medium- and long- distance migrants are combined for some analyses but not others, and clear reporting of sample sizes for each comparison in the main text .Reviewer #2:The authors have done a commendable job revising this manuscript. The Introduction is much easier to follow and sets up the study nicely. The revised Materials and methods and increased focus on linking methods/results directly to specific study questions and objectives greatly improve the overall flow and readability of the paper. I appreciate the effort that has gone into addressing reviewer comments.Reviewer #3:The authors have done a really excellent job with this revision and I'm pleased to recommend acceptance. The revised demographic analysis and Introduction are significant improvements and all of my major questions from the first submission have been addressed well in the response. [Editors’ note: the authors resubmitted a revised version of the paper for consideration. What follows is the authors’ response to the first round of review.]1) A primary issue identified by all reviewers is that the paper was generally hard to follow and contained many unrelated analyses. The Introduction does not set up clear questions and gives little background information on why the blackcap system is uniquely well-suited for addressing questions about the genetic basis of migratory behavior. The Introduction also does not set up the key findings of the paper. It is recommended that the authors re-focus the overall framing of the paper to highlight their key results, remove tangential analyses (see below for specifics), and generally streamline and contextualize results within the existing literature throughout the entire paper.Thank you for summarizing the reviewers concerns here. We have taken them on board, re-writing the Introduction entirely and reducing the phylogeographic portion of our study substantially, including all discussion of ancestral state derived from our results (see our response to your second comment).Our new Introduction highlights the importance of phylogeographic studies with blackcaps. For example, these studies provided important evolutionary context for work on the genetics of migration. Limited genetic differentiation was documented between blackcap populations suggesting transitions between migratory states must be very rapid and may involve on a small number of genetic changes. These studies also speak to the timing and number of transitions that have occurred within blackcaps between migratory and resident behaviour. This information is important for interpreting local signatures of differentiation.All of the phylogeographic work conducted prior to our study relied on limited mitochondrial sequence data making our work – updating results with genome-wide data – essential. Our results support previous findings and uncover novel patterns that are important for interpreting our findings on the genetics of migration. For example, we document genomic differentiation between migrants and both resident continent and island populations. This had not been observed before and guided our analysis on the genetics of migratory orientation specifically as we knew the inclusion of genomically differentiated resident birds was limiting our power to detect signatures related to this trait. The exclusion of residents allowed us to identify regions under positive selection in the NW phenotype, one of the most exciting aspects of the blackcap system that we have been able to underline with our results.2) There was concern from all reviewers about the phylogeography section. These analyses were not clearly integrated with the rest the paper. Furthermore, the way the PCA and ADMIXTURE plots were used to interpret ancestral state seemed very ad-hoc, and the maximum likelihood tree was not well supported. The inference that migration is the ancestral state and was lost on islands is generally reasonable, as that is a pattern found in other taxa. However, if the authors choose to include the phylogeography section moving forward, removal of the PCA and ADMIXTURE interpretations is recommended. The authors should also acknowledge the limitations of their inference more openly, given the weak support in their data. Further, the overall contribution of the phylogeographic analysis to the main conclusions of the paper should be clarified throughout the text.We are confident that our new Introduction integrates our phylogeographic work much better than before. We discuss findings in the blackcap on the genetics of migration first and devote a second paragraph to phylogeographic studies, highlighting their importance for interpreting data on the former topic.We have kept the PCA and ADMIXTURE analyses in our study but removed TREEMIX and ML trees. We do not use any of these analyses to infer ancestral states; we only use them to discuss patterns of genomic differentiation between populations and study demographic history. As we mentioned above, these analyses highlighted new results for the blackcap system that were important for setting up subsequent analyses (e.g. removing resident continent birds) and interpreting findings  is not affecting our local genomic results). Combined with other observations from the system, genomic differentiation between resident populations also suggests that parallel signatures of selection are independent but make use of the same variation.3) The use of SMC++ to infer divergence times was considered problematic, as this method assumes populations do not exchange genes after divergence. To more accurately date divergence times, the authors should use a demographic modeling approach based on the joint site frequency spectrum (e.g. dadi or moments) or evaluate alternative models with and without migration in an ABC framework. Alternatively, the authors could refocus that section on variable demography rather than the timing of splits. Demographic trajectories diverging earlier than previously estimated split times could then be a "suggestive" point, but shouldn't be the primary finding of that analysis. It might be useful to refer to Mazet et al., 2016 (https://www.ncbi.nlm.nih.gov/pmc/articles/PMC4806692/) for guidance with these interpretations.We agree that it may have been problematic to use of SMC++ to date population divergence in our initial submission. Accordingly, in the revised version of our manuscript we used a different program for demographic inference and complimented this analysis with cross-coalescent rate analyses. The approach that we used was introduced by the MSMC model  and extended in MSMC2 . Comparing the rate of coalescence between pairs of individuals taken in two populations to the rate of coalescence within each population allows dating the differentiation of two populations. This approach is particularly well suited to our dataset as it does not require extensive sample sizes (as for instance needed by SFS estimation) and makes use of complete genome data as it intrinsically accounts for linkage disequilibrium. In addition to the dating of population differentiation, cross-coalescence rates can be used to infer the temporal pattern of migration rate between populations (https://www.biorxiv.org/content/10.1101/585265v1.full). As our aim is to date population divergence, we decided to restrict our analyses to the differentiation timing and did not compute estimates of migration rates.4) There were concerns about the authors overinterpreting causal associations between migratory behavior and loci putatively under selection in both the orientation and residency sections. Particularly in the transition to residency section, outliers cannot be separated from population structure, and could therefore be due to a variety of factors unrelated to migration. The authors suggest that finding an elevated region on super scaffold 99 in both island and resident populations indicates this region may be associated with the transition to residency. This analysis is rather unconvincing, as these shared elevated regions could be due to shared ancestry. It is also not clear if the extensive subsequent discussion of candidate loci focuses only on this shared elevated region on scaffold 99, or looks at all outliers. The language in this section should tempered, alternative explanations discussed, and it should be made clear which populations are included when identifying candidate loci.We have noted the potential for other selection pressures to lead to the patterns of positive selection.We believe we have presented strong evidence for parallel positive selection on Super-Scaffold_99 related to the transition from migrants to residents. We outline our reasons below and include them in our manuscript but are of course open to further discussion on the topic.– Three separate population genetic measures suggest this region is under positive selection: hapFLK , ΔPBS (which uses SNPs and controls for linked selection) and nLS (which is a measure of within population variation that relies on haplotypes). The effect linked selection can have on signatures of selection is a very prominent problem discussed in the literature and we have used ΔPBS to address this problem . Population structure between populations is low to begin with and while there was some evidence for differentiation between migrants and residents, the actual level of differentiation between migrant and resident populations is low (~0.03), should have more of a genome-wide effect and is controlled for in the analysis using hapFLK.– It is very unlikely that selection related to other ecological features is responsible for repeated patterns of positive selection on Super-Scaffold_99 in resident continent and island birds as ecological features (both biotic and abiotic) are very different between these regions. For example, considering climate, the Iberian Peninsula is quite variable but in general it would be considered mediterranean in nature . By contrast, many of the Atlantic islands have limited seasonality and are dominated by hot desert like conditions (the Canary Islands and Cape Verde). The Azores are more seasonal (temperate with no dry season and a mild/hot summer) and these islands occur across a broad latitudinal range with increasing temperatures (and decreasing precipitation) as you move towards the equator . Community assemblages experienced by resident populations are also different, with islands having lower diversity in general but exhibiting their own variation as well. For example, the Canary Islands host ~3x the number of bird species and endemics owing to their proximity to the mainland and greater surface area .– Finally, very similar findings and interpretations have been made by other authors, including Zhan et al., 2014, who documented parallel signatures of positive selection in transitions from migratory monarchs in North America to islands. We are lucky we have a system where this kind of comparison (multiple transitions) can be made, providing more support than a single comparison.We do not see why the source of variation upon which selection acts precludes the region on Super-Scaffold_99 from being involved in the transition to residency. Whether the variation comes from new mutations, gene flow or standing genetic variation should not matter. It is still variation in this region (with its specific genes and regulatory regions) that experiences positive selection and is likely involved in the transition. The Atlantic islands were colonized by blackcaps in different waves and before areas in southern Europe . It seems the use of shared variation (gene flow or standing genetic variation) could have facilitated these transitions and is actually quite interesting re. how rapid phenotypic transitions can occur.5) Analyses of selection on standing genetic variation: as with the inferences about phylogeography, these sections read as somewhat ad-hoc and did not use previously validated methods. The first section about standing genetic variation  is weakly supported- removal this section is recommended. The second section, if retained, should use methods that have been previously shown through theory or simulation to distinguish selection on standing genetic variation. It is also recommended that the authors articulate clear predictions about expected results if migratory behavior arises from selection on novel vs. standing variation.We have removed the first section on standing genetic variation and short distance migrants. Please see our response to reviewer 3 concerning the use of previous methods for inferring standing genetic variation. Briefly, we used methods outlined in the reference they suggested (Barrett and Schluter 2008) to the best of our ability; most of the methods described rely on the availability of an ancestral population (e.g. marine sticklebacks for freshwater adaptation in the three-spinned stickleback) and the authors themselves (i.e. Barrett and Schluter 2008) note there are limitations to the methods they suggest (e.g. looking for a “soft” sweep requires knowledge of what a “hard” sweep would look like in our system).6) More information needs to be given about sampling and phenotyping. This is particularly important for explaining how phenotypes were assigned to "short-distance SW migrants," which fall into two different clusters on PC2. This is a major gap in the paper.We had summarised all phenotyping and sampling details in Supplementary file 4, but now more prominently further added descriptions in the respective Materials and method part. Here we clarify that in most cases we scored populations, not individuals . This being said, our scoring methods in these locations  were based on morphometry of individuals, and there is a strong correlation between wing length and migration distance in blackcaps. Specifically, the two north-Iberian populations are short winged compared to central and northern European blackcaps, indicating short-distance movements. With respect to the short-distance SW migrants we know they are migratory because they leave in winter . Southern residents are known to be resident because of the combination of extremely short and rounded wings and individual ringing recoveries of individuals that spend the whole year in the same territory.7) There were concerns about the analysis of migratory distance, both in classifying distance as a categorical trait and in why a different method for identifying outliers was used in this section. The analysis of distance, if retained, should either apply the same approaches for outlier detections as were used for the analyses of propensity and orientation, or clearly explain use of a different approach. There should also be further justification for classifying distance as a categorical variable.We have provided more context for this analysis in our response to reviewers 1 and 2. We cannot quantify migratory distance as continuous as we do not know how far an average individual from each population travels and we chose to retain some of this variation by quantifying distance as an ordinal variable. If we had used the same method as our work on migratory orientation (hapFLK) we would have lost the continuous nature of this variable all together. We have included a note in the manuscript to this effect.Reviewer #1:1) While the dataset here is remarkable, the structure of the paper is quite challenging. The Introduction, in my opinion, does not articulate a clear overarching question, and the questions that are laid out in the intro are not linked well to the analyses presented in the paper. For example, the Introduction seems to set up a study focused on the genetic architecture of migration. However, the first part of the paper is a lengthy analysis of population structure and phylogeography that seems unrelated to any topics introduced in the Introduction and is not connected to the background provided on the system. When we get to the genetic architecture component of the paper, it is not contextualized well with previous knowledge of the system, and it is therefore hard to evaluate the significance of the results. It is also not clear how the earlier pop structure and phylogeography component is related to analyses of selection and genetic architecture.Thank you for these suggestions. We have re-written the Introduction, providing a more equitable consideration of both migration genetics and phylogeography and highlighting how results from phlogeographic studies are relevant to our understanding of migration genetics. For example, classic studies on both migration genetics and phylogeography highlight how rapidly migratory behaviour can evolve and limited genetic differentiation between blackcap phenotypes could suggest the effect sizes of loci underlying migration are small . Concerning the inclusion of phylogeographic analyses as a whole, we feel they provide an important setting for subsequent analyses of migration genetics. For example, in the first analyses on this topic using hapFLK and all phenotypes we find most signatures of selection are limited to residents, likely reflecting the fact these populations evolved resident phenotypes as they colonized areas further south in Europe and on the Atlantic islands. Note we have reduced the section on phylogeography substantially including the exclusion of several analyses including TREEMIX and the ML tree.2) Very little information is given about the sampling or how phenotypes were identified. The only information provided is in the legend of Figure 1, which states that samples were collected on the breeding grounds with the exception of a few collected during the winter or during migration. This is problematic, given that the paper relies on individual-level phenotype assignments for these samples in all analyses. Explanations of how migratory distance, propensity, and orientation are determined for individual samples are needed.We have summarised all phenotyping and sampling details in Supplementary file 4, but now more prominently further added descriptions in the respective method part, we have also fully replied to a similar comment raised by the editor, see above. There we clarify that in most cases we scored populations, not individuals . Scoring methods in these locations  were based on morphometry of individuals, and there is a strong correlation between wing length and migration distance in blackcaps. Other measures of phenotype are based on ringing-recovery data, stable isotope assessments as detailed in Supplementary file 4.3) The section on inferring ancestral state reads as very ad-hoc and confusing. The way the PCA is interpreted is not convincing and is not supported by any citations. The results from TREEMIX and ADMIXTURE are conflicting, but no explanation for how to interpret this discordance is offered. The purpose of this section overall is also not entirely clear- how do these analyses link back to overall questions about genetic architecture of migration?Thank you for this comment. We have removed all discussion of ancestral state from our Results. For example, we have excluded the ML tree and discuss results from the PCA, ADMIXTIRE and FST in terms of population differentiation only. All speculation has been removed. This section has been reduced substantially in response to comments from all reviewers.4) The treatment of short-distance migrants is confusing. Based on the PCA, ADMIXTURE plot, and the map, it looks to me like these populations are admixed between residents and migrants . It is unclear to me how any of these data support variation in migratory behavior arising from standing genetic variation. Are the authors suggesting that individuals in the short-distance migrant population have different migratory strategies (e.g. some are residents and some are migrants) due to variation within the population? Later evidence for the role of standing genetic variation is more convincing. The purpose of this section needs to be made clearer.Thank you for noting this. We have removed this section to focus on our main questions.5) I was surprised, given low support for the maximum likelihood tree and the history of gene flow indicated by TREEMIX, that the authors didn't use a method of demographic reconstruction that allows migration and determination of the timing of admixture events.Thank you for noting this. In the revised version of our manuscript, we complemented our demographic inference with cross-coalescent rate analyses. The approach that we used was introduced by the MSMC model  and extended in MSMC2 . Comparing the rate of coalescence between pairs of individuals taken in two populations to the rate of coalescence within each population allows dating the differentiation of two populations. This approach is particularly well-suited to our dataset as it does not require extensive sample sizes (as for instance needed by SFS estimation) and make use of complete genome data as it intrinsically accounts for linkage disequilibrium. In addition to the dating of population differentiation, cross-coalescence rates can be used to infer the temporal pattern of migration rate between populations (https://www.biorxiv.org/content/10.1101/585265v1.full). As our aim is to date population divergence, we decided to restrict our analyses to the differentiation timing and did not compute estimates of migration rates.6) The way results on the propensity to migrate are presented strongly suggests that regions under selection in non-migratory populations are directly associated with loss of migratory behavior. However, these regions could just as reasonably be under other sources of divergent selection between these populations . Couldn't shared regions under selection in island and resident populations also be due to gene flow and shared ancestry in these populations, as indicated by TREEMIX? Overall, I don't find it very convincing that regions under selection in non-migratory populations are directly associated with migratory propensity. The authors should either temper this section and discuss alternative explanations, or make the support for their assertion clearer.We have added a note in the manuscript that parallel signatures of divergent selection in resident populations could derive from a different source of selection than migration but do not believe this is the case as ecological features (biotic and abiotic) experienced by birds on the continent and islands are very different. For example, climate on the Iberian Peninsula is variable but in general it would be considered mediterranean in nature . By contrast, many of the Atlantic islands have limited seasonality and are dominated by hot desert like conditions (the Canary Islands and Cape Verde). The Azores are more seasonal (temperate with no dry season and a mild/hot summer) and more generally, these islands occur across a broad latitudinal range with increasing temperatures (and decreasing precipitation) as you move towards the equator, Cropper, 2013). Community assemblages experienced by resident populations are also different, with islands having lower diversity in general but exhibiting their own variation as well. For example, the Canary islands host ~3x the number of birds species and endemics owing to their proximity to the mainland and greater surface area . A very similar argument was made by Zhan et al., 2014, in their observation that resident monarch butterflies on islands derive from continent migrant monarchs.Concerning the source of these parallel signatures of selection, we agree these signatures could be due to gene flow or shared ancestry. We are not sure how this affects our results or interpretations. Whether the source of variation is from new mutations or shared variation does not affect our conclusion that the same regions are under selection in resident continent and island populations. Wherever the variation comes from it’s under positive selection that we believe is related to the transition from migratory to resident in these locations following their colonization . There is strong evidence from previous phylogeographic studies that colonization of the islands and southern regions of the continent occurred at different times .7) In the first analyses of genomic regions under selection, the authors "consider all three traits together." What does this mean? What groups of samples were actually compared?The three phenotypes are orientation, distance and propensity. This means that all birds were included except for resident island populations (n=15), and resident continent birds from Asni and Cazalla . We have made this clearer.8) I wondered why a different method was used for the analysis of migratory distance than was used for orientation and propensity. Why not make these analyses comparable? This last section in general felt somewhat tacked-on and not well integrated into the rest of the paper.Migration distance is an ordinal variable: short (1), medium (2), and long (3) distance migrants. We did not want to lose this information by running this analysis through hapFLK where it would be considered a categorical variable. GEMMA allows you to code your phenotype as ordinal. We have made this clear in the manuscript and think this analysis is integrated well enough as it is clear in our statement of objectives we will be studying the genetic basis of all three traits and this is restated at the start of the localized analyses as well.9) Overall, I think the results could be more clearly contextualized within the broader literature throughout the paper. The authors have a very cool dataset, but the parts that are novel and exciting are not highlighted very well throughout. The amount of background information given seems to assume familiarity with the blackcap system, which limits the accessibility of the paper to a broad audience. I think more effort needs to be put towards explaining why this system is so well-suited for asking these questions, and what new things we learn about migratory behavior from these analyses.Thank you for this suggestion. We have re-written the Introduction to provide much more background information on the blackcap.Reviewer #2:[…] I have a few comments/questions outlined below. It is my opinion that, if these concerns are addressed, this work would make a nice contribution to the existing literature.Subsection “Resident populations evolved from a migratory ancestor”: While I like this section, I think you can combine the TREEMIX and demographic analyses to cover most of this section in a more compelling way. While I don't entirely disagree, I find the use of the PCA and ADMIXTURE results to infer ancestral state a bit weak compared to the demographic data. I think you have enough analyses outside of the PCA and ADMIXTURE results to draw conclusions regarding ancestral state that are more appropriate for this type of question. I would recommend that you narrow this section down to focus on fewer, but more definitive, analyses, as it would strengthen the overall argument.Thank you for this suggestion. We have eliminated all discussion of ancestral states in our analysis. We have removed the ML tree as population splits were not well supported along with TREEMIX. We have not removed our PCA or ADMIXTURE analyses. Instead we use them to describe population differentiation alone. Their use in this capacity is well supported in the literature. We have described this decision in full in our response to the editor above.Subsection “Evidence for standing genetic variation in short distance migrants”: Similar to my comment above, I found parts of this section distracting and less compelling compared to the rest of the manuscript. I think you could remove this section as I am not really sure it adds much to the paper. I feel similarly about subsection “Selection on shared genetic variation could facilitate rapid changes in migration”.Thank you for this suggestion. We have removed both of these sections.Subsection “Resequencing analysis” paragraph three: This is more just curiosity: did you try using HaplotypeCaller from GATK? I think the fact that variant calling in GATK is combined with other programs makes this a robust approach but was wondering why you chose UnifiedGenotyper.We relied mostly on genotype probabilities from ANGSD and so did not think the additional computational time required for HaplotypeCaller is necessary.Subsection “Linkage disequilibrium”: I don't believe that there is any mention of linkage disequilibrium in the main text of the manuscript. May be worth mentioning somewhere in the resultsWe have removed this section, thank you for highlighting this.Figure 4: Add a Y-axis label to panel cThank you for noting this. We have done so.Figure 5: I think the figure is very aesthetically pleasing, but I am really struggling to understand what is going on in this figure. It may just be a matter of clarifying the legend, or perhaps it is just me. But I am not convinced this figure adds much. Also, I think you mean to say "panel f shows haplotype.…."We have reduced the number of panels, split this into three figures  and improved the figure legends.Reviewer #3:[…] In general I thought the new data in this paper was very good, but the results presented cover so much territory that individual analyses sometimes feel rushed and the whole picture is hard to follow. I have a few methodological issues with the phylogeography, and for the selection/association analyses I think the more speculative post-hoc analyses of specific genes should be limited. One general issue that should be addressed more directly when describing results for regions putatively associated with migratory behaviors is that migration itself may be tangential to the actual selective force – climatic variation on either the breeding or wintering range, dietary differences across geographic regions, or any other environmental factor varying among populations could create the basis for selection that could be detected by approaches like PBS. Because migratory phenotypes covary with many of these other environmental factors, it is inevitably going to be difficult to identify genes that drive (rather than being driven by) aspects of migration like orientation, distance, or phenology.We have included this caveat, that other selection pressures may be responsible for signatures of positive selection in our study but note, in the case of consistent patterns exhibited by resident island and continent populations this is unlikely (see our response to editor and the revised text for a full description).That being said I think this is an important paper in the area of migration genomics because it is in the only system with truly compelling captive-breeding results from crosses and because the dataset is excellent.Subsection “Differentiation between populations is low”: Are migrant populations differentiable on other PC's? What about if PCA is run on just continental, or just migrant populations alone? Because PCA will represent variance in the full dataset, running it with divergent island populations may mask differentiation among migrant populations. Probably same issues in the admixture analysis. I'd like to see a supplemental figure showing at least PC1-2 when the analysis is run on just continental birds.We have added the requested figure to the supplementary material . There is no additional structure between migratory populations when the island populations are removed.Subsection “Resident populations evolved from a migratory ancestor”: The methods for ancestral state reconstruction here were unfamiliar to me and seemed ad-hoc. Are there citations available for studies outlining the logic of using PCA and/or admixture results for this task? As it is the clearest evidence seemed to be from the phylogenetic analysis, which relies on poorly supported nodes in a topology constructed using a method that effectively assumes no gene flow.We have removed all discussion on ancestral states.Subsection “Divergence began ~250,000 year ago”: SMC++ assumes populations are isolated, so it isn't an appropriate method for dating population splits in groups that continue to exchange genes after divergence. In addition, the mutation rate and generation times (though they look about right relative to other migratory birds) don't appear to be pulled from the citation listed , and these will directly scale the inferred timing of population size changes. The message that divergence is old is likely right – if gene flow occurs but isn't being captured by the analysis then divergence times should be *even older*, but if divergence time estimation is the goal then a demographic inference method explicitly incorporating gene flow and returning estimates of split times should be employed, and the empirical rates should be better justified. I'd suggest demographic modeling of the joint site frequency spectrum in dadi or moments. In addition, the end of this section regarding the possible speed of evolution of variation in migratory traits should acknowledge that much of that literature is based on the documented contemporary evolution of the NW migration and not on biogeographic reconstruction of island colonizations.Thank you for this suggestion. In the revised version of our manuscript, we complemented our demographic inference with cross-coalescent rate analyses. The approach that we used was introduced by the MSMC model  and extended in MSMC2 . Comparing the rate of coalescence between pairs of individuals taken in two populations to the rate of coalescence within each population allows dating the differentiation of two populations.  [Eventually write:] This approach is particularly well-suited to our dataset as it does not require extensive sample sizes (as for instance needed by SFS estimation) and make use of complete genome data as it intrinsically accounts for linkage disequilibrium. In addition to the dating of population differentiation, cross-coalescence rates can be used to infer the temporal pattern of migration rate between populations (https://www.biorxiv.org/content/10.1101/585265v1.full). As our aim is to date population divergence, we decided to restrict our analyses to the differentiation timing and did not compute estimates of migration rates.Subsection “The transition to residency may be controlled by regulatory elements” paragraph two: It was hard to tell what in this paragraph referred to results from this study, vs results from previous studies. Are Clock/Npas2/bmal1 in an outlier region here? Or is it just that there is one bHLH motif found in an outlier region? If the latter, I'd suggest cutting the second half of this section as the evidence of any specific regulatory element being involved seems quite weak.We have made this clearer and while speculative we think it is important to include as the motif that corresponds with the literature search conducted by Ruegg et al., 2014, is located on Super-Scaffold_99 which shows parallel signatures of selection related to the transition from migration to residency in both continent and island birds.Subsection “Examining genes associated with the transition to residency” paragraph one: Needs citations.We have added references.Subsection “Considerable variance in migratory distance is controlled by genetic variation”: This analysis did not seem particularly compelling, and  the binning of distance as an ordinal trait seems likely to offer little power to identify causal alleles in a small cohort like this. It also isn't clear to me why a new method is used here that wasn't used in the previous association/selection analyses. I suggest cutting this section.Migration distance is a continuous variable in theory but we do not have this kind of detail for our populations. We don’t know the exact distances an average bird from each population migrates. We did not want to lose the continuous nature of this variable entirely though so we chose to include it as an ordinal variable: short (1), medium (2), and long (3) distance migrants. We did not want to lose this information by running this analysis through hapFLK where it would be considered a categorical variable. GEMMA allows you to code your phenotype as ordinal. We have made this clear in our manuscript and think this analysis is integrated well enough as it is clear in our statement of objectives we will be studying the genetic basis of all three traits and this is restated at the start of the localized analyses as well.Subsection “Selection on shared genetic variation could facilitate rapid changes in migration”: I like this question quite a bit and think there are some cool results here, but I found this section hard to follow. I think it needs a rewrite, and the methods should be better justified. I suggest starting with a paragraph laying out expectations for what you expect given selection from novel vs standing variation , and using only analyses that have been previously proposed and shown through either theory or simulation to distinguish these processes.We appreciate the reviewers comment. Barrett and Schluter, 2008, make three suggestions for showing selection acts on standing genetic variation. We go through each of these below and note that the authors themselves stated that “none of [their] approaches [are] infallible” and they “identify possible difficulties with each”.1) Barrett and Schluter, 2008, suggest looking for evidence of soft sweeps around regions under selection using different population parameters. This analysis relies on the assumption that nearby neutral alleles will sweep with beneficial allele and is largely descriptive. For example, recombination around an allele that has been segregating in an ancestral population for some time will break up associations with nearby neutral sites. This should result in a narrow, shallow reduction in polymorphism compared to hard sweeps. Barrett and Schluter, 2008, do not provide any guidance on how to quantify how “narrow” and “shallow” regions have to be under this scenario. In addition, by their nature these signatures are more difficult to detect . Finally, depending on how long the allele has been in the population any signature of a sweep could be eliminated completely by recombination. The latter point was noted by Barrett and Schluter, 2008. Given the difficulties associated with this method we have chosen not to employ it but we do note in the text that the peaks we identified are quite narrow.2) Barrett and Schluter, 2008, also suggest finding evidence the allele under selection still occurs as standing variation in the ancestral population. This suggestion obviously requires us to know and still have an ancestral population to sample. This is easier to do in some systems ; we have done our best, noting that the migratory phenotype is likely ancestral in blackcaps (based on previous work to ours) and most of the haplotypes under selection are present in migratory populations . If these are the ancestral populations  our data on this topic support the use of standing genetic variation. A similar argument was made by Zhan et al. (2014) focusing on monarch butterflies where multiple losses of migratory behaviour involved selection at the same haplotype that is still present in the migratory population.3) The last suggestion by Barrett and Schluter, 2008, is to use a phylogenetic study to determine the age of genomic regions under selection. Again their example comes from the Colosimo et al., 2005 paper on sticklebacks. These authors compared estimates of neutral sequence divergence between populations that differ in their armour phenotype to splits of known age within the same system to show the allele under selection is quite old. Unfortunately we do not have any closely related population pairs of known age to calibrate estimates of divergence in blackcaps but we have estimated neutral sequence divergence (the number of synonymous segregating sites) in all migratory populations and do not find a difference. Please note, this suggestion by Barrett and Schluter, 2008, may not be very reliable as the regions we’re looking at have undergone selective sweeps and patterns of neutral divergence may be obscured by the effects of selective sweeps on polymorphisms. This would make it difficult to use diversity to age divergence between haplotypes and was not noted by Barrett and Schluter, 2008.We have also compared sequence divergence between all haplotypes and our ancestral sequence  and hill babbler (resident)]).Sylvia clade). By contrast, the phylogeny built using data from Super-Scaffold 73 suggests garden warblers are more closely related to blackcaps and medium distance NW birds diverged first, with the remaining blackcaps forming a polytomy as in the genome-wide tree. Garden warblers are migratory and the placement of NW birds at the base of the phylogeny suggests the haplotype in this population old and had been in the population before it underwent selection in the NW phenotype.We have also added two new analyses. First, we compare a phylogeny built using all data (ML tree) to one built using data from the genomic region under selection on Super-Scaffold 73 only . The genome-wide phylogeny is largely unresolved and has the garden warbler and hill babbler as a sister clade to blackcaps . We note exactly this pattern in our study . Note this analysis involves resampling and a comparison of SFS from our data and the resamples. It would be ideal to compare the distribution of our observed data to resamples but at this time we are not aware of any way to compare distributions with these patterns (e.g. high frequencies at one end.).Subsection “GWAS.”: What specifically was the factor used to represent population structure here? A matrix of pairwise genetic distance over the whole genome? Please provide a little more detail on your implementation of this method.It is a kinship matrix generated using genome-wide SNP data.Figure 1C: These colors seem to partially but not entirely match the map, which is confusing . I'd use different colors than in the map. Greyscale would work ok with K=3.They are the exact same colours and we feel are instructive, helping the reader quickly see that there is admixture in both resident groups from the migrants. Accordingly, which we appreciate this comment we have chosen to stick with our original colour scheme.Figure 5 legend: the letters seem to be off here – please check that e and f are correctly referenced, and discuss panels in order (a-e).Thank you for noticing this. We have made the change.[Editors’ note: what follows is the authors’ response to the second round of review.]Reviewer #1:I find the resubmitted manuscript to be a substantial improvement over the initial submission. The authors are to be commended for their thorough revision and for incorporating reviewer comments.The only major comment from my previous review that I feel is not clarified in the revision is the way the three different migratory phenotypes are combined in the demographic analyses and the initial hapFLK/PBS/nSL analyses that include all populations (point #7 from my review). […] Some clarification of exactly which populations and phenotypes are being compared in the analyses, throughout this this section is needed, as well as justification for why medium- and long- distance migrants are combined for some analyses but not others, and clear reporting of sample sizes for each comparison in the main text .Thank you for this comment. There appear to be two problems here: (1) why were medium and long distance migrants combined for the demographic analysis  and (2) what samples were used for analyses on the genetic basis of different migratory traits. We will address these concerns in turn below.1) Why were medium and long distance migrants combined for demographic analyses ?Each one of the orientations  were plotted individually in Figure 5A. They show similar trends making this difficult to see and our figure legend lacked clarity. We have improved the legend for Figure 5A stating that medium distance migrants were not combined for this plot.We combined medium and long distance migrants for the demographic analyses because they exhibited very little population structure or differentiation  and thus we assumed they would exhibit similar demographic trajectories. We have confirmed this assumption now, running demographic analyses separately for each phenotype. The trajectories are indistinguishable and can now be found in Figure 2—figure supplement 4. We also reran cross-coalescent analyses and no population splits were observed . This information is in the main text as well.2) What samples were used for analyses on the genetic basis of different migratory traits?Analyses of population structure and demography included the full dataset. Subsets of the dataset were used in analyses focused on the genetics of migratory traits. We have included three new columns in Supplementary file 4 showing the exact birds used in each subset and – as requested by the reviewer – we have moved information on sample sizes from figure captions to the main text.We have also removed the panel in Figure 3—figure supplement 1 showing estimates of PBS for residents as this is already shown in the main text . Six groups (residents [shown in Figure 3A], short distance SW, medium distance NW, SW, SE and long distance SE birds were used in this analysis.