This file describes the workflow used in the analysis of these data. I. DEMULTIPLEXING Raw files were demultiplexed using stacks. Raw sequencing reads off the Illumina machine were demultiplexed using the following bash scripts: 1. run_process_C57C_rerun.sbatch demultiplexed data from the Illumina 2000, along with a few sequences from the 2500. 2. run_process_HA90.sbatch demultiplexed the bulk of the data from the Illumina 2500. 3. run_process_H0CP.sbatch demultiplexed some C. sjostedti reads from the Illumina 2500. 4. run_process_H14A.sbatch demultiplexed C. mimosae, C. nigriceps, and T. penzigi reads from the Illumina 2500. Multiplexed libraries, named GYN1-GYN6 (on flowcell C57C), GYN7-GYN8, GYNR1 and GYNR2 (on flowcell HA90), CSC (on flowcell H0CP), and CMC, CNC, and MISC1 (on flowcell H14A) were spread across multiple lanes, and so multiple fastq files formed the input for the demultiplexing step. Each multiplexed library had its files in a single directory of the appropriate name (i.e., GYN1 libraries were in a directory called GYN1/, etc). II. READ CLEANING Read cleaning consists of two steps. 1. Reads from each individual ant output by Step I were trimmed using fastx_trimmer. This was run multiple times by the perl script fastx_trimmer_loop.pl. fastx_trimmer_loop.pl was in turn run by the bash scripts run_trimmer_[ID].sbatch 2. Trimmed reads were then filtered using fastq_quality_filter. This was run multiple times by the perl script fastx_filter_loop.pl. fastx_filter_loop.pl was in turn run by the bash scripts run_filter_[ID].sbatch. This step produced filtered reads for each individual ant which are found in the SRA entry. III. STACKS 1. We used the Stacks script denovo_map.pl to assemble loci within and across individual ants. We did so separately for each species. This step included some individual ants for each species which were later excluded from the analysis because they did not have sequences at a sufficient number of loci. Within each species, we tried a variety of parameters, resulting in multiple different calls of denovo_map.pl. Bash scripts used to call denovo_map.pl are named [species].run_denovo_[parameters].sbatch. Population input files are named populations_denovo([species]). 2. After pruning the data set of low-coverage individuals, we then ran the Stacks populations program to call genotypes, outputting a genepop formatted file. As above, we did this within each species under a variety of parameters. The bash scripts used to call populations are called [species].run_populations_[run id and parameters].sbatch. The population input file for stacks are named populations_[run]M5n5([species]). 3. The genepop-format output files produced by this step are named [species]_[parameters].gen. 4. Number of SNPs and missing data were calculated with our perl script genepopper.pl. 5. Heterozygosities were calculated in R using the script testing_heterozygosities.R. IV. COLONY 1. The genotypes output by stacks were then used to determine the relationships between ants using COLONY. The input and output of these runs may be found in the directories named [species]_M5n5. These results are summarized in Colony_results.xslx and colony_data.txt. Statistical tests comparing species are described in polygyny_analysis.R. Genepop-formatted files were converted to a format appropriate for input to colony using convert_genepop_to_colony2.pl. 2. To compare relatedness of queens, we re-ran the previous analysis, excluding the possibility that ants from different trees were related. The input and output of these COLONY runs are found in the directories named [species]_M5n5_exsib. To produce a file instructing genepop to exclude the possibility of sibship across colonies, we used excluded_maternal_sibship_writer.pl. 3. The imputed maternal genotypes from those runs were then run in a final COLONY analysis, as shown in the directories [species]_M5n5_IMG. Analysis of these results is shown in looking_at_maternal_relatedness.R. To convert imputed maternal genotypes, and exclude those genotypes for which there was insufficient support, we converted the results to a genepop formatted file using convert_colony_IMG_to_genepop.pl, then back to a COLONY-appropriate format using convert_genepop_to_colony2.pl. V. RELATEDNESS 1. We used R to produce similated data based on the genotypes produced above, as shown in looking_at_relatedness_picking_a_method.R. The real genotypes used as a basis for the simulated genotypes, and for the other analyses, are given as [species and run].COLONY.txt. For C. nigriceps, one queen ant was found in the COLONY analysis to be the mother to the workers, and so was removed from the data set for the purposes of these analyses. Simulated genotypes are given as [species].Fam_Sim. 2. Within- and between- colony relatedness were then calculated in R as described in prepping_related_files.R and inter_intra.R