Reconstruction script - Use the PCA results from the Main script to model the 2D measurements
GUI and CLI programs
GUI:
trendreconstructgui.exein Windows and Linux,trendreconstructgui.appin OS XCLI:
trendreconstruct.exein all platformsSynopsis
trendreconstruct.exe -n [components] -m [1/2/3/4]] [-e] [-p] [-r] [-z] [-d] [--rmsd] [--gif] [--dpi integral for dpi of output PNG files]Description
trendreconstruct.exerebuilds the original 2D measurements using the first N principal components requested by the user. The scripttrendreconstruct.exerequires thattrendmain.exefirst be run with the--reconstructoption turned on. Normallytrendmain.exewill not save the files needed for PCA reconstruction unless the--reconstoption is used.- Note that each time when 
trendmainguiortrendmainlaunches it creates a temp directory to save temporary files fortrendplotandtrendreconstructand deletes the old one (if it exists). This preparestrendreconstructto use the last run oftrendmainortrendmainguiperformed with the--reconstructoption turned on. 
Options
-n component(s) selected for reconstruction-nspecifies principal components selected to use in rebuilding the original measurements. For example,-n 1means reconstruct the 2D measurements using only the first component, while-n 3uses the third component. To reconstruct individual, non-consecutive components, you can separate the page numbers with commas: e.g.-n 2,4,6would reconstruct using the second, fourth, and sixth components. To reconstruct the range of components 1 to 3, use-n 1-3. Range and individual components can be selected together, e.g.-n 1,3-5,7means reconstruction by components 1, 3, 4, 5, 7. Note space is not allowed between selected components unless quotation marks are used. i.e.-n '1, 3-5, 7'.-m [1/2/3/4]Background:
trendmain.exereorganizes the measurements listed infile.indexas a large 2D matrix, filters them, and scales them for PCA. The-moption specifies which stage of the process should be reconstructed.-mspecifies which matrix will be reconstructed. The choices are:
| matrix mode | meaning | 
|---|---|
| 1 | This recovers the state right before doing PCA. The large 2D matrix is row (column) scaled, with unchanged rows and noisy regions filtered out | 
| 2 | This differs from matrix mode 1 in that the rows (columns) are unscaled | 
| 3 | This option also recovers the filtered, unchanged rows from matrix mode 2 | 
| 4* | This option differs from matrix mode 3 in also recovering the low intensity regions filtered out from being below the threshold | 
* mode 4 is for Fourier-Transformed 2D NMR spectra where -r option 
    was used in trendmain.exe to set the threshold for filtering low intensity
    regions.
-e-eis optional. When it is on, the reconstructions of the measurements are exported in the same format as the original measurements read intotrendmain.exe. If input format ismovieorpng, the output format will be mp4 format movie clip. mp4 movie reconstructed frommovieshares the same time length as the input movie. mp4 movie reconstructed from a series of PNG images is set as 10 second long.-p-pis optional. When it is on, the reconstructed images are exported as images in PNG format.--gif--gifis optional. When it is on, the reconstructed movies are exported as GIF animation just in case there is no appropriate media player to play.mp4movie clip generated by-e. GIF animation is more compatible since most web browsers can play it, although it has larger size than mp4.--dpi
When-poption is turned on,--dpispecifies the dots-per-inch resolution of the png files to be reconstructed. By default, this is set to 96. This option is not required.-z-zoption is used to recover rows that do not change and hence was filtered out before doing PCA.-r-ris used only when reconstructing 2D Fourier-transformed NMR spectra. When doing PCA on 2D NMR spectra, a threshold can be set to filter out noisy regions using the-roption fortrendmain.exe. The-roption can be used in reconstruction to recover those noisy regions in order to fully recover the original spectra. It is not required and is usually not necessary.-dor--diff-dturns on thediffmode, exporting difference spectra instead of reconstructed spectra. It is used to visualize the difference between original and reconstructed spectra.--rmsd--rmsdcalculates the RMSD between the reconstructed and original data for all principal components. A file with suffix name as-rmsd.txtand prefix name specified by the-ooption oftrendmain.exewill be stored. For example, iftrendmain.exewas used with the-o exampleoption,--rmsdoption generates a file named asprefix-rmsd.txt.-o [output prefix name]-ospecifies the prefix of reconstructed files or images