# Generating Distribution Charts and Cumulative Plots for GRNmap Weight Values in SPSS

This page outlines how to generate histograms and cumulative plots showing the distribution of regulatory weights present in Gene Regulatory Networks (GRNs) modeled with GRNmap. Specifically, the protocol written below was used to visualize the weight distributions for db1-db6 using SPSS. The results of this analysis can be found here.

Note: The instructions below were written using SPSS Statistics Version 21.

## Step 1: Preparing the Data for Input into SPSS

Prior to beginning this analysis, use GRNmap to model the dynamics of the networks that you would like to analyze. Once this has been done, extract regulatory weight values from the "network_optimized_weights" tab found in the GRNmap output sheet. Although these values can be extracted using various different methods, you want to end up with a single column containing each of the weight values. One technique would be to transform the weighted adjacency matrix found in the "network_optimized_weights" tab into an edge list. Once this process has been completed, paste the single column containing all of the regulatory weights from the network into column A within a new excel file. Label the first sheet in this workbook "weight_value_conversions". Label cell A1 with the name of the network from which the weight values were derived. Then highlight column A and navigate to "Sort & Filter"-> "Sort Smallest to Largest". Assess the smallest and largest values present at the top and bottom of the column, respectively. Determine which value has the largest absolute value and note the designation of this cell (e.g. A29). Label cell B1 with the name of the network followed by "_scaled_normalized". In cell B2, write the formula: =(A2/ABS($A$__))*99.99. Replace the underscores with the number of the cell documented previously that contained the regulatory weight with the largest absolute value. Then press enter. In cell B3, repeat this process and also change A2 to A3 in the formula. Then press enter. Now highlight cells B2 and B3. Double click the black square at the bottom right hand corner of the highlighted region to automatically extend this formula for scaling and normalization to the remainder of the weight values. Doing so should leave you with column B having been expanded to match column A in length and containing values ranging from -99.99 to +99.99. This process normalized all of the regulatory weights to the largest weight value in the network and then multiplied by 99.99 so that the weights will be distributed from -100 to 100 in the final graphics.

Create a second sheet in the excel workbook and label it "SPSS_input". Copy the contents of column B. Then right-click on cell A1 in the new "SPSS_input" sheet and select "Paste Special..."-> "Values". This will copy the numbers from column B over without copying the formulas existing internally within the original cells. Now label cell B1 with the network name followed by "_coding". In this column, enter a 0 if the weight value in the adjacent cell of column A is negative or enter a 1 if this adjacent regulatory weight is positive. Alternatively, this coding can be expanded to include a third value if you would like to show low influence regulatory weights (labeled grey in GRNsight). Once the coding column has been completely filled out, the data is ready to be imported into SPSS.