### Supplementary Data 22: R code used to identify the sex of the publicly available T. sylvina individual. ### ##################################### # Set parameter and input file here # ##################################### mypath= #Absolute path to Supplementary Table mySupp="SupplementaryData_21” #Name of Supplementary Table ############## # Do the job # ############## #Identify sex based on contig classification before adding the publicly available T. sylvina individual x <- read.table(paste(mypath,"/",mySupp,sep=""),h=T) xAut <- subset(x, Class_beforeExtra == "autosome") xSex <- subset(x, Class_beforeExtra == "sexchrom") w <- wilcox.test(x=xAut$CovExtra,y=xSex$CovExtra,alternative="less",conf.level=level) pvalw <- round(w$p.value,5) #Plot raw dataset with cut-off values pdf(file=paste(mypath,"/SuppFigTsylSex.pdf",sep=""),w=5,h=5) plot(x$CovExtra ~ x$Class_beforeExtra,col=c("#0000FF40","#FF000040"),xlab="Contig classification before adding the extra individual",ylab="Coverage of the extra individual",ylim=c(0,10),notch=T) mtext(3,text=paste("Wilcoxon p-value = ",pvalw,sep=""),adj=0,padj=-4.5) mtext(3,text=paste("median Autosome = ",median(xAut$CovExtra,na.rm=T),sep=""),adj=0,padj=-2.5) mtext(3,text=paste("median Sex Chrom = ",median(xSex$CovExtra,na.rm=T),sep=""),adj=0,padj=-0.5) graphics.off()