This code was used to create the nucleosome classifications used in the manuscript.
The starting point is a WIG file that contains the chrom readStart readStop with a tab deliminator for each aligned read in a sample. (One line per read in the file; one file per sequenced library.)
To call nucleosomes from samples, run the "nuc_caller.R" script, which will execute the readDyadCount, csv_gen, and GaussianSmooth_nonDB Perl scripts. The scripts rely upon a file containing the Gaussian weights (the provided GAUSS_0_10_3 includes weights for a curve with a mean of 0, a standard deviation of 10, and a width of 3 standard deviations) and a file containing the start and stop coordinates for each chromosome (e.g., "sacCer1"). The output file will contain the information for each nucleosome called.
Two sets of called nucleosomes (for instance, time point A and B of a single experiment) can be compared to identify the likelihood that each nucleosome (a) overlaps with another nucleosome in the matched time point and (b) the likelihood that the nucleosomes have identical position and occupancy distributions. Running "assign_pvalues.R" will compare these two files and output a file with the associated p-values.
This output can be used as input to "compare3Reps.R" or "compare4Reps.R" in order to identify nucleosomes that show a consistent behavior with regard to position or occupancy within biological replicates (for instance, across a strain). These files will output a separate file for each category of nucleosome behavior.
These files can be compared across experiments (e.g., strains) using "compareSources.R", which will identify nucleosomes that behave differently in the two experiments.