Write output file with selected loci

selectedLoci <- na.omit(nomissing_fdat[nomissing_fdat$FST >= cutoff,])

ggplot(selectedLoci, aes(x=POS/1000000, y=(FST), color=as.factor(selectedLoci$CHR))) +
  geom_point(shape = 16, size = 1)+
  scale_y_continuous(limits=c(0,1.1))+
  #scale_color_manual(values=chrom.cols)+
  xlab("Alignment position (Mbp)")+
  ylab(bquote(paste(italic('F'['ST']*' ')))) +
  geom_hline(yintercept = c(cutoff), linetype = "dashed", size = 0.5, color = "gray35") +
  theme(legend.position="none", text = element_text(size=12), panel.grid.major = element_blank(), panel.grid.minor = element_blank(),
        panel.background = element_blank(), axis.line = element_line(colour = "black"))

write.csv(selectedLoci, "/Users/tanyalama/Box/project_canada_lynx_wgs/SelectedLoci_circ_therm_genelist_6SV.csv")