DOI: 10.6084/m9.figshare.29657138
title: Data and scripts associated with the manuscript <i>The genetic basis of natural variation in sociability</i>

description: repository for data and scripts for:Arteen Torabi-Marashi, Dania Daanish, Andrew M Scott, Reuven Dukas, Ian Dworkin, The genetic basis of natural variation in sociability, <i>Evolution</i>, 2025;, qpaf158, https://doi.org/10.1093/evolut/qpaf158This repository contains the static version of data and scripts at time of acceptance. It is cloned from its github repohttps://github.com/DworkinLab/DrosophilaSociabilityTranscriptomicsBelow is the readme# DrosophilaSociabilityTranscriptomics<br>This is the repository for data and scripts for the manuscript:<br>Torabi-Marashi A, Daanish D, Scott AM, Dukas R & Dworkin I. 2025. The genetic basis of natural variation in sociability. Accepted. *Evolution*. (DD and ATM co-first authors).<br>This repository contains data and scripts to perform the analyses in the paper.<br><br><br>## Directory Structure<br>Below is a breakdown of all the directories and subdirectories in this repo.<br>### Data<br>#### Phenotypic<br>`DD_SociabilityScores_AllCrosses_ID_formatted.csv` Contains the behavioural data from the RNAi perturbation experiments of candidate genes.<br>`Construct_meta_data_ID.csv` Contains information on some of the meta-data of the experiment and additional information about the constructs used.<br>#### salmon/quants<br>Outputs from Salmon, to be used as input into RNAseq analyses<br>#### star<br>Output from Star, as counts per sample (star_counts) and merged count matrix<br><br>### IntermediateData<br>#### DGE<br>Intermediate results from differential gene expression analysis. Rdata result objects from modelling and emmeans from all contrasts and methods (star/salmon).<br>Gene lists from Shpigler et al., 2017, Wang et al ., 2022, Woodard et al ., 2011 and Bralten et al., 2021.<br>There are also fastqc/multiqc reports and Transcript Integrity Number intermediate files.<br>#### DTU<br>Intermediate results from differential transcript usage analysis. Rdata result objects from modelling and emmeans from all contrasts.<br>### Misc<br>Contains naming convention used for samples, and number of reads per sample.<br>The sub-folder `SupplementalFiles` has the same supplemental files as associated with the paper on the journal website.<br>`Supp_File_1_RNASEQ_TIN_values_by_sample.csv` Contains the estimated Transcript Integrity Number (TIN) by sample.<br>`Supp_File_2_DTU_contrasts_by_transcript_filtered_gene_list.csv` Contains the contrasts for Differential Transcript Usage (DTU) analysis.<br>`Supp_File_5_DTU_Low_vs_High_CandidategeneList_annotated.csv` Annotated list of DTU genes.<br>`Supp_File_3_DEGenes_TopLowVsHigh_ReactionNorms.pdf` PDF of figures for interaction plots for differentially expressed genes.<br>`Supp_File_4_DTU_Transcripts_TopLowVsHigh_ReactionNorms.pdf` PDF of figures for interactions for Differential Transcript Usage between low and high sociability treatments.<br>`Supp_File_6_Overlapping_DTU_DGE.csv` Genes that overlap from the DTU and DGE analyses.<br>transcript: transcript identifier from flybase<br>geneID: gene identifier from flybase<br>geneName: gene name from flybase<br>Comparison: The comparison for which the DTU and DGE overlap. L is Low, H is High, C is control, A is All. So LVH means Low vs High<br>#### SequencingExcel/Sociability_RNAVarious misc data produced following sequencing.<br>##### md5/SociabilityRNA<br>md5 checksums for fastq files produced from sequencing.<br><br>### Outputs<br>#### DGE<br>Gene lists for all contrasts produced from differential gene expression analysis.<br>PDFs plotting the top gene expression levels across different selections.<br>Supplemental PCA plotting<br>Transcript integrity number outputs.<br><br>#### DTU<br>Gene lists for all contrasts produced from differential transcript usage analysis.<br>PDFs plotting the top gene and transcript expression levels across different selections.<br>### Scripts<br>#### DGE<br>**DGE_selection_extraction.R** - pulling contrasts output from modelling and writing out top genes in contrasts<br>**PCA_plotting_corrected_July2023.Rmd** - plotting PCA<br>**Plotting_DTU_DGE_densityPlots.R** - density plot for DGE and DTU estimates<br>**Proper_MAPlots.R** - plotting MA plots<br>**SocPaperFigures_2023.Rmd** - merged various plots - including MA plots, PCA plots, correlation plotting and upset plots<br>**dgePlotting_sexColoured.Rmd** - plotting reaction norms of DE genes, coloured by sex<br>**gauss_downVup_DGE.R** - glmmTMB mixed model with guassian distribution with salmon counts<br>**geneCuration_plottingOtherStudies.Rmd** - reaction norms for contrasts (and comparison to other studies)<br>**gene_curations.R** - subsetting gene list for relevant phenotypes, and overlap with other studies<br>**klaR_rda_Females_splitBySex.R** - Reduced discriminant analysis in female samples<br>**klaR_rda_Males_splitBySex.R** - Reduced discriminant analysis in male samples<br>**klaR_rda_cv.R** - Reduced discriminant analysis in all samples<br>**nbinom_downVup_DGE.R** - glmmTMB mixed model with negative binomial distribution with salmon counts<br>**nbinom_salmon_DGE_selection_extraction.R** - gene list for negative binomial glmmTMB model results with salmon<br>**plotting_top_genes_upVdown_August2023.Rmd** - reaction norms for largest absolute log2(cpm) genes in low versus high contrast<br>**star_DGE_selection_extraction.R** - gene list for gaussian glmmTMB model results with salmon<br>**star_gauss_downVup_DGE.R** - glmmTMB mixed model with guassian distribution with star counts<br>**star_nbinom_DGE_selection_extraction.R** - gene list for negative binomial glmmTMB model results with star counts<br>**star_nbinom_downVup_DGE.R** - glmmTMB mixed model with negative binomial distribution with star counts<br>#### DTU<br>**DTU.R** - glmmTMB mixed model for differential transcript usage with guassian distribution with salmon counts<br>**dtu_extraction.R** - gene list for glmmTMB DTU model results with salmon counts<br>**plotting_top_DTU_genes_lowVhigh_REPLICATE_LINEAGE_SEX.Rmd** - reaction norms for largest absolute log2(cpm) genes in low versus high contrast<br>**plottingtopDTUGenes.Rmd** - reaction norms for low versus high sociability gene list<br>#### phenotypic<br>**DD_SociabilityRNAiCrosses_Nov2024_ID.Rmd** - Analysis for the RNAi perturbation crosses.<br>#### Unix<br>**STAR_index.sh** - index genome for star<br>**calc_tin_check.sh** - calculate TIN with rseqc<br>**fastqc_loop_raw_reads.sh** - fastqc for all raw reads and skip if read already has report generated<br>**fastqc_trimmed_reads.sh** - fastqc for all trimmed reads and skip if read already has report generated<br>**multiqc.sh** - collapse fastqc reports into single report<br>**qorts_loop.sh** - generate QC report of star mapped counts (as bams) with QoRTs<br>**salmon.sh** - loop to quantify gene expression with salmon, and skip if sample has already been quantified<br>**star.sh** - loop to align reads with STAR, and skip if sample has already been aligned<br>**trim_check.sh** - loop to trim all reads and skip if read has already been trimmed