Page 4 of 5 FirstFirst ... 2345 LastLast
Results 31 to 40 of 43

Thread: NW European samples on Voronoi tesselation

  1. #31
    Registered Users
    Posts
    2,071
    Sex
    Ethnicity
    Indo-europeen
    Y-DNA (P)
    R1a-Y33 Kurgan/ CWC
    mtDNA (M)
    H76

    European Union Poland Germany Lithuania Romania Ukraine
    Quote Originally Posted by Ruderico View Post
    If I'm not mistaken 2 of the SE samples have around 1/4 Levantine ancestry, one is part SSA. Otherwise they are all basically ancient Iberians with higher-than-modern levels of north African ancestry, even the ones from the pre-muslim period
    The pre-muslim period is similar to the Berbers / amazigh?
    Alain Dad
    Y-DNA R1a-Y33 Eastern Corderd Ware Culture Baltoslavic/ old Pruzzen
    H76 czech Republic/England (Celtic tribes ?) W3a1d Yamnaya Culture, Samara /Pontic steppe
    Scytho-sarmatian.

    Eurogenes Global 25 Calculator/Modern

    My:
    Polish: 27.8%
    German: 21.9%
    Greek_Central_Macedonia: 20.0%
    Italian_Bergamo: 17.4%
    Russian_Voronez: 10.4%
    Mari: 2%
    Moldovan: 0.2%
    Italian_Northeast: 0.2%
    Other: 0.1%

  2. #32
    Global Moderator
    Posts
    3,750
    Sex
    Location
    Vissaiom
    Ethnicity
    Portuguese highlander
    Y-DNA (P)
    E-Y31991>FT17866
    mtDNA (M)
    H20 (xH20a)

    Asturias Galicia Portugal 1143 Portugal 1485 Portugal Order of Christ PortugalRoyalFlag1830
    Quote Originally Posted by Alain View Post
    The pre-muslim period is similar to the Berbers / amazigh?
    No, most are clearly closer to modern Iberians, they just have higher levels of north African ancestry than them
    YDNA E-Y31991>PF4428>Y134097>Y134104>Y168273>FT17866 (TMRCA ~1100AD) - Domingos Rodrigues, b. circa 1690 Hidden Content , Viana do Castelo, Portugal - Stonemason, miller.
    mtDNA H20 - Monica Vieira, b. circa 1700 Hidden Content , Porto, Portugal

    Hidden Content
    Global25 PCA West Eurasia dataset Hidden Content

    [1] "distance%=1.6007"

    Ruderico

    NW_Iberia_IA,80.4
    Berber_EMA,11
    Roman_Colonial,8.6

  3. The Following 2 Users Say Thank You to Ruderico For This Useful Post:

     Alain (10-29-2019),  JMcB (10-29-2019)

  4. #33
    Registered Users
    Posts
    1,052
    Sex
    Location
    Netherlands
    Ethnicity
    South-Dutch
    Nationality
    Dutch
    Y-DNA (P)
    I2a2a1b2-CTS1977
    mtDNA (M)
    H13a1a1

    Netherlands Belgium
    Quote Originally Posted by Ruderico View Post
    If I'm not mistaken 2 of the SE samples have around 1/4 Levantine ancestry, one is part SSA. Otherwise they are all basically ancient Iberians with higher-than-modern levels of north African ancestry, even the ones from the pre-muslim period
    You are completely right about the North-African Admixture of Iberia_Southeast_CE.
    I projected the modern Moroccan Berbers (marked as 'B') on the LDA plot of sub modern Europeans.
    Berber.png

  5. The Following 2 Users Say Thank You to Huijbregts For This Useful Post:

     JMcB (10-29-2019),  Ruderico (10-29-2019)

  6. #34
    Global Moderator
    Posts
    3,750
    Sex
    Location
    Vissaiom
    Ethnicity
    Portuguese highlander
    Y-DNA (P)
    E-Y31991>FT17866
    mtDNA (M)
    H20 (xH20a)

    Asturias Galicia Portugal 1143 Portugal 1485 Portugal Order of Christ PortugalRoyalFlag1830
    Quote Originally Posted by Huijbregts View Post
    You are completely right about the North-African Admixture of Iberia_Southeast_CE.
    I projected the modern Moroccan Berbers (marked as 'B') on the LDA plot of sub modern Europeans.
    Berber.png
    Olalde did model them in his study, so I take no credit as I'm really just mimicking him
    However even a simple PCA plot with modern Iberians, a Levantine population and Berbers allows us to see how these ancient individuals looked like. I filtered the Berber and Moroccan individuals in order to remove the more Levantine shifted ones.

    Last edited by Ruderico; 10-29-2019 at 05:06 PM. Reason: new image with ancient Guanches
    YDNA E-Y31991>PF4428>Y134097>Y134104>Y168273>FT17866 (TMRCA ~1100AD) - Domingos Rodrigues, b. circa 1690 Hidden Content , Viana do Castelo, Portugal - Stonemason, miller.
    mtDNA H20 - Monica Vieira, b. circa 1700 Hidden Content , Porto, Portugal

    Hidden Content
    Global25 PCA West Eurasia dataset Hidden Content

    [1] "distance%=1.6007"

    Ruderico

    NW_Iberia_IA,80.4
    Berber_EMA,11
    Roman_Colonial,8.6

  7. The Following User Says Thank You to Ruderico For This Useful Post:

     JMcB (04-15-2021)

  8. #35
    Registered Users
    Posts
    1,052
    Sex
    Location
    Netherlands
    Ethnicity
    South-Dutch
    Nationality
    Dutch
    Y-DNA (P)
    I2a2a1b2-CTS1977
    mtDNA (M)
    H13a1a1

    Netherlands Belgium
    My assumption that Iberia_East_IA may be related to Bell_Beaker_Iberia appears to be half plausible:
    BB_Iberia.png

    The 6 Beakers that are closest to Iberia_East_IA are I0461, 5665, 6472, 6539, 6588, 6623

  9. The Following User Says Thank You to Huijbregts For This Useful Post:

     Ruderico (10-29-2019)

  10. #36
    Registered Users
    Posts
    96
    Sex
    Ethnicity
    Finnish

    No-one ever posts their code on this forum, but here's how you can do it yourself.

    This uses `ggforce`: https://ggforce.data-imaginist.com/r...om_delvor.html. When I tried to install `ggforce`, it failed at first because its dependency `units` failed to install. By running `install.packages("units")`, I saw that I needed to run `brew install udunits` (`libudunits2-dev` on Debian and `udunits2-devel` on RPM).

    Code:
    library(tidyverse)
    library(ggforce)
    
    t=read.csv("https://drive.google.com/uc?export=download&id=1F2rKEVtu8nWSm7qFhxPU6UESQNsmA-sl",header=T,row.names=1,check.names=F) # ancient averages scaled
    
    pop=c("BEL_GoyetQ116-1","Baltic_LTU_Narva","CHN_Amur_River_EN","CHN_Boshan_N","CHN_Liangdao1_N","CHN_Qihe_N","CHN_Tianyuan","DEU_Meso_TGM","FRA_Nouvelle_Aquitaine_Meso","GEO_CHG","IRN_Ganj_Dareh_N","IRN_HotuIIIb_Meso","ITA_Grotta_Continenza_Meso","ITA_Villabruna","Iberia_ElMiron","JPN_Jomon","LAO_Hoabinhian","Levant_Natufian","NOR_Meso","NPL_Chokhopani_2700BP","ROU_Iron_Gates_HG","RUS_AfontovaGora3","RUS_Baikal_N","RUS_Boisman_MN","RUS_Darkveti-Meshoko_En","RUS_Dsevils_Gate_Cave_N","RUS_Karelia_HG","RUS_Khvalynsk_En","RUS_Kolyma_Meso","RUS_Kostenki14","RUS_Krasnoyarsk_BA","RUS_Lokomotiv_N","RUS_MA1","RUS_Progress_En","RUS_Sakhalin_HG","RUS_Shamanka_N","RUS_Sunghir","RUS_Tyumen_HG","RUS_Ust_Ishim","RUS_Ust_Kyakhta","RUS_Veretye_Meso","RUS_Volga-Kama_N","RUS_Yakutia_LUP","RUS_Yakutia_Meso","RUS_Yakutia_Ymyiakhtakh_LN","RUS_Yana_UP","SRB_Iron_Gates_HG","SWE_Motala_HG","SWE_PWC_NHG","TUR_Boncuklu_N","TUR_Pinarbasi_HG")
    t=t[row.names(t)%in%pop,]
    
    p=prcomp(t)
    p2=as.data.frame(p$x)
    pct=paste0(colnames(p$x)," (",sprintf("%.1f",p$sdev/sum(p$sdev)*100),"%)")
    
    nk=12
    p2$k=cutree(hclust(dist(t)),k=nk)
    
    ggplot(p2,aes(PC1,PC2,group=-1L))+
    geom_voronoi_tile(aes(fill=as.factor(k),color=as.factor(k)),size=.1,max.radius=.025)+
    # geom_voronoi_tile(aes(fill=as.factor(k),color=as.factor(k)),size=.1)+
    # geom_delaunay_segment2(aes(color=as.factor(k)),size=.3)+
    # geom_polygon(data=p2%>%group_by(k)%>%slice(chull(PC1,PC2)),alpha=.2,aes(color=as.factor(k),fill=as.factor(k)),size=.2)+ # boring convex hulls
    geom_point(aes(color=as.factor(k)),size=.4)+
    geom_text(aes(label=row.names(t),color=as.factor(k)),size=2,vjust=-.7)+
    labs(x=pct[1],y=pct[2])+
    ggtitle("geom_voronoi_tile() with max.radius=.025")+
    coord_fixed()+
    scale_x_continuous(breaks=seq(-100,100,.1),expand=expansion(mult=.08))+
    scale_y_continuous(breaks=seq(-100,100,.1),expand=expansion(mult=.02))+
    scale_color_manual(values=hcl(seq(15,375,length=nk+1)[1:nk],90,40))+
    scale_fill_manual(values=hcl(seq(15,375,length=nk+1)[1:nk],50,80))+
    theme(
      axis.text=element_text(color="black",size=6),
      axis.ticks=element_blank(),
      axis.ticks.length=unit(0,"pt"),
      axis.title=element_text(color="black",size=8),
      legend.position="none",
      panel.background=element_rect(fill="white"),
      panel.border=element_rect(color="gray85",fill=NA,size=.4),
      panel.grid.major=element_line(color="gray85",size=.2),
      plot.title=element_text(size=11)
    )
    
    ggsave("a.png",width=7,height=7)
    system("mogrify -trim -bordercolor white -border 16x16 a.png")


    The top left plot above (which is similar to the OP's plots) just draws circles around each dot, so it doesn't really add any new information. And the second and third plots are even more confusing at least for this application. I'll just stick to boring old convex hulls.

  11. The Following 5 Users Say Thank You to Nganasankhan For This Useful Post:

     Fitis (04-18-2021),  Kapisa (04-15-2021),  peloponnesian (04-15-2021),  Tolan (04-18-2021),  xerxez (04-17-2021)

  12. #37
    Registered Users
    Posts
    369
    Sex
    Location
    49% Nord France, 18% Bretagne/Basse Normandie, 16% Pologne, 9% Allemagne/Alsace, 7% Hte Normandie
    Ethnicity
    French, Polish and German
    Y-DNA (P)
    I-M72
    mtDNA (M)
    H6a1a

    France Normandie France Bretagne Poland
    Quote Originally Posted by Nganasankhan View Post
    No-one ever posts their code on this forum, but here's how you can do it yourself.

    This uses `ggforce`: https://ggforce.data-imaginist.com/r...om_delvor.html. When I tried to install `ggforce`, it failed at first because its dependency `units` failed to install. By running `install.packages("units")`, I saw that I needed to run `brew install udunits` (`libudunits2-dev` on Debian and `udunits2-devel` on RPM).

    Code:
    library(tidyverse)
    library(ggforce)
    
    t=read.csv("https://drive.google.com/uc?export=download&id=1F2rKEVtu8nWSm7qFhxPU6UESQNsmA-sl",header=T,row.names=1,check.names=F) # ancient averages scaled
    
    pop=c("BEL_GoyetQ116-1","Baltic_LTU_Narva","CHN_Amur_River_EN","CHN_Boshan_N","CHN_Liangdao1_N","CHN_Qihe_N","CHN_Tianyuan","DEU_Meso_TGM","FRA_Nouvelle_Aquitaine_Meso","GEO_CHG","IRN_Ganj_Dareh_N","IRN_HotuIIIb_Meso","ITA_Grotta_Continenza_Meso","ITA_Villabruna","Iberia_ElMiron","JPN_Jomon","LAO_Hoabinhian","Levant_Natufian","NOR_Meso","NPL_Chokhopani_2700BP","ROU_Iron_Gates_HG","RUS_AfontovaGora3","RUS_Baikal_N","RUS_Boisman_MN","RUS_Darkveti-Meshoko_En","RUS_Dsevils_Gate_Cave_N","RUS_Karelia_HG","RUS_Khvalynsk_En","RUS_Kolyma_Meso","RUS_Kostenki14","RUS_Krasnoyarsk_BA","RUS_Lokomotiv_N","RUS_MA1","RUS_Progress_En","RUS_Sakhalin_HG","RUS_Shamanka_N","RUS_Sunghir","RUS_Tyumen_HG","RUS_Ust_Ishim","RUS_Ust_Kyakhta","RUS_Veretye_Meso","RUS_Volga-Kama_N","RUS_Yakutia_LUP","RUS_Yakutia_Meso","RUS_Yakutia_Ymyiakhtakh_LN","RUS_Yana_UP","SRB_Iron_Gates_HG","SWE_Motala_HG","SWE_PWC_NHG","TUR_Boncuklu_N","TUR_Pinarbasi_HG")
    t=t[row.names(t)%in%pop,]
    
    p=prcomp(t)
    p2=as.data.frame(p$x)
    pct=paste0(colnames(p$x)," (",sprintf("%.1f",p$sdev/sum(p$sdev)*100),"%)")
    
    nk=12
    p2$k=cutree(hclust(dist(t)),k=nk)
    
    ggplot(p2,aes(PC1,PC2,group=-1L))+
    geom_voronoi_tile(aes(fill=as.factor(k),color=as.factor(k)),size=.1,max.radius=.025)+
    # geom_voronoi_tile(aes(fill=as.factor(k),color=as.factor(k)),size=.1)+
    # geom_delaunay_segment2(aes(color=as.factor(k)),size=.3)+
    # geom_polygon(data=p2%>%group_by(k)%>%slice(chull(PC1,PC2)),alpha=.2,aes(color=as.factor(k),fill=as.factor(k)),size=.2)+ # boring convex hulls
    geom_point(aes(color=as.factor(k)),size=.4)+
    geom_text(aes(label=row.names(t),color=as.factor(k)),size=2,vjust=-.7)+
    labs(x=pct[1],y=pct[2])+
    ggtitle("geom_voronoi_tile() with max.radius=.025")+
    coord_fixed()+
    scale_x_continuous(breaks=seq(-100,100,.1),expand=expansion(mult=.08))+
    scale_y_continuous(breaks=seq(-100,100,.1),expand=expansion(mult=.02))+
    scale_color_manual(values=hcl(seq(15,375,length=nk+1)[1:nk],90,40))+
    scale_fill_manual(values=hcl(seq(15,375,length=nk+1)[1:nk],50,80))+
    theme(
      axis.text=element_text(color="black",size=6),
      axis.ticks=element_blank(),
      axis.ticks.length=unit(0,"pt"),
      axis.title=element_text(color="black",size=8),
      legend.position="none",
      panel.background=element_rect(fill="white"),
      panel.border=element_rect(color="gray85",fill=NA,size=.4),
      panel.grid.major=element_line(color="gray85",size=.2),
      plot.title=element_text(size=11)
    )
    
    ggsave("a.png",width=7,height=7)
    system("mogrify -trim -bordercolor white -border 16x16 a.png")


    The top left plot above (which is similar to the OP's plots) just draws circles around each dot, so it doesn't really add any new information. And the second and third plots are even more confusing at least for this application. I'll just stick to boring old convex hulls.
    Thanks a lot ! What would be the code if we would like to group individuals by a origin (for example, French between them, ...)

  13. The Following User Says Thank You to xerxez For This Useful Post:

     Nganasankhan (04-17-2021)

  14. #38
    Registered Users
    Posts
    96
    Sex
    Ethnicity
    Finnish

    Quote Originally Posted by xerxez View Post
    Thanks a lot ! What would be the code if we would like to group individuals by a origin (for example, French between them, ...)
    Here the name of each population is in the center point of the points within the population.

    Maybe one benefit Voronoi tiles have over convex hulls is that when there are multiple overlapping clusters with a high density of points, they make it easier to see what the ratio of points from each cluster is.



    Code:
    libarary(tidyverse)
    library(ggforce)
    
    t=read.csv("individual-samples-without-header-row",header=F,row.names=1)
    names(t)=paste0("PC",1:ncol(t))
    
    # pick=c("Belgian","Danish","Dutch","English","English_Cornwall","French_Alsace","French_Brittany","French_Nord","French_Paris","German","Icelandic","Irish","Norwegian","Orcadian","Scottish","Shetlandic","Swedish","Welsh")
    # t=t[sub(":.*","",rownames(t))%in%pick,]
    
    pop=sub(":.*","",rownames(t))
    
    t=as.data.frame(prcomp(t)$x) # comment out in order to not do a secondary PCA
    
    t$k=pop
    
    centers=aggregate(t,by=list(pop),mean)
    
    set.seed(1488)
    color=as.factor(sample(seq(1,length(unique(t$k))))) # randomize order of colors so alphabetically consecutive populations don't get consecutive hues
    
    ggplot(t,aes(PC1,PC2,group=-1L))+ # group=-1L is needed by geom_voronoi_tile; remove when using geom_polygon
    geom_voronoi_tile(aes(fill=color[as.factor(k)],color=color[as.factor(k)]),size=.07,max.radius=.008)+
    # geom_point(aes(color=color[as.factor(k)]),alpha=.4,size=.1)+
    # geom_polygon(data=t%>%group_by(k)%>%slice(chull(PC1,PC2)),alpha=.2,aes(color=color[as.factor(k)],fill=color[as.factor(k)]),size=.1)+
    geom_text(data=centers,aes(x=PC1,y=PC2,label=Group.1,color=color),size=2)+
    coord_fixed()+
    scale_x_continuous(breaks=seq(-1,1,.1),expand=expansion(mult=.02))+
    scale_y_continuous(breaks=seq(-1,1,.1),expand=expansion(mult=.02))+
    scale_color_manual(values=hcl(head(seq(15,375,length=length(unique(t$k))+1),-1),80,30))+
    scale_fill_manual(values=hcl(head(seq(15,375,length=length(unique(t$k))+1),-1),50,80))+
    theme(
      axis.text=element_text(color="black",size=6),
      axis.ticks=element_blank(),
      axis.ticks.length=unit(0,"pt"),
      axis.title=element_text(color="black",size=8),
      legend.position="none",
      panel.background=element_rect(fill="white"),
      panel.border=element_rect(color="gray85",fill=NA,size=.4),
      panel.grid.major=element_line(color="gray85",size=.2)
    )
    
    ggsave("a.png",width=8,height=8)
    system("mogrify -trim -bordercolor white -border 16x16 a.png")

  15. The Following 2 Users Say Thank You to Nganasankhan For This Useful Post:

     Fitis (04-18-2021),  xerxez (04-17-2021)

  16. #39
    Registered Users
    Posts
    369
    Sex
    Location
    49% Nord France, 18% Bretagne/Basse Normandie, 16% Pologne, 9% Allemagne/Alsace, 7% Hte Normandie
    Ethnicity
    French, Polish and German
    Y-DNA (P)
    I-M72
    mtDNA (M)
    H6a1a

    France Normandie France Bretagne Poland
    So great, many thanks !

  17. #40
    Registered Users
    Posts
    369
    Sex
    Location
    49% Nord France, 18% Bretagne/Basse Normandie, 16% Pologne, 9% Allemagne/Alsace, 7% Hte Normandie
    Ethnicity
    French, Polish and German
    Y-DNA (P)
    I-M72
    mtDNA (M)
    H6a1a

    France Normandie France Bretagne Poland
    Quote Originally Posted by Nganasankhan View Post
    Here the name of each population is in the center point of the points within the population.

    Maybe one benefit Voronoi tiles have over convex hulls is that when there are multiple overlapping clusters with a high density of points, they make it easier to see what the ratio of points from each cluster is.



    Code:
    libarary(tidyverse)
    library(ggforce)
    
    t=read.csv("individual-samples-without-header-row",header=F,row.names=1)
    names(t)=paste0("PC",1:ncol(t))
    
    # pick=c("Belgian","Danish","Dutch","English","English_Cornwall","French_Alsace","French_Brittany","French_Nord","French_Paris","German","Icelandic","Irish","Norwegian","Orcadian","Scottish","Shetlandic","Swedish","Welsh")
    # t=t[sub(":.*","",rownames(t))%in%pick,]
    
    pop=sub(":.*","",rownames(t))
    
    t=as.data.frame(prcomp(t)$x) # comment out in order to not do a secondary PCA
    
    t$k=pop
    
    centers=aggregate(t,by=list(pop),mean)
    
    set.seed(1488)
    color=as.factor(sample(seq(1,length(unique(t$k))))) # randomize order of colors so alphabetically consecutive populations don't get consecutive hues
    
    ggplot(t,aes(PC1,PC2,group=-1L))+ # group=-1L is needed by geom_voronoi_tile; remove when using geom_polygon
    geom_voronoi_tile(aes(fill=color[as.factor(k)],color=color[as.factor(k)]),size=.07,max.radius=.008)+
    # geom_point(aes(color=color[as.factor(k)]),alpha=.4,size=.1)+
    # geom_polygon(data=t%>%group_by(k)%>%slice(chull(PC1,PC2)),alpha=.2,aes(color=color[as.factor(k)],fill=color[as.factor(k)]),size=.1)+
    geom_text(data=centers,aes(x=PC1,y=PC2,label=Group.1,color=color),size=2)+
    coord_fixed()+
    scale_x_continuous(breaks=seq(-1,1,.1),expand=expansion(mult=.02))+
    scale_y_continuous(breaks=seq(-1,1,.1),expand=expansion(mult=.02))+
    scale_color_manual(values=hcl(head(seq(15,375,length=length(unique(t$k))+1),-1),80,30))+
    scale_fill_manual(values=hcl(head(seq(15,375,length=length(unique(t$k))+1),-1),50,80))+
    theme(
      axis.text=element_text(color="black",size=6),
      axis.ticks=element_blank(),
      axis.ticks.length=unit(0,"pt"),
      axis.title=element_text(color="black",size=8),
      legend.position="none",
      panel.background=element_rect(fill="white"),
      panel.border=element_rect(color="gray85",fill=NA,size=.4),
      panel.grid.major=element_line(color="gray85",size=.2)
    )
    
    ggsave("a.png",width=8,height=8)
    system("mogrify -trim -bordercolor white -border 16x16 a.png")
    I created a post on French Forum thanks to your methodology and your code : https://anthrogenica.com/showthread....448#post766448

  18. The Following User Says Thank You to xerxez For This Useful Post:

     Nganasankhan (04-18-2021)

Page 4 of 5 FirstFirst ... 2345 LastLast

Similar Threads

  1. Clustering the sub modern European G25 samples
    By Huijbregts in forum Autosomal (auDNA)
    Replies: 65
    Last Post: 01-26-2021, 01:18 AM
  2. My current list of U106+ samples in aDNA samples
    By Bollox79 in forum Ancient (aDNA)
    Replies: 2
    Last Post: 04-23-2018, 12:51 AM
  3. My list of ancient European y-dna samples
    By venustas in forum Ancient (aDNA)
    Replies: 2
    Last Post: 10-14-2017, 05:19 AM
  4. Replies: 13
    Last Post: 09-13-2016, 05:21 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •