load libraries

library("tidyverse")
library("plyr")
library("dplyr")
library("ggplot2")
library("RColorBrewer")
library("data.table")
library("stringr")
library("janitor")
library("knitr")
library("kableExtra")
library("plotly") 

knitr::opts_chunk$set(echo = TRUE, warning = FALSE, message = FALSE)
                 #    fig.width = 20,
                  #    fig.asp = 0.6,
                   #   out.width = "100%")

load data

data <- read.csv("/Users/nuriteliash/Documents/GitHub/varroa_Ploidy/data/Ploidy.csv") %>%
  dplyr::mutate(Family = as.character(Family)) %>%
  dplyr::mutate(stage_mature = case_when(
    grepl("adult", Stage) ~ "Mature",
    !grepl("adult", Stage) ~ "Imature"))

# order the levels 
data$body.part <- factor(data$body.part, level=c("Body", "Anterior", "Posterior", "Legs","Hemolymph","Ovary","Testes"))

data$Stage <- factor(data$Stage, level=c("Larvae", "Protonymph", "Deuteronymph", "adult"))

data$Stage_original <- factor(data$Stage_original, level=c("Mom", "Son", "Mature","Daughter", "Deuteronymph", "Protonymph", "Larvae", "Immature"))

levels(data$Family) <- c(levels(data$Family), 0)
data$Family <- factor(data$Family, level= c("0", "1", "11","27","3","2","4", "5"))

p_family_adults = data %>% dplyr::filter(body.part %in% c("Body", "Ovary","Testes")) %>%
   dplyr::filter(Stage == "adult") %>%
   mutate_at("Family", ~replace_na(.,"0")) %>%
  ggplot(aes(y=Ploidy, x=Sex, fill = Sex, lable = Stage)) + 
 geom_boxplot(outlier.shape = NA, coef=0 ) +  theme_classic() +  geom_jitter(width=0.1, size=2) +
  facet_wrap(~body.part ) + 
      theme(axis.title.x = element_blank(),
            axis.text.x = element_blank(),
            axis.ticks = element_blank(),
    panel.border=element_rect(colour="black",size=1, fill = NA))+
ggtitle('Mite ploidy in differnet body parts') +  ylim(0, 3)

p_fam_body = data %>% dplyr::filter(body.part == "Body") %>%
 dplyr::filter(Stage %in% c("Larvae", "Protonymph", "Deuteronymph", "adult")) %>%
  ggplot(aes(y=Ploidy, x=Sex, fill = Sex, lable = Stage)) + 
 geom_boxplot(outlier.shape = NA, coef=0 ) +  theme_classic() +  geom_jitter(width=0.1, size=2) +
facet_wrap(~Stage, nrow = 1 ) + 
  ggtitle('Mite Ploidy in whole body, in differnet developmental stage') +
theme(axis.title.x = element_blank(),
            axis.text.x = element_blank(),
            axis.ticks = element_blank(),
    panel.border=element_rect(colour="black",size=1, fill = NA))+
  theme(legend.position='right')+  ylim(0, 3)

plot histograms

plot by family

p_allFam_body_adult = data %>% dplyr::filter(body.part == "Body") %>%
 dplyr::filter(Stage =="adult") %>%
 #   mutate_at("Family", ~replace_na(.,"0")) %>%
  na.omit() %>%
  ggplot(aes(y=Ploidy, x=Family, fill = Sex, lable = Stage)) + 
 geom_boxplot(outlier.shape = NA, coef=0 ) +  theme_bw() +  geom_jitter(width=0.1, size=2) +
#facet_wrap(~Stage ) + 
  ggtitle('Mite Ploidy in whole body, per family') +
   theme(axis.text.x = element_text(angle = 45)) +  theme(legend.position='right')+  ylim(0, 3)

p_fam_body_1_11_27_3 = data %>% dplyr::filter(body.part == "Body") %>%
  dplyr::filter(Family %in% c("1", "11","27","3")) %>%
  ggplot(aes(y=Ploidy, x=Stage_original, fill = Sex, lable = Stage_original)) + 
 geom_boxplot(outlier.shape = NA, coef=0 ) +  theme_bw() +  geom_jitter(width=0.1, size=2) +
  facet_wrap(~Family , nrow = 1) + ggtitle('Mite Ploidy per family') +
   theme(axis.text.x = element_text(angle = 45)) +  theme(legend.position='none')+  ylim(0, 3)

p_fam_body_2_4 = data %>% dplyr::filter(body.part == "Body") %>%
  dplyr::filter(Family %in% c("2","4")) %>%
  ggplot(aes(y=Ploidy, x=Stage_original, fill = Sex, lable = Stage_original)) + 
 geom_boxplot(outlier.shape = NA, coef=0 ) +  theme_bw() +  geom_jitter(width=0.1, size=2) +
  facet_wrap(~Family ) + ggtitle('Mite Ploidy per family') +
   theme(axis.text.x = element_text(angle = 45)) +  theme(legend.position='none')+  ylim(0, 3)

p_fam_body_5 = data %>% dplyr::filter(body.part == "Body") %>%
  dplyr::filter(Family == "5") %>%
  ggplot(aes(y=Ploidy, x=Stage_original, fill = Sex, lable = Stage_original)) + 
 geom_boxplot(outlier.shape = NA, coef=0 ) +  theme_bw() +  geom_jitter(width=0.1, size=2) +
  facet_wrap(~Family ) + ggtitle('Mite Ploidy per family') +
   theme(axis.text.x = element_text(angle = 45)) +  theme(legend.position='none')+  ylim(0, 3)

all developmental stages, males and females, whole body

all developmental stages, males and females, in different body parts

### Looking at specific families
the Ploidy of the male offspring varied, depends on the family
for some families ( 1, 11, 27 and 3) the females Ploidy was higher then males. while females looks diploid, males look haploid.
{=html} <div class="plotly html-widget html-fill-item-overflow-hidden html-fill-item" id="htmlwidget-558365cfa54a6dc0f58e" style="width:100%;height:288px;"></div> <script type="application/json" data-for="htmlwidget-558365cfa54a6dc0f58e">{"x":{"data":[{"x":[4,7,7,1,1],"y":[2.77,2.11,2.27,2.67,2.22],"hoverinfo":"y","type":"box","fillcolor":"rgba(248,118,109,1)","marker":{"opacity":null,"outliercolor":"rgba(0,0,0,1)","line":{"width":1.88976377952756,"color":"rgba(0,0,0,1)"},"size":5.66929133858268},"line":{"color":"rgba(51,51,51,1)","width":1.88976377952756},"name":"Female","legendgroup":"Female","showlegend":true,"xaxis":"x","yaxis":"y","frame":null},{"x":[5],"y":[2.68],"hoverinfo":"y","type":"box","fillcolor":"rgba(248,118,109,1)","marker":{"opacity":null,"outliercolor":"rgba(0,0,0,1)","line":{"width":1.88976377952756,"color":"rgba(0,0,0,1)"},"size":5.66929133858268},"line":{"color":"rgba(51,51,51,1)","width":1.88976377952756},"name":"Female","legendgroup":"Female","showlegend":false,"xaxis":"x2","yaxis":"y","frame":null},{"x":[7,7],"y":[2.14,2.25],"hoverinfo":"y","type":"box","fillcolor":"rgba(248,118,109,1)","marker":{"opacity":null,"outliercolor":"rgba(0,0,0,1)","line":{"width":1.88976377952756,"color":"rgba(0,0,0,1)"},"size":5.66929133858268},"line":{"color":"rgba(51,51,51,1)","width":1.88976377952756},"name":"Female","legendgroup":"Female","showlegend":false,"xaxis":"x3","yaxis":"y","frame":null},{"x":[5,8,1,6],"y":[2.83,2.44,2.47,2.7],"hoverinfo":"y","type":"box","fillcolor":"rgba(248,118,109,1)","marker":{"opacity":null,"outliercolor":"rgba(0,0,0,1)","line":{"width":1.88976377952756,"color":"rgba(0,0,0,1)"},"size":5.66929133858268},"line":{"color":"rgba(51,51,51,1)","width":1.88976377952756},"name":"Female","legendgroup":"Female","showlegend":false,"xaxis":"x4","yaxis":"y","frame":null},{"x":[2],"y":[1.45],"hoverinfo":"y","type":"box","fillcolor":"rgba(0,191,196,1)","marker":{"opacity":null,"outliercolor":"rgba(0,0,0,1)","line":{"width":1.88976377952756,"color":"rgba(0,0,0,1)"},"size":5.66929133858268},"line":{"color":"rgba(51,51,51,1)","width":1.88976377952756},"name":"Male","legendgroup":"Male","showlegend":true,"xaxis":"x","yaxis":"y","frame":null},{"x":[5],"y":[1.32],"hoverinfo":"y","type":"box","fillcolor":"rgba(0,191,196,1)","marker":{"opacity":null,"outliercolor":"rgba(0,0,0,1)","line":{"width":1.88976377952756,"color":"rgba(0,0,0,1)"},"size":5.66929133858268},"line":{"color":"rgba(51,51,51,1)","width":1.88976377952756},"name":"Male","legendgroup":"Male","showlegend":false,"xaxis":"x2","yaxis":"y","frame":null},{"x":[6],"y":[1.11],"hoverinfo":"y","type":"box","fillcolor":"rgba(0,191,196,1)","marker":{"opacity":null,"outliercolor":"rgba(0,0,0,1)","line":{"width":1.88976377952756,"color":"rgba(0,0,0,1)"},"size":5.66929133858268},"line":{"color":"rgba(51,51,51,1)","width":1.88976377952756},"name":"Male","legendgroup":"Male","showlegend":false,"xaxis":"x3","yaxis":"y","frame":null},{"x":[3,3],"y":[0.35,1.16],"hoverinfo":"y","type":"box","fillcolor":"rgba(0,191,196,1)","marker":{"opacity":null,"outliercolor":"rgba(0,0,0,1)","line":{"width":1.88976377952756,"color":"rgba(0,0,0,1)"},"size":5.66929133858268},"line":{"color":"rgba(51,51,51,1)","width":1.88976377952756},"name":"Male","legendgroup":"Male","showlegend":false,"xaxis":"x4","yaxis":"y","frame":null},{"x":[3.9756134676747,7.06453269934282,6.94158394122496,1.08700664462522,0.957692965492606],"y":[2.76853551113978,2.11239546691068,2.27189091973007,2.66799502392672,2.22222283916548],"text":["Stage_original: Daughter<br />Ploidy: 2.77<br />Sex: Female<br />Stage_original: Daughter","Stage_original: Larvae<br />Ploidy: 2.11<br />Sex: Female<br />Stage_original: Larvae","Stage_original: Larvae<br />Ploidy: 2.27<br />Sex: Female<br />Stage_original: Larvae","Stage_original: Mom<br />Ploidy: 2.67<br />Sex: Female<br />Stage_original: Mom","Stage_original: Mom<br />Ploidy: 2.22<br />Sex: Female<br />Stage_original: Mom"],"type":"scatter","mode":"markers","marker":{"autocolorscale":false,"color":"rgba(248,118,109,1)","opacity":1,"size":7.55905511811024,"symbol":"circle","line":{"width":1.88976377952756,"color":"rgba(0,0,0,1)"}},"hoveron":"points","name":"Female","legendgroup":"Female","showlegend":false,"xaxis":"x","yaxis":"y","hoverinfo":"text","frame":null},{"x":[4.940348975081],"y":[2.6769321193248],"text":"Stage_original: Deuteronymph<br />Ploidy: 2.68<br />Sex: Female<br />Stage_original: Deuteronymph","type":"scatter","mode":"markers","marker":{"autocolorscale":false,"color":"rgba(248,118,109,1)","opacity":1,"size":7.55905511811024,"symbol":"circle","line":{"width":1.88976377952756,"color":"rgba(0,0,0,1)"}},"hoveron":"points","name":"Female","legendgroup":"Female","showlegend":false,"xaxis":"x2","yaxis":"y","hoverinfo":"text","frame":null},{"x":[7.04111027559266,6.96258935853839],"y":[2.13665486165136,2.25364307536371],"text":["Stage_original: Larvae<br />Ploidy: 2.14<br />Sex: Female<br />Stage_original: Larvae","Stage_original: Larvae<br />Ploidy: 2.25<br />Sex: Female<br />Stage_original: Larvae"],"type":"scatter","mode":"markers","marker":{"autocolorscale":false,"color":"rgba(248,118,109,1)","opacity":1,"size":7.55905511811024,"symbol":"circle","line":{"width":1.88976377952756,"color":"rgba(0,0,0,1)"}},"hoveron":"points","name":"Female","legendgroup":"Female","showlegend":false,"xaxis":"x3","yaxis":"y","hoverinfo":"text","frame":null},{"x":[5.01546115037054,8.05386816002428,1.02379281395115,6.02708155023865],"y":[2.83126257833652,2.43927468978614,2.4698939820081,2.6993153342735],"text":["Stage_original: Deuteronymph<br />Ploidy: 2.83<br />Sex: Female<br />Stage_original: Deuteronymph","Stage_original: Immature<br />Ploidy: 2.44<br />Sex: Female<br />Stage_original: Immature","Stage_original: Mom<br />Ploidy: 2.47<br />Sex: Female<br />Stage_original: Mom","Stage_original: Protonymph<br />Ploidy: 2.70<br />Sex: Female<br />Stage_original: Protonymph"],"type":"scatter","mode":"markers","marker":{"autocolorscale":false,"color":"rgba(248,118,109,1)","opacity":1,"size":7.55905511811024,"symbol":"circle","line":{"width":1.88976377952756,"color":"rgba(0,0,0,1)"}},"hoveron":"points","name":"Female","legendgroup":"Female","showlegend":false,"xaxis":"x4","yaxis":"y","hoverinfo":"text","frame":null},{"x":[2.02439337428659],"y":[1.44908454359509],"text":"Stage_original: Son<br />Ploidy: 1.45<br />Sex: Male<br />Stage_original: Son","type":"scatter","mode":"markers","marker":{"autocolorscale":false,"color":"rgba(0,191,196,1)","opacity":1,"size":7.55905511811024,"symbol":"circle","line":{"width":1.88976377952756,"color":"rgba(0,0,0,1)"}},"hoveron":"points","name":"Male","legendgroup":"Male","showlegend":false,"xaxis":"x","yaxis":"y","hoverinfo":"text","frame":null},{"x":[5.07603218834847],"y":[1.31957596093044],"text":"Stage_original: Deuteronymph<br />Ploidy: 1.32<br />Sex: Male<br />Stage_original: Deuteronymph","type":"scatter","mode":"markers","marker":{"autocolorscale":false,"color":"rgba(0,191,196,1)","opacity":1,"size":7.55905511811024,"symbol":"circle","line":{"width":1.88976377952756,"color":"rgba(0,0,0,1)"}},"hoveron":"points","name":"Male","legendgroup":"Male","showlegend":false,"xaxis":"x2","yaxis":"y","hoverinfo":"text","frame":null},{"x":[5.96476017856039],"y":[1.10958476949856],"text":"Stage_original: Protonymph<br />Ploidy: 1.11<br />Sex: Male<br />Stage_original: Protonymph","type":"scatter","mode":"markers","marker":{"autocolorscale":false,"color":"rgba(0,191,196,1)","opacity":1,"size":7.55905511811024,"symbol":"circle","line":{"width":1.88976377952756,"color":"rgba(0,0,0,1)"}},"hoveron":"points","name":"Male","legendgroup":"Male","showlegend":false,"xaxis":"x3","yaxis":"y","hoverinfo":"text","frame":null},{"x":[2.90167846293189,3.0212959880475],"y":[0.351222872728482,1.16391326960735],"text":["Stage_original: Mature<br />Ploidy: 0.35<br />Sex: Male<br />Stage_original: Mature","Stage_original: Mature<br />Ploidy: 1.16<br />Sex: Male<br />Stage_original: Mature"],"type":"scatter","mode":"markers","marker":{"autocolorscale":false,"color":"rgba(0,191,196,1)","opacity":1,"size":7.55905511811024,"symbol":"circle","line":{"width":1.88976377952756,"color":"rgba(0,0,0,1)"}},"hoveron":"points","name":"Male","legendgroup":"Male","showlegend":false,"xaxis":"x4","yaxis":"y","hoverinfo":"text","frame":null}],"layout":{"margin":{"t":62.2709284627093,"r":7.30593607305936,"b":72.664749510202,"l":31.4155251141553},"plot_bgcolor":"rgba(255,255,255,1)","paper_bgcolor":"rgba(255,255,255,1)","font":{"color":"rgba(0,0,0,1)","family":"","size":14.6118721461187},"title":{"text":"Mite Ploidy per family","font":{"color":"rgba(0,0,0,1)","family":"","size":17.5342465753425},"x":0,"xref":"paper"},"xaxis":{"domain":[0,0.239128071319852],"automargin":true,"type":"linear","autorange":false,"range":[0.4,8.6],"tickmode":"array","ticktext":["Mom","Son","Mature","Daughter","Deuteronymph","Protonymph","Larvae","Immature"],"tickvals":[1,2,3,4,5,6,7,8],"categoryorder":"array","categoryarray":["Mom","Son","Mature","Daughter","Deuteronymph","Protonymph","Larvae","Immature"],"nticks":null,"ticks":"outside","tickcolor":"rgba(51,51,51,1)","ticklen":3.65296803652968,"tickwidth":0.66417600664176,"showticklabels":true,"tickfont":{"color":"rgba(77,77,77,1)","family":"","size":11.689497716895},"tickangle":-45,"showline":false,"linecolor":null,"linewidth":0,"showgrid":true,"gridcolor":"rgba(235,235,235,1)","gridwidth":0.66417600664176,"zeroline":false,"anchor":"y","title":"","hoverformat":".2f"},"annotations":[{"text":"Stage_original","x":0.5,"y":0,"showarrow":false,"ax":0,"ay":0,"font":{"color":"rgba(0,0,0,1)","family":"","size":14.6118721461187},"xref":"paper","yref":"paper","textangle":-0,"xanchor":"center","yanchor":"top","annotationType":"axis","yshift":-47.5810356593649},{"text":"Ploidy","x":0,"y":0.5,"showarrow":false,"ax":0,"ay":0,"font":{"color":"rgba(0,0,0,1)","family":"","size":14.6118721461187},"xref":"paper","yref":"paper","textangle":-90,"xanchor":"right","yanchor":"center","annotationType":"axis","xshift":-16.0730593607306},{"text":"1","x":0.119564035659926,"y":1,"showarrow":false,"ax":0,"ay":0,"font":{"color":"rgba(26,26,26,1)","family":"","size":11.689497716895},"xref":"paper","yref":"paper","textangle":-0,"xanchor":"center","yanchor":"bottom"},{"text":"11","x":0.375,"y":1,"showarrow":false,"ax":0,"ay":0,"font":{"color":"rgba(26,26,26,1)","family":"","size":11.689497716895},"xref":"paper","yref":"paper","textangle":-0,"xanchor":"center","yanchor":"bottom"},{"text":"27","x":0.625,"y":1,"showarrow":false,"ax":0,"ay":0,"font":{"color":"rgba(26,26,26,1)","family":"","size":11.689497716895},"xref":"paper","yref":"paper","textangle":-0,"xanchor":"center","yanchor":"bottom"},{"text":"3","x":0.880435964340074,"y":1,"showarrow":false,"ax":0,"ay":0,"font":{"color":"rgba(26,26,26,1)","family":"","size":11.689497716895},"xref":"paper","yref":"paper","textangle":-0,"xanchor":"center","yanchor":"bottom"}],"yaxis":{"domain":[0,1],"automargin":true,"type":"linear","autorange":false,"range":[-0.15,3.15],"tickmode":"array","ticktext":["0","1","2","3"],"tickvals":[0,1,2,3],"categoryorder":"array","categoryarray":["0","1","2","3"],"nticks":null,"ticks":"outside","tickcolor":"rgba(51,51,51,1)","ticklen":3.65296803652968,"tickwidth":0.66417600664176,"showticklabels":true,"tickfont":{"color":"rgba(77,77,77,1)","family":"","size":11.689497716895},"tickangle":-0,"showline":false,"linecolor":null,"linewidth":0,"showgrid":true,"gridcolor":"rgba(235,235,235,1)","gridwidth":0.66417600664176,"zeroline":false,"anchor":"x","title":"","hoverformat":".2f"},"shapes":[{"type":"rect","fillcolor":"transparent","line":{"color":"rgba(51,51,51,1)","width":0.66417600664176,"linetype":"solid"},"yref":"paper","xref":"paper","x0":0,"x1":0.239128071319852,"y0":0,"y1":1},{"type":"rect","fillcolor":"rgba(217,217,217,1)","line":{"color":"rgba(51,51,51,1)","width":0.66417600664176,"linetype":"solid"},"yref":"paper","xref":"paper","x0":0,"x1":0.239128071319852,"y0":0,"y1":23.37899543379,"yanchor":1,"ysizemode":"pixel"},{"type":"rect","fillcolor":"transparent","line":{"color":"rgba(51,51,51,1)","width":0.66417600664176,"linetype":"solid"},"yref":"paper","xref":"paper","x0":0.260871928680148,"x1":0.489128071319852,"y0":0,"y1":1},{"type":"rect","fillcolor":"rgba(217,217,217,1)","line":{"color":"rgba(51,51,51,1)","width":0.66417600664176,"linetype":"solid"},"yref":"paper","xref":"paper","x0":0.260871928680148,"x1":0.489128071319852,"y0":0,"y1":23.37899543379,"yanchor":1,"ysizemode":"pixel"},{"type":"rect","fillcolor":"transparent","line":{"color":"rgba(51,51,51,1)","width":0.66417600664176,"linetype":"solid"},"yref":"paper","xref":"paper","x0":0.510871928680148,"x1":0.739128071319852,"y0":0,"y1":1},{"type":"rect","fillcolor":"rgba(217,217,217,1)","line":{"color":"rgba(51,51,51,1)","width":0.66417600664176,"linetype":"solid"},"yref":"paper","xref":"paper","x0":0.510871928680148,"x1":0.739128071319852,"y0":0,"y1":23.37899543379,"yanchor":1,"ysizemode":"pixel"},{"type":"rect","fillcolor":"transparent","line":{"color":"rgba(51,51,51,1)","width":0.66417600664176,"linetype":"solid"},"yref":"paper","xref":"paper","x0":0.760871928680148,"x1":1,"y0":0,"y1":1},{"type":"rect","fillcolor":"rgba(217,217,217,1)","line":{"color":"rgba(51,51,51,1)","width":0.66417600664176,"linetype":"solid"},"yref":"paper","xref":"paper","x0":0.760871928680148,"x1":1,"y0":0,"y1":23.37899543379,"yanchor":1,"ysizemode":"pixel"}],"xaxis2":{"type":"linear","autorange":false,"range":[0.4,8.6],"tickmode":"array","ticktext":["Mom","Son","Mature","Daughter","Deuteronymph","Protonymph","Larvae","Immature"],"tickvals":[1,2,3,4,5,6,7,8],"categoryorder":"array","categoryarray":["Mom","Son","Mature","Daughter","Deuteronymph","Protonymph","Larvae","Immature"],"nticks":null,"ticks":"outside","tickcolor":"rgba(51,51,51,1)","ticklen":3.65296803652968,"tickwidth":0.66417600664176,"showticklabels":true,"tickfont":{"color":"rgba(77,77,77,1)","family":"","size":11.689497716895},"tickangle":-45,"showline":false,"linecolor":null,"linewidth":0,"showgrid":true,"domain":[0.260871928680148,0.489128071319852],"gridcolor":"rgba(235,235,235,1)","gridwidth":0.66417600664176,"zeroline":false,"anchor":"y","title":"","hoverformat":".2f"},"xaxis3":{"type":"linear","autorange":false,"range":[0.4,8.6],"tickmode":"array","ticktext":["Mom","Son","Mature","Daughter","Deuteronymph","Protonymph","Larvae","Immature"],"tickvals":[1,2,3,4,5,6,7,8],"categoryorder":"array","categoryarray":["Mom","Son","Mature","Daughter","Deuteronymph","Protonymph","Larvae","Immature"],"nticks":null,"ticks":"outside","tickcolor":"rgba(51,51,51,1)","ticklen":3.65296803652968,"tickwidth":0.66417600664176,"showticklabels":true,"tickfont":{"color":"rgba(77,77,77,1)","family":"","size":11.689497716895},"tickangle":-45,"showline":false,"linecolor":null,"linewidth":0,"showgrid":true,"domain":[0.510871928680148,0.739128071319852],"gridcolor":"rgba(235,235,235,1)","gridwidth":0.66417600664176,"zeroline":false,"anchor":"y","title":"","hoverformat":".2f"},"xaxis4":{"type":"linear","autorange":false,"range":[0.4,8.6],"tickmode":"array","ticktext":["Mom","Son","Mature","Daughter","Deuteronymph","Protonymph","Larvae","Immature"],"tickvals":[1,2,3,4,5,6,7,8],"categoryorder":"array","categoryarray":["Mom","Son","Mature","Daughter","Deuteronymph","Protonymph","Larvae","Immature"],"nticks":null,"ticks":"outside","tickcolor":"rgba(51,51,51,1)","ticklen":3.65296803652968,"tickwidth":0.66417600664176,"showticklabels":true,"tickfont":{"color":"rgba(77,77,77,1)","family":"","size":11.689497716895},"tickangle":-45,"showline":false,"linecolor":null,"linewidth":0,"showgrid":true,"domain":[0.760871928680148,1],"gridcolor":"rgba(235,235,235,1)","gridwidth":0.66417600664176,"zeroline":false,"anchor":"y","title":"","hoverformat":".2f"},"showlegend":false,"legend":{"bgcolor":"rgba(255,255,255,1)","bordercolor":"transparent","borderwidth":1.88976377952756,"font":{"color":"rgba(0,0,0,1)","family":"","size":11.689497716895}},"hovermode":"closest","barmode":"relative"},"config":{"doubleClick":"reset","modeBarButtonsToAdd":["hoverclosest","hovercompare"],"showSendToCloud":false},"source":"A","attrs":{"67301f9930e8":{"x":{},"y":{},"fill":{},"lable":{},"type":"box"},"6730259df8d":{"x":{},"y":{},"fill":{},"lable":{}}},"cur_data":"67301f9930e8","visdat":{"67301f9930e8":["function (y) ","x"],"6730259df8d":["function (y) ","x"]},"highlight":{"on":"plotly_click","persistent":false,"dynamic":false,"selectize":false,"opacityDim":0.2,"selected":{"opacity":1},"debounce":0},"shinyEvents":["plotly_hover","plotly_click","plotly_selected","plotly_relayout","plotly_brushed","plotly_brushing","plotly_clickannotation","plotly_doubleclick","plotly_deselect","plotly_afterplot","plotly_sunburstclick"],"base_url":"https://plot.ly"},"evals":[],"jsHooks":[]}</script>

for other families ( 2 and 4) the females Ploidy was similar to that of the male offspring.


in one family (number 5) the male offspring Ploidy was mixed:
one males look diploid, and the other two look haploid.