% ***********************************************************************
% dna_abs.m
% ***********************************************************************
%
% Data description:
%
% Ultraviolet absorptance [%] (205-355nm) of 50 ug/mL of DNA over a distance of 1 cm, 
% with a 5 nm resolution
%
% ***********************************************************************
%
% Original data sources:
%   
%     B. Clendening. 2002. UV spectrophotometric analysis of DNA and RNA.
%     Tech. rep., Hofstra University.
%
%     J. C. Sutherland and K. P. Griffin. 1981. Absorption spectrum of DNA for
%     wavelengths greater than 300 nm. Radiation Res. 86, 3, 399–410.
%
%     A. R. Young. 1997. Chromophores in human skin. Phys. Med. Biol. 42, 5,
%     789.
%
% Note that the original sources provide absorbance data. The data below
% is converted to absorptance.
% 
% ***********************************************************************

clear all

data0= [1.4277,1.0723,0.6988,0.4759,0.4217,0.3976,0.3916,0.4337,0.5783,0.7470,0.8012,0.8373,0.8133,0.7108,0.5843,0.3434,0.1325,0.0602,0.0241,0,0];
data0 = data0/data0(12); %normalize to A260 = 1 at 50 ug/ml over 1cm

wave0 = [200.3556,209.2444,217.7778,223.8222,226.6667,229.1556,231.2889,237.3333,243.7333,250.4889,252.9778,257.9556,262.5778,268.6222,274.6667,284.6222,293.1556,297.4222,305.2444,315.9111,359.6444];

wave = ceil(wave0(1)/5)*5:5:floor(wave0(end));
data = interp1(wave0,data0,wave);

fid=fopen('dna_abs.txt','wb');
for i=1:length(wave)
    fprintf(fid,'%d  %3.4g \n',wave(i),data(i));
end
fclose(fid);


plot(wave,(1-10.^-data)*100,'b-','linewidth',1.5);
set(gca,'FontSize',14);
grid on
title('DNA','fontsize',14)
ylabel('absorptance (%)','fontsize',14);
xlabel('wavelength (nm)','fontsize',14);
xlim([min(wave),max(wave)]);
set(gcf,'PaperUnits','inches','PaperPosition',[0 0 6 5]);
pause
print('-dpng', '-r100','dna_abs.png');
close 
