DOI: 10.5061/dryad.qjq2bvqq6
title: Code used in MATLAB and R for the purpose of generating HX difference plots and HX ribbon plots

description: PARP1 and PARP2 recognize DNA breaks immediately upon their formation,
 generate a burst of local PARylation to signal their location, and are
 co-targeted by all current FDA-approved forms of PARP inhibitors (PARPi)
 used in the cancer clinic. Recent evidence indicates that the same PARPi
 molecules impact PARP2 differently from PARP1, raising the possibility
 that allosteric activation may also differ. We find that unlike for PARP1,
 destabilization of the autoinhibitory domain of PARP2 is insufficient for
 DNA damage-induced catalytic activation. Rather, PARP2 activation requires
 further unfolding of an active site helix. In contrast, the corresponding
 helix in PARP1 only transiently forms, even prior to engaging DNA. Only
 one clinical PARPi, Olaparib, stabilizes the PARP2 active site helix,
 representing a structural feature with the potential to discriminate small
 molecule inhibitors. Collectively, our findings reveal unanticipated
 differences in local structure and changes in activation-coupled backbone
 dynamics between human PARP1 and PARP2.
description: HDExaminer software (v 2.5.0) was used, which uses peptide pool
 information to identify the deuterated peptides for every sample in the
 HXMS experiment. The quality of each peptide was further assessed by
 manually checking mass spectra. The level of HX of each reported
 deuterated peptide is corrected for loss of deuterium label (back-exchange
 after quench) during HXMS data collection by normalizing to the maximal
 deuteration level of that peptide in the fully-deuterated (FD) samples.
 After normalizing, we then compared the extent of deuteration to the
 theoretical maximal deuteration (maxD, i.e. if no back-exchange occurs).
 The data analysis statistics for all the protein states are in Table S2 of
 Smith-Pillet et al., Mol cell 2025. The difference plots for the
 deuteration levels between any two samples were obtained through an
 in-house script written in MATLAB. The script compares the deuteration
 levels between two samples (e.g. PARP2 and PARP2 with 5’P nicked DNA) and
 plots the percent difference of each peptide, by subtracting the percent
 deuteration of PARP2 with 5’P nicked DNA from PARP2 and plotting according
 to the color legend in stepwise increments. The plot of representative
 peptide data is shown as the mean of three independent measurements +/-
 SD. Statistical analysis included a t-test with a P-value &lt;0.05. HX
 experiments of PARP1 with or without DNA and/or EB-47 have been published.
 To compare PARP1 and PARP2 datasets, HX samples of PARP1 were repeated in
 triplicate to have the same peptide digestions and subsequent peptide
 data, and HX changes in HD peptides were compared between PARP1 and PARP2
 with the indicated conditions. HXMS data at 100 s for PARP2 and in the
 presence of gap DNA, 5’OH nicked DNA, and 5’P nicked DNA was plotted
 through an in-house script written in R (see Fig. S1A in Smith-Pillet et
 al., Mol cell 2025). 
description: # Code used in MATLAB and R for the purpose of generating HX difference
 plots and HX ribbon plots This file was generated on 2024-05-15 by E.
 Selma Smith ## Description of the data and file structure HDexaminer is a
 software package used for hydrogen/deuterium exchange mass spectrometry
 (HXMS) analysis.  HDexaminer takes MS data (.raw) and calculates the
 deuteration level of measured peptides, which are compared across two
 protein states. The resulting calculations and measurements sample are
 exported in a .csv result file. This .csv result file is the input of the
 ribbon plot (Rstudio) and the difference plot (MATLAB).  Code for ribbon
 plots (R) was used to define the % deuteration per peptide in triplicate
 samples of WT PARP2 without or with 5'P nicked DNA, 5'OH nicked
 DNA, gap DNA, or 5'P nicked DNA and HPF1, N116A PARP2 with or without
 5'P nicked DNA, I318A PARP2 (no DNA), and A762 PARP1 with or without
 5'P nicked DNA and/or EB-47 (see Smith-Pillet *et al.,* Mol Cell
 2025). Each bar represents a peptide within the dataset, colored based on
 % deuteration. Ribbon plot code constituents: 1.
 ribbon_maker_functions_2.R  --&gt; Contains functions used by
 ribbon_maker.Rmd that calculate the number of deuterons of the fully
 deuterated (FD) control peptide.  2. ribbon_maker_functions.R--&gt;
 Contains functions used by ribbon_maker.Rmd that calculate the number of
 deuterons in the HX sample peptide, relative to the fully deuterated (FD)
 control peptide.  3. LUT_ribbon-colors.csv --&gt; Contains coloring legend
 scheme for  ribbon_maker.Rmd in RGB 4. generate_dataframes.R --&gt;
 contains functions used by ribbon_maker.Rmd to identify peptides based on
 start, end, and charge state (cs)  5. hx-datafiles.csv --&gt; contains
 directory where filenames of the .csv files exported from HDexaminer
 should be placed.  6. ribbon_maker.Rmd --&gt; Contains code that generates
 ribbon plot. HX timepoints, plot filetype, plot filename, plot dpi, plot
 width, plot height, and multiple other formatting details, can be
 customized in this file.  How to use files (.csv, exported from
 HDexaminer) in ribbon plot code:  1. Create a folder titled
 "scripts". Folder should include: * ribbon_maker_functions_2.R 
 --&gt; Contains functions used by ribbon_maker.Rmd *
 ribbon_maker_functions.R--&gt; Contains functions used by ribbon_maker.Rmd
 * LUT_ribbon-colors.csv --&gt; Contains coloring legend scheme *
 generate_dataframes.R --&gt; contains functions used by ribbon_maker.Rmd
 2. In folder titled "HDExaminer_csv". Folder should include: *
 .Rhistory * .csv files (exported from HDexaminer) of non-deuterated (ND),
 fully-deuterated (FD), and partially deuterated samples (aka
 on-exchange).  * hx-datafiles.csv * ribbon_maker.hmtl * ribbon_maker.Rmd
 3. Add titles of .csv files in the hx-datafiles.csv file, containing ND,
 FD, and on-exchange samples per condition.  4. Add .csv files (exported
 from HD examiner) to "HDExaminer_csv" folder.  Note: All .csv
 files cannot have peptides with low-confidence. All .csv files must have
 the same peptides listed in each row. This is best performed ahead of time
 in HDexaminer.  5. Customize colors corresponding to % HX values in
 LUT_ribbon-colors.csv. Color values are formatted in RGB.  6. Open
 "ribbon_maker.Rmd" in Rstudio and run all.  Code for difference
 plots (MATLAB R2017A) was used to define the difference in % deuteration
 per peptide in triplicate samples of WT or mutant PARP1 or PARP2 under the
 conditions indicated in the figure legends. This code will prompt the
 selection of two .csv files (exported from HDexaminer) that are compared.
 Each bar represents the difference in deuteration per peptide, colored
 based on the difference in % deuteration between the sample conditions.
 The color legend indicating the severity of differences in % deuteration
 is determined by the "DiffPlotColors" code. Colors are RGB
 format. Constituents of HX difference plot code:  1.
 DiffPlotColors23KK10.m --&gt; contains color scheme of peptide %HX ranges
 in RGB (R,G,B) on a scale from 0 to 1.  2.
 plot_diff_PARP1_HDEx_LZ_012218.m --&gt; contains code that is run to
 generate a HX difference plot comparing a single protein across two
 different conditions (e.g., salt concentrations or +/- DNA).   How to use
 deposited files utilized to create difference plots (MATLAB):  1. In one
 folder, download "DiffPlotColors23KK10.m" and
 "plot_diff_PARP1_HDEx_LZ_012218.m"  2. Customize colors
 associated with each % difference in HX in
 "DiffPlotColors23KK10.m" 3. Open
 "plot_diff_PARP1_HDEx_LZ_012218.m" and Run. This code is used to
 generate the HX difference plot.  4. User will be prompted to select two
 .csv files (two on-exchange samples being compared, exported from
 HDexaminer). Code will plot the HX difference onto colored rectangles by
 subtracting the %HX of the 2nd .csv file from the first. ## Sharing/Access
 information SHARING/ACCESS INFORMATION 1\. Licenses/restrictions placed on
 the data: None 2\. Links to publications that cite or use the data: Will
 update before publication 3\. Links to other publicly accessible locations
 of the data: None 4\. Links/relationships to ancillary data sets: None 5\.
 Was data derived from another source? No 6\. Recommended citation for this
 dataset: n/a ## Code/Software Version of Rstudio used: * RStudio
 2021.09.1+372 "Ghost Orchid" Release
 (8b9ced188245155642d024aa3630363df611088a, 2021-11-08) for Windows *
 Mozilla/5.0 (Windows NT 6.1; Win64; x64) AppleWebKit/537.36 (KHTML, like
 Gecko) QtWebEngine/5.12.8 Chrome/69.0.3497.128 Safari/537.36 Version of
 MATLAB used: * R2017a (9.2.0.556344)