Last active
August 29, 2015 13:58
-
-
Save icaoberg/9943557 to your computer and use it in GitHub Desktop.
cellorganizer-demo3D12-lamp2-framework-downsampling8 Jenkins script
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# | |
#$ -j y | |
#$ -S /bin/bash | |
#$ -cwd | |
#PBS -q model1 | |
#PBS -M icaoberg@andrew.cmu.edu | |
cd $PBS_O_WORKDIR | |
git checkout dev | |
git pull origin dev | |
echo "help demo3D12; | |
TRAIN = true; | |
SYNTHESIS = true; | |
POSTPROCESSING = true; | |
%LAMP2 | |
option = 1; | |
patterns = {'LAM','Mit','Nuc','TfR'}; | |
model_filenames = {'./lam.mat', './mit.mat', './nuc.mat', './tfr.mat'}; | |
downsampling_scale = 8; | |
pattern = patterns{option}; | |
model_filename = model_filenames{option}; | |
cd( './demos/3D/demo3D12' ); | |
if TRAIN | |
%run demo and make profile | |
profile on | |
param.model.downsampling = [ downsampling_scale, downsampling_scale, 1]; | |
param.proteinUpsampleZ = 5; | |
param.train.flag = 'framework'; | |
demo3D12( option, false, param ); | |
profile off | |
movefile( model_filename, './model.mat' ); | |
profsave( profile('info'), 'profile' ); | |
zip( 'profile.zip', 'profile' ) | |
rmdir( 'profile', 's' ); | |
end | |
if SYNTHESIS | |
%try to synthesize images from model | |
try | |
state = rng(3); | |
catch | |
state = RandStream.create('mt19937ar','seed', 11); | |
RandStream.setDefaultStream(state); | |
end | |
outputDirectory = pwd; | |
param = []; | |
param.targetDirectory = [ outputDirectory ]; | |
param.prefix = 'synthesizedImages'; | |
param.numberOfSynthesizedImages = 50; | |
param.compression = 'lzw'; | |
param.microscope = 'none'; | |
param.synthesis = 'framework'; | |
param.verbose = true; | |
param.debug = true; | |
slml2img( {'./model.mat'}, param ); | |
end | |
if POSTPROCESSING | |
input_images_directory = [ pwd filesep pattern ]; | |
output_images_directory = [ pwd filesep 'temp' filesep 'raw' ]; | |
answer = ... | |
raw_images_gallery_wrapper( ... | |
input_images_directory, output_images_directory ); | |
input_images_directory = [ pwd filesep 'intermediate_results' ]; | |
output_images_directory = [ pwd filesep 'temp' filesep 'intermediate' ]; | |
answer = ... | |
intermediate_results_image_gallery_wrapper( ... | |
input_images_directory, output_images_directory ); | |
input_images_directory = [ pwd filesep 'temp' filesep 'preprocessing' ]; | |
output_images_directory = [ pwd filesep 'temp' filesep 'preprocessing' ]; | |
answer = ... | |
preprocessed_images_gallery_wrapper( ... | |
input_images_directory, output_images_directory ); | |
input_images_directory = [ pwd filesep 'synthesizedImages' ]; | |
output_images_directory = [ pwd filesep 'temp' filesep 'synthetic' ]; | |
synthesized_images_gallery_wrapper( ... | |
input_images_directory, output_images_directory ); | |
input_images_directory = [ pwd filesep 'temp' filesep 'cell_shape_eigen' ] | |
output_images_directory = [ pwd filesep 'temp' filesep 'cellcodes' ]; | |
cellcodes_images_gallery_wrapper( ... | |
input_images_directory, output_images_directory ); | |
end | |
exit;" > script.m | |
#erase all results | |
#rm -rf demos/3D/demo3D12/temp | |
#erase preprocessed images | |
rm -rf demos/3D/demo3D12/temp/preprocessing | |
#erase temporary models/parameters | |
rm -f demos/3D/demo3D12/temp/*.mat | |
#erase cell codes | |
DIRECTORY=demos/3D/demo3D12/temp/cellcodes | |
if [ -d "$DIRECTORY"]; then | |
rm -rf $DIRECTORY | |
fi | |
#erase compartment statistics | |
DIRECTORY=demos/3D/demo3D12/temp/compartment_stats | |
if [ -d "$DIRECTORY"]; then | |
rm -rf $DIRECTORY | |
fi | |
#erase nuclear features | |
DIRECTORY=demos/3D/demo3D12/temp/nuclearfeats | |
if [ -d "$DIRECTORY"]; then | |
rm -rf $DIRECTORY | |
fi | |
#erase protein objects foldero | |
DIRECTORY=demos/3D/demo3D12/temp/nuclearfeats/protein_objects_gaussian/ | |
if [ -d "$DIRECTORY"]; then | |
rm -rf $DIRECTORY | |
fi | |
/usr/local/bin/matlab_7.13 -nodesktop -nosplash -r "script;" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment