pione 0.1.0
Sign up to get free protection for your applications and to get access to all the features.
- data/.gitignore +14 -0
- data/Gemfile +5 -0
- data/LICENSE.txt +22 -0
- data/README.md +94 -0
- data/Rakefile +118 -0
- data/bin/pione-broker +5 -0
- data/bin/pione-clean +5 -0
- data/bin/pione-client +5 -0
- data/bin/pione-eval +111 -0
- data/bin/pione-relay +5 -0
- data/bin/pione-relay-account-db +5 -0
- data/bin/pione-relay-client-db +5 -0
- data/bin/pione-search-log +30 -0
- data/bin/pione-syntax-checker +5 -0
- data/bin/pione-task-worker +5 -0
- data/bin/pione-tuple-space-provider +5 -0
- data/bin/pione-tuple-space-receiver +5 -0
- data/bin/pione-tuple-space-viewer +5 -0
- data/demo/demo.rb +311 -0
- data/demo/public/base.css +94 -0
- data/demo/public/demo.js +107 -0
- data/demo/public/index.html +91 -0
- data/demo/public/jquery-1.8.3.min.js +2 -0
- data/example/CountChar/CountChar.pione +64 -0
- data/example/CountChar/misc/CountChar.rb +22 -0
- data/example/CountChar/text/aidokushono_insho.txt +32 -0
- data/example/CountChar/text/aikokuka_shokan.txt +108 -0
- data/example/CountChar/text/carlyle_hakubutsukan.txt +58 -0
- data/example/CountChar/text/dark_minister.txt +2440 -0
- data/example/CountChar/text/kaikano_otto.txt +61 -0
- data/example/CountChar/text/kaikon.txt +30 -0
- data/example/CountChar/text/nagashimano_shi.txt +45 -0
- data/example/CountChar/text/saikachibuchi.txt +80 -0
- data/example/CountChar/text/saikonihonno_josei.txt +91 -0
- data/example/CountChar/text/taishojugonenno_bundan.txt +21 -0
- data/example/FeatureExample/FeatureExample.pione +7 -0
- data/example/Fib/Fib.pione +56 -0
- data/example/Fib/FibBC.pione +56 -0
- data/example/HelloWorld/HelloWorld.pione +5 -0
- data/example/LucasNumber/LucasNumber.pione +64 -0
- data/example/MakePair/MakePair.pione +14 -0
- data/example/MakePair/data/1.i +0 -0
- data/example/MakePair/data/2.i +0 -0
- data/example/MakePair/data/3.i +0 -0
- data/example/MakePair/data/4.i +0 -0
- data/example/MakePair/data/5.i +0 -0
- data/example/SieveOfEratosthenes/SieveOfEratosthenes.pione +61 -0
- data/example/SingleParticlesWithRef/Makefile +289 -0
- data/example/SingleParticlesWithRef/SingleParticlesWithRef.Makefile +153 -0
- data/example/SingleParticlesWithRef/SingleParticlesWithRef.pione +116 -0
- data/example/SingleParticlesWithRef/SingleParticlesWithRefFull.pione +400 -0
- data/example/SingleParticlesWithRef/data/121p-shift-0-0-0.roi +0 -0
- data/example/SingleParticlesWithRef/data/121p-shift-0-120-0.roi +0 -0
- data/example/SingleParticlesWithRef/data/121p-shift-0-180-0.roi +0 -0
- data/example/SingleParticlesWithRef/data/121p-shift-0-240-0.roi +0 -0
- data/example/SingleParticlesWithRef/data/121p-shift-0-300-0.roi +0 -0
- data/example/SingleParticlesWithRef/data/121p-shift-0-60-0.roi +0 -0
- data/example/SingleParticlesWithRef/data/121p-shift-120-0-0.roi +0 -0
- data/example/SingleParticlesWithRef/data/121p-shift-120-120-0.roi +0 -0
- data/example/SingleParticlesWithRef/data/121p-shift-120-180-0.roi +0 -0
- data/example/SingleParticlesWithRef/data/121p-shift-120-240-0.roi +0 -0
- data/example/SingleParticlesWithRef/data/121p-shift-120-300-0.roi +0 -0
- data/example/SingleParticlesWithRef/data/121p-shift-120-60-0.roi +0 -0
- data/example/SingleParticlesWithRef/data/121p-shift-180-0-0.roi +0 -0
- data/example/SingleParticlesWithRef/data/121p-shift-180-120-0.roi +0 -0
- data/example/SingleParticlesWithRef/data/121p-shift-180-180-0.roi +0 -0
- data/example/SingleParticlesWithRef/data/121p-shift-180-240-0.roi +0 -0
- data/example/SingleParticlesWithRef/data/121p-shift-180-300-0.roi +0 -0
- data/example/SingleParticlesWithRef/data/121p-shift-180-60-0.roi +0 -0
- data/example/SingleParticlesWithRef/data/121p-shift-240-0-0.roi +0 -0
- data/example/SingleParticlesWithRef/data/121p-shift-240-120-0.roi +0 -0
- data/example/SingleParticlesWithRef/data/121p-shift-240-180-0.roi +0 -0
- data/example/SingleParticlesWithRef/data/121p-shift-240-240-0.roi +0 -0
- data/example/SingleParticlesWithRef/data/121p-shift-240-300-0.roi +0 -0
- data/example/SingleParticlesWithRef/data/121p-shift-240-60-0.roi +0 -0
- data/example/SingleParticlesWithRef/data/121p-shift-300-0-0.roi +0 -0
- data/example/SingleParticlesWithRef/data/121p-shift-300-120-0.roi +0 -0
- data/example/SingleParticlesWithRef/data/121p-shift-300-180-0.roi +0 -0
- data/example/SingleParticlesWithRef/data/121p-shift-300-240-0.roi +0 -0
- data/example/SingleParticlesWithRef/data/121p-shift-300-300-0.roi +0 -0
- data/example/SingleParticlesWithRef/data/121p-shift-300-60-0.roi +0 -0
- data/example/SingleParticlesWithRef/data/121p-shift-60-0-0.roi +0 -0
- data/example/SingleParticlesWithRef/data/121p-shift-60-120-0.roi +0 -0
- data/example/SingleParticlesWithRef/data/121p-shift-60-180-0.roi +0 -0
- data/example/SingleParticlesWithRef/data/121p-shift-60-240-0.roi +0 -0
- data/example/SingleParticlesWithRef/data/121p-shift-60-300-0.roi +0 -0
- data/example/SingleParticlesWithRef/data/121p-shift-60-60-0.roi +0 -0
- data/example/SingleParticlesWithRef/data/121p-shift-noise-0-0-0.roi +0 -0
- data/example/SingleParticlesWithRef/data/121p-shift-noise-0-120-0.roi +0 -0
- data/example/SingleParticlesWithRef/data/121p-shift-noise-0-180-0.roi +0 -0
- data/example/SingleParticlesWithRef/data/121p-shift-noise-0-240-0.roi +0 -0
- data/example/SingleParticlesWithRef/data/121p-shift-noise-0-300-0.roi +0 -0
- data/example/SingleParticlesWithRef/data/121p-shift-noise-0-60-0.roi +0 -0
- data/example/SingleParticlesWithRef/data/121p-shift-noise-120-0-0.roi +0 -0
- data/example/SingleParticlesWithRef/data/121p-shift-noise-120-120-0.roi +0 -0
- data/example/SingleParticlesWithRef/data/121p-shift-noise-120-180-0.roi +0 -0
- data/example/SingleParticlesWithRef/data/121p-shift-noise-120-240-0.roi +0 -0
- data/example/SingleParticlesWithRef/data/121p-shift-noise-120-300-0.roi +0 -0
- data/example/SingleParticlesWithRef/data/121p-shift-noise-120-60-0.roi +0 -0
- data/example/SingleParticlesWithRef/data/121p-shift-noise-180-0-0.roi +0 -0
- data/example/SingleParticlesWithRef/data/121p-shift-noise-180-120-0.roi +0 -0
- data/example/SingleParticlesWithRef/data/121p-shift-noise-180-180-0.roi +0 -0
- data/example/SingleParticlesWithRef/data/121p-shift-noise-180-240-0.roi +0 -0
- data/example/SingleParticlesWithRef/data/121p-shift-noise-180-300-0.roi +0 -0
- data/example/SingleParticlesWithRef/data/121p-shift-noise-180-60-0.roi +0 -0
- data/example/SingleParticlesWithRef/data/121p-shift-noise-240-0-0.roi +0 -0
- data/example/SingleParticlesWithRef/data/121p-shift-noise-240-120-0.roi +0 -0
- data/example/SingleParticlesWithRef/data/121p-shift-noise-240-180-0.roi +0 -0
- data/example/SingleParticlesWithRef/data/121p-shift-noise-240-240-0.roi +0 -0
- data/example/SingleParticlesWithRef/data/121p-shift-noise-240-300-0.roi +0 -0
- data/example/SingleParticlesWithRef/data/121p-shift-noise-240-60-0.roi +0 -0
- data/example/SingleParticlesWithRef/data/121p-shift-noise-300-0-0.roi +0 -0
- data/example/SingleParticlesWithRef/data/121p-shift-noise-300-120-0.roi +0 -0
- data/example/SingleParticlesWithRef/data/121p-shift-noise-300-180-0.roi +0 -0
- data/example/SingleParticlesWithRef/data/121p-shift-noise-300-240-0.roi +0 -0
- data/example/SingleParticlesWithRef/data/121p-shift-noise-300-300-0.roi +0 -0
- data/example/SingleParticlesWithRef/data/121p-shift-noise-300-60-0.roi +0 -0
- data/example/SingleParticlesWithRef/data/121p-shift-noise-60-0-0.roi +0 -0
- data/example/SingleParticlesWithRef/data/121p-shift-noise-60-120-0.roi +0 -0
- data/example/SingleParticlesWithRef/data/121p-shift-noise-60-180-0.roi +0 -0
- data/example/SingleParticlesWithRef/data/121p-shift-noise-60-240-0.roi +0 -0
- data/example/SingleParticlesWithRef/data/121p-shift-noise-60-300-0.roi +0 -0
- data/example/SingleParticlesWithRef/data/121p-shift-noise-60-60-0.roi +0 -0
- data/example/SingleParticlesWithRef/data/121p-shift.pdb +3381 -0
- data/example/SingleParticlesWithRef/data/all.ref2d +0 -0
- data/example/SingleParticlesWithRef/data/all.ref3d +0 -0
- data/example/Sum/Sum.pione +52 -0
- data/example/SyntaxError/call_rule_error.pione +6 -0
- data/example/SyntaxError/feature_line_error.pione +7 -0
- data/example/SyntaxError/flow_block_error.pione +5 -0
- data/example/SyntaxError/input_line_error.pione +6 -0
- data/example/SyntaxError/invalid_rule_name.pione +6 -0
- data/example/SyntaxError/param_line_error.pione +7 -0
- data/example/SyntaxError/variable-binding-error.pione +11 -0
- data/lib/pione.rb +241 -0
- data/lib/pione/agent/basic-agent.rb +333 -0
- data/lib/pione/agent/broker.rb +274 -0
- data/lib/pione/agent/command-listener.rb +47 -0
- data/lib/pione/agent/input-generator.rb +194 -0
- data/lib/pione/agent/logger.rb +65 -0
- data/lib/pione/agent/process-manager.rb +38 -0
- data/lib/pione/agent/rule-provider.rb +64 -0
- data/lib/pione/agent/task-worker.rb +274 -0
- data/lib/pione/agent/trivial-routine-worker.rb +28 -0
- data/lib/pione/agent/tuple-space-client.rb +146 -0
- data/lib/pione/agent/tuple-space-server-client-life-checker.rb +29 -0
- data/lib/pione/command-option/basic-option.rb +42 -0
- data/lib/pione/command-option/child-process-option.rb +17 -0
- data/lib/pione/command-option/common-option.rb +29 -0
- data/lib/pione/command-option/daemon-option.rb +12 -0
- data/lib/pione/command-option/presence-notifier-option.rb +15 -0
- data/lib/pione/command-option/task-worker-owner-option.rb +17 -0
- data/lib/pione/command-option/tuple-space-provider-option.rb +26 -0
- data/lib/pione/command-option/tuple-space-provider-owner-option.rb +16 -0
- data/lib/pione/command-option/tuple-space-receiver-option.rb +12 -0
- data/lib/pione/command/basic-command.rb +126 -0
- data/lib/pione/command/child-process.rb +43 -0
- data/lib/pione/command/daemon-process.rb +18 -0
- data/lib/pione/command/front-owner-command.rb +37 -0
- data/lib/pione/command/pione-broker.rb +53 -0
- data/lib/pione/command/pione-clean.rb +16 -0
- data/lib/pione/command/pione-client.rb +273 -0
- data/lib/pione/command/pione-relay-account-db.rb +85 -0
- data/lib/pione/command/pione-relay-client-db.rb +80 -0
- data/lib/pione/command/pione-relay.rb +47 -0
- data/lib/pione/command/pione-syntax-checker.rb +103 -0
- data/lib/pione/command/pione-task-worker.rb +123 -0
- data/lib/pione/command/pione-tuple-space-provider.rb +87 -0
- data/lib/pione/command/pione-tuple-space-receiver.rb +55 -0
- data/lib/pione/command/pione-tuple-space-viewer.rb +151 -0
- data/lib/pione/command/tuple-space-provider-owner.rb +6 -0
- data/lib/pione/front/basic-front.rb +64 -0
- data/lib/pione/front/broker-front.rb +30 -0
- data/lib/pione/front/client-front.rb +28 -0
- data/lib/pione/front/relay-front.rb +19 -0
- data/lib/pione/front/task-worker-front.rb +16 -0
- data/lib/pione/front/task-worker-owner.rb +42 -0
- data/lib/pione/front/tuple-space-provider-front.rb +22 -0
- data/lib/pione/front/tuple-space-provider-owner.rb +11 -0
- data/lib/pione/front/tuple-space-receiver-front.rb +18 -0
- data/lib/pione/model/assignment.rb +89 -0
- data/lib/pione/model/basic-model.rb +395 -0
- data/lib/pione/model/binary-operator.rb +80 -0
- data/lib/pione/model/block.rb +233 -0
- data/lib/pione/model/boolean.rb +138 -0
- data/lib/pione/model/call-rule.rb +69 -0
- data/lib/pione/model/data-expr.rb +360 -0
- data/lib/pione/model/feature-expr.rb +794 -0
- data/lib/pione/model/float.rb +107 -0
- data/lib/pione/model/integer.rb +140 -0
- data/lib/pione/model/list.rb +104 -0
- data/lib/pione/model/message.rb +80 -0
- data/lib/pione/model/package.rb +48 -0
- data/lib/pione/model/parameters.rb +282 -0
- data/lib/pione/model/rule-expr.rb +120 -0
- data/lib/pione/model/rule-io.rb +166 -0
- data/lib/pione/model/rule.rb +294 -0
- data/lib/pione/model/string.rb +111 -0
- data/lib/pione/model/undefined-value.rb +24 -0
- data/lib/pione/model/variable-table.rb +315 -0
- data/lib/pione/model/variable.rb +87 -0
- data/lib/pione/parser/block-parser.rb +83 -0
- data/lib/pione/parser/common-parser.rb +145 -0
- data/lib/pione/parser/document-parser.rb +58 -0
- data/lib/pione/parser/error-message.yml +4 -0
- data/lib/pione/parser/expr-parser.rb +266 -0
- data/lib/pione/parser/feature-expr-parser.rb +105 -0
- data/lib/pione/parser/flow-element-parser.rb +181 -0
- data/lib/pione/parser/literal-parser.rb +182 -0
- data/lib/pione/parser/rule-definition-parser.rb +163 -0
- data/lib/pione/parser/syntax-error.rb +61 -0
- data/lib/pione/patch/array-patch.rb +3 -0
- data/lib/pione/patch/drb-patch.rb +467 -0
- data/lib/pione/patch/monitor-patch.rb +16 -0
- data/lib/pione/patch/rinda-patch.rb +759 -0
- data/lib/pione/patch/uri-patch.rb +66 -0
- data/lib/pione/relay/receiver-socket.rb +69 -0
- data/lib/pione/relay/relay-account-db.rb +55 -0
- data/lib/pione/relay/relay-client-db.rb +53 -0
- data/lib/pione/relay/relay-socket.rb +215 -0
- data/lib/pione/relay/trampoline.rb +22 -0
- data/lib/pione/relay/transmitter-socket.rb +167 -0
- data/lib/pione/resource/basic-resource.rb +92 -0
- data/lib/pione/resource/dropbox-resource.rb +106 -0
- data/lib/pione/resource/ftp.rb +84 -0
- data/lib/pione/resource/local.rb +113 -0
- data/lib/pione/rule-handler/action-handler.rb +184 -0
- data/lib/pione/rule-handler/basic-handler.rb +217 -0
- data/lib/pione/rule-handler/flow-handler.rb +339 -0
- data/lib/pione/rule-handler/root-handler.rb +23 -0
- data/lib/pione/rule-handler/system-handler.rb +13 -0
- data/lib/pione/system/common.rb +22 -0
- data/lib/pione/system/config.rb +20 -0
- data/lib/pione/system/document.rb +81 -0
- data/lib/pione/system/file-cache.rb +150 -0
- data/lib/pione/system/global.rb +346 -0
- data/lib/pione/system/identifier.rb +61 -0
- data/lib/pione/system/init.rb +16 -0
- data/lib/pione/system/object.rb +35 -0
- data/lib/pione/transformer/block-transformer.rb +23 -0
- data/lib/pione/transformer/document-transformer.rb +36 -0
- data/lib/pione/transformer/expr-transformer.rb +89 -0
- data/lib/pione/transformer/feature-expr-transformer.rb +56 -0
- data/lib/pione/transformer/flow-element-transformer.rb +66 -0
- data/lib/pione/transformer/literal-transformer.rb +76 -0
- data/lib/pione/transformer/rule-definition-transformer.rb +62 -0
- data/lib/pione/transformer/transformer-module.rb +37 -0
- data/lib/pione/tuple-space/data-finder.rb +165 -0
- data/lib/pione/tuple-space/presence-notifier.rb +83 -0
- data/lib/pione/tuple-space/relay.rb +9 -0
- data/lib/pione/tuple-space/tuple-space-provider.rb +85 -0
- data/lib/pione/tuple-space/tuple-space-receiver.rb +140 -0
- data/lib/pione/tuple-space/tuple-space-server-interface.rb +60 -0
- data/lib/pione/tuple-space/tuple-space-server.rb +156 -0
- data/lib/pione/tuple-space/update-criteria.rb +96 -0
- data/lib/pione/tuple/agent-tuple.rb +10 -0
- data/lib/pione/tuple/attribute-tuple.rb +7 -0
- data/lib/pione/tuple/base-uri-tuple.rb +9 -0
- data/lib/pione/tuple/basic-tuple.rb +317 -0
- data/lib/pione/tuple/bye-tuple.rb +9 -0
- data/lib/pione/tuple/command-tuple.rb +9 -0
- data/lib/pione/tuple/data-tuple.rb +18 -0
- data/lib/pione/tuple/dry-run-tuple.rb +8 -0
- data/lib/pione/tuple/exception-tuple.rb +11 -0
- data/lib/pione/tuple/finished-tuple.rb +17 -0
- data/lib/pione/tuple/foreground-tuple.rb +7 -0
- data/lib/pione/tuple/log-tuple.rb +14 -0
- data/lib/pione/tuple/process-info-tuple.rb +9 -0
- data/lib/pione/tuple/request-rule-tuple.rb +9 -0
- data/lib/pione/tuple/rule-tuple.rb +10 -0
- data/lib/pione/tuple/shift-tuple.rb +13 -0
- data/lib/pione/tuple/task-tuple.rb +36 -0
- data/lib/pione/tuple/task-worker-resource-tuple.rb +9 -0
- data/lib/pione/tuple/working-tuple.rb +13 -0
- data/lib/pione/uri-scheme/basic-scheme.rb +40 -0
- data/lib/pione/uri-scheme/broadcast-scheme.rb +11 -0
- data/lib/pione/uri-scheme/dropbox-scheme.rb +9 -0
- data/lib/pione/uri-scheme/local-scheme.rb +28 -0
- data/lib/pione/util/error-report.rb +12 -0
- data/lib/pione/util/log.rb +79 -0
- data/lib/pione/util/message.rb +155 -0
- data/lib/pione/util/misc.rb +73 -0
- data/lib/pione/util/terminal.rb +78 -0
- data/lib/pione/util/waiter-table.rb +53 -0
- data/lib/pione/version.rb +3 -0
- data/misc/env.sh +2 -0
- data/misc/test-drb-stop-service.rb +34 -0
- data/misc/test-ensure-and-thread-kill.rb +40 -0
- data/misc/test-many-waiters-client.rb +56 -0
- data/misc/test-many-waiters-server.rb +14 -0
- data/misc/write_and_take_test.png +0 -0
- data/misc/write_and_take_test.rb +36 -0
- data/pione.gemspec +49 -0
- data/test/agent/spec_basic-agent.rb +170 -0
- data/test/agent/spec_broker.rb +36 -0
- data/test/agent/spec_command-listener.rb +30 -0
- data/test/agent/spec_input-generator.rb +123 -0
- data/test/agent/spec_logger.rb +71 -0
- data/test/agent/spec_rule-provider.rb +65 -0
- data/test/agent/spec_task-worker.rb +307 -0
- data/test/agent/spec_tuple-space-client.rb +30 -0
- data/test/model/spec_assignment.rb +51 -0
- data/test/model/spec_binary-operator.rb +39 -0
- data/test/model/spec_block.rb +154 -0
- data/test/model/spec_boolean.rb +115 -0
- data/test/model/spec_call-rule.rb +23 -0
- data/test/model/spec_data-expr.rb +312 -0
- data/test/model/spec_feature-expr.rb +359 -0
- data/test/model/spec_feature-expr.yml +16 -0
- data/test/model/spec_float.rb +141 -0
- data/test/model/spec_integer.rb +141 -0
- data/test/model/spec_list.rb +26 -0
- data/test/model/spec_message.rb +42 -0
- data/test/model/spec_package.rb +15 -0
- data/test/model/spec_parameters.rb +148 -0
- data/test/model/spec_rule-expr.rb +66 -0
- data/test/model/spec_rule-io.rb +32 -0
- data/test/model/spec_rule.rb +158 -0
- data/test/model/spec_string.rb +106 -0
- data/test/model/spec_variable-table.rb +117 -0
- data/test/model/spec_variable.rb +84 -0
- data/test/parser/spec_block-parser.rb +5 -0
- data/test/parser/spec_block-parser.yml +85 -0
- data/test/parser/spec_common-parser.rb +281 -0
- data/test/parser/spec_expr-parser.rb +6 -0
- data/test/parser/spec_expr-parser.yml +82 -0
- data/test/parser/spec_feature-expr-parser.rb +32 -0
- data/test/parser/spec_feature-expr-parser.yml +25 -0
- data/test/parser/spec_flow-element-parser.rb +5 -0
- data/test/parser/spec_flow-element-parser.yml +180 -0
- data/test/parser/spec_literal-parser.rb +5 -0
- data/test/parser/spec_literal-parser.yml +123 -0
- data/test/parser/spec_rule-definition-parser.rb +5 -0
- data/test/parser/spec_rule-definition-parser.yml +93 -0
- data/test/patch/spec_rinda-patch.rb +32 -0
- data/test/patch/spec_uri-patch.rb +23 -0
- data/test/rule-handler/spec_action-handler.rb +135 -0
- data/test/rule-handler/spec_flow-handler.rb +127 -0
- data/test/spec_common.rb +14 -0
- data/test/spec_data-finder.rb +88 -0
- data/test/spec_data-finder.yml +115 -0
- data/test/spec_document.rb +76 -0
- data/test/spec_identifier.rb +29 -0
- data/test/spec_log.rb +52 -0
- data/test/spec_object.rb +20 -0
- data/test/spec_resource.rb +73 -0
- data/test/spec_update-criteria.rb +83 -0
- data/test/test-util.rb +223 -0
- data/test/transformer/spec_block-transformer.rb +26 -0
- data/test/transformer/spec_expr-transformer.rb +106 -0
- data/test/transformer/spec_feature-expr-transformer.rb +21 -0
- data/test/transformer/spec_flow-element-transformer.rb +154 -0
- data/test/transformer/spec_literal-transformer.rb +58 -0
- data/test/transformer/spec_rule-definition-transformer.rb +168 -0
- data/test/tuple-space/spec_tuple-space-provider.rb +36 -0
- data/test/tuple-space/spec_tuple-space-receiver.rb +32 -0
- data/test/tuple-space/spec_tuple-space-server.rb +49 -0
- data/test/tuple/spec_basic-tuple.rb +87 -0
- data/test/tuple/spec_data-tuple.rb +85 -0
- data/test/tuple/spec_finished-tuple.rb +61 -0
- data/test/tuple/spec_task-tuple.rb +127 -0
- data/test/tuple/spec_working-tuple.rb +58 -0
- data/test/uri-scheme/spec_broadcast-scheme.rb +40 -0
- data/test/uri-scheme/spec_dropbox-scheme.rb +31 -0
- data/test/uri-scheme/spec_local-scheme.rb +69 -0
- metadata +660 -0
@@ -0,0 +1,64 @@
|
|
1
|
+
Rule Main
|
2
|
+
output 'result.txt'
|
3
|
+
param $NUM := 10
|
4
|
+
Flow
|
5
|
+
rule LucasNumber.params({NUM: $NUM})
|
6
|
+
rule Result
|
7
|
+
End
|
8
|
+
|
9
|
+
Rule LucasNumber
|
10
|
+
output 'LucasNumber{$NUM}.txt'
|
11
|
+
param $NUM
|
12
|
+
Flow
|
13
|
+
case $NUM
|
14
|
+
when 0
|
15
|
+
rule LucasNumber0
|
16
|
+
when 1
|
17
|
+
rule LucasNumber1
|
18
|
+
else
|
19
|
+
if $NUM > 0
|
20
|
+
$NUM1 := $NUM - 1
|
21
|
+
$NUM2 := $NUM - 2
|
22
|
+
$OP := "+"
|
23
|
+
else
|
24
|
+
$NUM1 := $NUM + 1
|
25
|
+
$NUM2 := $NUM + 2
|
26
|
+
$OP := "-"
|
27
|
+
end
|
28
|
+
rule LucasNumber.params({NUM: $NUM1})
|
29
|
+
rule LucasNumber.params({NUM: $NUM2})
|
30
|
+
rule Calc.params({NUM: $NUM, NUM1: $NUM1, NUM2: $NUM2, OP: $OP})
|
31
|
+
end
|
32
|
+
End
|
33
|
+
|
34
|
+
Rule LucasNumber0
|
35
|
+
output 'LucasNumber0.txt'
|
36
|
+
Action
|
37
|
+
echo 2 > LucasNumber0.txt
|
38
|
+
End
|
39
|
+
|
40
|
+
Rule LucasNumber1
|
41
|
+
output 'LucasNumber1.txt'
|
42
|
+
Action
|
43
|
+
echo 1 > LucasNumber1.txt
|
44
|
+
End
|
45
|
+
|
46
|
+
Rule Calc
|
47
|
+
input 'LucasNumber{$NUM1}.txt'
|
48
|
+
input 'LucasNumber{$NUM2}.txt'
|
49
|
+
output 'LucasNumber{$NUM}.txt'
|
50
|
+
param $NUM
|
51
|
+
param $NUM1
|
52
|
+
param $NUM2
|
53
|
+
param $OP
|
54
|
+
Action
|
55
|
+
echo "`cat {$I[2]}` {$OP} `cat {$I[1]}`" | bc > {$O[1]}
|
56
|
+
End
|
57
|
+
|
58
|
+
Rule Result
|
59
|
+
input 'LucasNumber{$NUM}.txt'
|
60
|
+
output 'result.txt'
|
61
|
+
param $NUM
|
62
|
+
Action
|
63
|
+
cat {$I[1]} > {$O[1]}
|
64
|
+
End
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
@@ -0,0 +1,61 @@
|
|
1
|
+
Rule Main
|
2
|
+
output '*.prime'
|
3
|
+
param $MAX := 20
|
4
|
+
Flow
|
5
|
+
rule CurrentNumber.params({NUM: 2})
|
6
|
+
rule Sieve.params({MAX: $MAX, NUM: 2})
|
7
|
+
End
|
8
|
+
|
9
|
+
Rule Sieve
|
10
|
+
input '{$NUM}.current'
|
11
|
+
input '*.not_prime'.all or null
|
12
|
+
output '*.prime'
|
13
|
+
param $MAX
|
14
|
+
param $NUM
|
15
|
+
Flow
|
16
|
+
if $NUM <= $MAX
|
17
|
+
if $*.include?($NUM.as_string).not
|
18
|
+
rule CreateNotPrimeAll.params({MAX: $MAX, NUM: $NUM})
|
19
|
+
rule CreatePrime.params({NUM: $NUM})
|
20
|
+
else
|
21
|
+
rule CurrentNumber.params({NUM: $NUM + 1})
|
22
|
+
end
|
23
|
+
rule Sieve.params({MAX: $MAX, NUM: $NUM + 1})
|
24
|
+
end
|
25
|
+
End
|
26
|
+
|
27
|
+
Rule CurrentNumber
|
28
|
+
output '{$NUM}.current'
|
29
|
+
param $NUM
|
30
|
+
Action
|
31
|
+
touch {$NUM}.current
|
32
|
+
End
|
33
|
+
|
34
|
+
Rule CreateNotPrimeAll
|
35
|
+
output '*.not_prime'
|
36
|
+
output '{$NUM + 1}.current'
|
37
|
+
param $MAX
|
38
|
+
param $NUM
|
39
|
+
param $i := 2
|
40
|
+
Flow
|
41
|
+
if $NUM * ($i + 1) <= $MAX
|
42
|
+
rule CreateNotPrimeAll.params({MAX: $MAX, NUM: $NUM, i: $i + 1})
|
43
|
+
end
|
44
|
+
rule CreateNotPrime.params({NUM: $NUM * $i})
|
45
|
+
rule CurrentNumber.params({NUM: $NUM + 1})
|
46
|
+
End
|
47
|
+
|
48
|
+
Rule CreateNotPrime
|
49
|
+
output '{$NUM}.not_prime'
|
50
|
+
param $NUM
|
51
|
+
Action
|
52
|
+
touch {$NUM}.not_prime
|
53
|
+
end
|
54
|
+
|
55
|
+
Rule CreatePrime
|
56
|
+
output '{$NUM}.prime'
|
57
|
+
param $NUM
|
58
|
+
Action
|
59
|
+
touch {$NUM}.prime
|
60
|
+
End
|
61
|
+
|
@@ -0,0 +1,289 @@
|
|
1
|
+
#
|
2
|
+
# Eos for 3D reconstrucion from 2D rois using 3D initail reference
|
3
|
+
#
|
4
|
+
|
5
|
+
.SUFFIXES: .3d .ref3d .ref2d .pad .padtmp .mask .maskfit .fit .fitmask .roi .corinfo .3dinfo .3dlst .3d .3dsm .3dsmCenter .ds6 .3dsmds6 .corinfo2 .corinfolst .cormap .parcorinfolst .parcorinfolstsort .gnuplotcorinfolst .3dlstselect .monlst .mon
|
6
|
+
|
7
|
+
SHELL=/bin/bash
|
8
|
+
|
9
|
+
-include ROIs
|
10
|
+
-include CORINFOs
|
11
|
+
-include PADs
|
12
|
+
-include 3DINFOs
|
13
|
+
-include 3DLIST
|
14
|
+
-include CORINFO2s
|
15
|
+
|
16
|
+
#
|
17
|
+
# Initial Reference Model
|
18
|
+
INITIAL=initial
|
19
|
+
# Target structure name
|
20
|
+
TARGET=all
|
21
|
+
|
22
|
+
# Simultaneous Jobs for AutoRotaionCorrelation
|
23
|
+
JOP_NUM=-j 3
|
24
|
+
|
25
|
+
#
|
26
|
+
# Search Area for 3D
|
27
|
+
#
|
28
|
+
ROTMODE=YOYS
|
29
|
+
# Rot1
|
30
|
+
ROT1MIN=0
|
31
|
+
ROT1MAX=359
|
32
|
+
ROT1D=30
|
33
|
+
nRot1=12
|
34
|
+
#
|
35
|
+
ROT2MIN=0
|
36
|
+
ROT2MAX=359
|
37
|
+
ROT2D=30
|
38
|
+
nRot2=12
|
39
|
+
# Rot3
|
40
|
+
ROT3MIN=0
|
41
|
+
ROT3MAX=0
|
42
|
+
ROT3D=30
|
43
|
+
nRot3=1
|
44
|
+
# For 2D
|
45
|
+
STEP=12
|
46
|
+
ROTMIN=0
|
47
|
+
ROTMAX=359
|
48
|
+
nROT=`echo "" | awk 'BEGIN {printf 360 / $(STEP)}'`
|
49
|
+
|
50
|
+
# Seletion Step
|
51
|
+
COR_THRESHOLD=0.4
|
52
|
+
Y_SHIFT_THRESHOLD=20
|
53
|
+
|
54
|
+
# Pad size for 2D
|
55
|
+
PAD_W=64
|
56
|
+
PAD_H=64
|
57
|
+
|
58
|
+
###
|
59
|
+
### Initial model from PDB
|
60
|
+
###
|
61
|
+
REFSOURCE=121p-shift
|
62
|
+
DELTA=2.5
|
63
|
+
SIZE_X=64
|
64
|
+
SIZE_Y=64
|
65
|
+
SIZE_Z=64
|
66
|
+
START_X=`awk 'BEGIN { print -1*$(DELTA)*$(SIZE_X)/2}'`
|
67
|
+
START_Y=`awk 'BEGIN { print -1*$(DELTA)*$(SIZE_Y)/2}'`
|
68
|
+
START_Z=`awk 'BEGIN { print -1*$(DELTA)*$(SIZE_Z)/2}'`
|
69
|
+
SNRATIO=3
|
70
|
+
###############################
|
71
|
+
|
72
|
+
Help::
|
73
|
+
@echo "----- Makefile for Single Particle with Reference"
|
74
|
+
@echo "1. Prepare files from EM images, which has a suffix of roi "
|
75
|
+
@echo "2. Prepare an initial model as $(INITIAL).3d "
|
76
|
+
@echo "3. make First"
|
77
|
+
@echo "4. make All"
|
78
|
+
@echo "If you want to repeat refinement again, "
|
79
|
+
@echo " 1. make Again"
|
80
|
+
@echo " 2. make All"
|
81
|
+
@echo ""
|
82
|
+
@echo "--- If you want to create an initail model from PDB ---"
|
83
|
+
@echo " make InitialModel"
|
84
|
+
@echo ""
|
85
|
+
@echo "--- If you want to create an test from the initial model ---"
|
86
|
+
@echo " make TestData"
|
87
|
+
|
88
|
+
pad:$(ROIs:.roi=.pad)
|
89
|
+
corinfo:$(PADs:.pad=.corinfo)
|
90
|
+
3dinfo:$(CORINFOs:.corinfo=.3dinfo)
|
91
|
+
fit:$(ROIs:.roi=.fit)
|
92
|
+
3dlst:$(3DINFOs:.3dinfo=.3dlst)
|
93
|
+
3d:$(3DLIST:.3dlst=.3d)
|
94
|
+
corinfo2:$(CORINFOs:.corinfo=.corinfo2)
|
95
|
+
parcorinfolst:$(CORINFO2s:.corinfo2=.parcorinfolst)
|
96
|
+
|
97
|
+
#
|
98
|
+
#
|
99
|
+
#
|
100
|
+
InitialModel::
|
101
|
+
pdb2mrc -i $(REFSOURCE).pdb -o $(INITIAL).3d -nx $(SIZE_X) -ny $(SIZE_Y) -nz $(SIZE_Z) -Sx $(START_X) -Sy $(START_Y) -Sz $(START_Z) -dx $(DELTA) -dy $(DELTA) -dz $(DELTA) -m 1
|
102
|
+
|
103
|
+
TestData::
|
104
|
+
@for (( rot1 = $(ROT1MIN); rot1 <= $(ROT1MAX); rot1 += $(ROT1D)*2 )) \
|
105
|
+
do \
|
106
|
+
for (( rot2 = $(ROT2MIN); rot2 <= $(ROT2MAX); rot2 += $(ROT2D)*2 )) \
|
107
|
+
do \
|
108
|
+
for (( rot3 = $(ROT3MIN); rot3 <= $(ROT3MAX); rot3 += $(ROT3D)*2 )) \
|
109
|
+
do \
|
110
|
+
echo $$rot1, $$rot2, $$rot3; \
|
111
|
+
mrc3Dto2D -i $(INITIAL).3d -o $(REFSOURCE)-$$rot1-$$rot2-$$rot3.roi \
|
112
|
+
-InterpolationMode 2 -EulerMode $(ROTMODE) \
|
113
|
+
-Rot1 $$rot1 $$rot1 1 \
|
114
|
+
-Rot2 $$rot2 $$rot2 1 \
|
115
|
+
-Rot3 $$rot3 $$rot3 1 ; \
|
116
|
+
done \
|
117
|
+
done \
|
118
|
+
done
|
119
|
+
|
120
|
+
TestDataNoise::
|
121
|
+
@for (( rot1 = $(ROT1MIN); rot1 <= $(ROT1MAX); rot1 += $(ROT1D)*2 )) \
|
122
|
+
do \
|
123
|
+
for (( rot2 = $(ROT2MIN); rot2 <= $(ROT2MAX); rot2 += $(ROT2D)*2 )) \
|
124
|
+
do \
|
125
|
+
for (( rot3 = $(ROT3MIN); rot3 <= $(ROT3MAX); rot3 += $(ROT3D)*2 )) \
|
126
|
+
do \
|
127
|
+
echo $$rot1, $$rot2, $$rot3; \
|
128
|
+
name="$(REFSOURCE)-noise-$$rot1-$$rot2-$$rot3.roi"; \
|
129
|
+
mrc3Dto2D -i $(INITIAL).3d -o $$name.noNoise \
|
130
|
+
-InterpolationMode 2 -EulerMode $(ROTMODE) \
|
131
|
+
-Rot1 $$rot1 $$rot1 1 \
|
132
|
+
-Rot2 $$rot2 $$rot2 1 \
|
133
|
+
-Rot3 $$rot3 $$rot3 1 ; \
|
134
|
+
mrcImageNoiseAdd -i $$name.noNoise -o $$name -SN $(SNRATIO) ; \
|
135
|
+
rm $$name.noNoise ; \
|
136
|
+
done \
|
137
|
+
done \
|
138
|
+
done
|
139
|
+
|
140
|
+
##############
|
141
|
+
ROIs::
|
142
|
+
touch ROIs
|
143
|
+
echo "ROIs=\\" > ROIs
|
144
|
+
find -name "*.roi" -type f | sed s/..// | xargs ls -1 | sed s/roi/roi\\\\/ >> ROIs
|
145
|
+
echo "" >> ROIs
|
146
|
+
|
147
|
+
CORINFOs::
|
148
|
+
touch CORINFOs
|
149
|
+
echo "CORINFOs=\\" > CORINFOs
|
150
|
+
find -name "*.corinfo" -type f | sed s/..// | xargs ls -1 | sed s/corinfo/corinfo\\\\/ >> CORINFOs
|
151
|
+
echo "" >> CORINFOs
|
152
|
+
|
153
|
+
PADs::
|
154
|
+
touch PADs
|
155
|
+
echo "PADs=\\" > PADs
|
156
|
+
find -name "*.pad" -type f | sed s/..// | xargs ls -1 | sed s/pad/pad\\\\/ >> PADs
|
157
|
+
echo "" >> PADs
|
158
|
+
|
159
|
+
3DINFOs::
|
160
|
+
touch 3DINFOs
|
161
|
+
echo "3DINFOs=\\" > 3DINFOs
|
162
|
+
find -name "*.3dinfo" -type f | sed s/..// | xargs ls -1 | sed s/3dinfo/3dinfo\\\\/ >> 3DINFOs
|
163
|
+
echo "" >> 3DINFOs
|
164
|
+
|
165
|
+
3DLIST::
|
166
|
+
touch 3DLIST
|
167
|
+
echo "3DLIST=\\" > 3DLIST
|
168
|
+
find -name "*.3dlst" -type f | sed s/..// | xargs ls -1 | sed s/3dlst/3dlst\\\\/ >> 3DLIST
|
169
|
+
echo "" >> 3DLIST
|
170
|
+
|
171
|
+
CORINFO2s::
|
172
|
+
touch CORINFO2s
|
173
|
+
echo "CORINFO2s=\\" > CORINFO2s
|
174
|
+
find -name "*.corinfo2" -type f | sed s/..// | xargs ls -1 | sed s/corinfo2/corinfo2\\\\/ >> CORINFO2s
|
175
|
+
echo "" >> CORINFO2s
|
176
|
+
|
177
|
+
##############
|
178
|
+
First::
|
179
|
+
cp $(INITIAL).3d $(TARGET).ref3d
|
180
|
+
touch *.roi
|
181
|
+
|
182
|
+
All::
|
183
|
+
make $(TARGET).ref2d;
|
184
|
+
make ROIs;
|
185
|
+
make $(JOP_NUM) pad;
|
186
|
+
make PADs;
|
187
|
+
make $(JOP_NUM) corinfo;
|
188
|
+
make CORINFOs;
|
189
|
+
make $(JOP_NUM) 3dinfo;
|
190
|
+
make 3DINFOs;
|
191
|
+
make $(JOP_NUM) 3dlst;
|
192
|
+
make 3DLIST;
|
193
|
+
make $(TARGET).3d;
|
194
|
+
|
195
|
+
Again::
|
196
|
+
touch *.pad
|
197
|
+
cp $(TARGET).3d $(TARGET).ref3d;
|
198
|
+
TMPNAME=`date +%y%m%d%H%M%S`; \
|
199
|
+
mv $(TARGET).3dlst $(TARGET).3dlst.$$TMPNAME; \
|
200
|
+
mv $(TARGET).3d $(TARGET).3d.$$TMPNAME; \
|
201
|
+
mv $(TARGET).3dsm $(TARGET).3dsm.$$TMPNAME; \
|
202
|
+
mv $(TARGET).ds6 $(TARGET).ds6.$$TMPNAME; \
|
203
|
+
mv $(TARGET).3dsmds6 $(TARGET).3dsmds6.$$TMPNAME;
|
204
|
+
|
205
|
+
|
206
|
+
#### Prepare Reference ####
|
207
|
+
|
208
|
+
.ref3d.ref2d:
|
209
|
+
mrc3Dto2D -i $(TARGET).ref3d -o $(TARGET).ref2d -EulerMode $(ROTMODE) -InterpolationMode 2 -Rot2 $(ROT2MIN) $(ROT2MAX) $(ROT2D) -Rot1 $(ROT1MIN) $(ROT1MAX) $(ROT1D) -Rot3 $(ROT3MIN) $(ROT3MAX) $(ROT3D) -m 0
|
210
|
+
|
211
|
+
.roi.pad:
|
212
|
+
mrcImageWindowing -i $*.roi -o $*.mask -W 0.1 0.0 0.05 0.0 -m 18
|
213
|
+
mrcImagePad -i $*.mask -o $*.padtmp -W $(PAD_W) -H $(PAD_H) -m 3
|
214
|
+
mrcImageWindowing -i $*.padtmp -o $*.pad -W 0.1 0.0 0.1 0.0 -m 2
|
215
|
+
|
216
|
+
.pad.corinfo:
|
217
|
+
mrcImageAutoRotationCorrelation -i $*.pad -r $(TARGET).ref2d -O $*.corinfo -fit $*.fit -cor $*.cormap -n $(nRot) -m 18 -range $(ROTMIN) $(ROTMAX) -Iter 2 -nRot2 $(nRot2) -nRot1 $(nRot1) -nRot3 $(nRot3) 2> /dev/null
|
218
|
+
|
219
|
+
##############################################################################
|
220
|
+
|
221
|
+
|
222
|
+
.corinfo.3dinfo:
|
223
|
+
awk '/Cor/ { print $$7,$$16,$$2,$$3,$$4,$$5,$$9,$$11,$$12}' $*.corinfo | sort -r | sed -e s/.pad/.fit/ > $*.3dinfolst
|
224
|
+
head -n 1 $*.3dinfolst | awk '{print $$2,$$3,$$4,$$5,$$6,$$1}' > $*.3dinfo
|
225
|
+
## ##18 -> ##7 ##
|
226
|
+
|
227
|
+
.3dinfo.3dlst:
|
228
|
+
cat $*.3dinfo >> $(TARGET).3dlst
|
229
|
+
|
230
|
+
.3dlst.3d:
|
231
|
+
mrc2Dto3D -I $(TARGET).3dlst -o $(TARGET).3d -InterpolationMode 2 -Double -DoubleCounter $(TARGET).3dcounter -CounterThreshold 0.5 -m 1 -WeightMode 2
|
232
|
+
|
233
|
+
.3d.3dsm:
|
234
|
+
mrcImageSmoothing -i $(TARGET).3d -o $(TARGET).3dsm -m 1 -M 1 -r 3
|
235
|
+
|
236
|
+
.3dsm.3dsmCenter:
|
237
|
+
mrcImageCenterGet -i $(TARGET).3dsm -o $(TARGET).3dsmCenter -Nx 128 -Ny 128 -Nz 128
|
238
|
+
|
239
|
+
.3dsmCenter.ds6:
|
240
|
+
mrc2map -i $(TARGET).3dsmCenter -o $(TARGET).ds6 -m 3
|
241
|
+
|
242
|
+
.3d.ds6:
|
243
|
+
mrc2map -i $*.3d -o $*.ds6 -m 0
|
244
|
+
|
245
|
+
#####Select Particles#####
|
246
|
+
|
247
|
+
.corinfo.corinfo2:
|
248
|
+
awk '/Cor/ { print $$18,$$16,$$2,$$3,$$4,$$5,$$9,$$11,$$12}' $*.corinfo | sort -r | sed -e 's/.roi/.fit/' > $*.corinfolst
|
249
|
+
head -n 1 $*.corinfolst | awk '{if($(PAD_W)-$$8>=$$8&&$(PAD_H)-$$9>=$$9) print $$1,$$2,$$3,$$4,$$5,$$6,$$7,0+$$8,0+$$9;else if($(PAD_W)-$$8>=$$8) print $$1,$$2,$$3,$$4,$$5,$$6,$$7,0+$$8,$(PAD_H)-$$9;else if($(PAD_H)-$$9>=$$9) print $$1,$$2,$$3,$$4,$$5,$$6,$$7,$(PAD_W)-$$8,0+$$9;else print $$1,$$2,$$3,$$4,$$5,$$6,$$7,$(PAD_W)-$$8,$(PAD_H)-$$9}' > $*.corinfo2
|
250
|
+
|
251
|
+
.corinfo2.parcorinfolst:
|
252
|
+
cat $*.corinfo2 >> $(TARGET).parcorinfolst
|
253
|
+
|
254
|
+
CorinfoSort::
|
255
|
+
awk '{ print $$1,$$2,$$3,$$4,$$5,$$6,$$7,$$8,$$9}' $(TARGET).parcorinfolst | sort -r > $(TARGET).parcorinfolstsort
|
256
|
+
|
257
|
+
SelectParticle::
|
258
|
+
awk '$$1 >= $(COR_THRESHOLD) || $$9 <= $(Y_SHIFT_THRESHOLD){print $$2,$$3,$$4,$$5,$$6,$$1}' $(TARGET).parcorinfolstsort > $(TARGET).3dlstselect
|
259
|
+
|
260
|
+
|
261
|
+
#####Check alignment#####
|
262
|
+
|
263
|
+
GnuplotCorinfo::
|
264
|
+
awk '{ print $$1,$$9}' $(TARGET).parcorinfolst | sort -r > $(TARGET).gnuplotcorinfolst
|
265
|
+
####################################################
|
266
|
+
##gnuplot
|
267
|
+
##set out "Corinfo.ps"
|
268
|
+
##plot "$(TARGET).gnuplotcorinfolst"
|
269
|
+
###################################################
|
270
|
+
|
271
|
+
GnuplotAngle::
|
272
|
+
awk '{ print $$4,$$5}' $(TARGET).parcorinfolst > $(TARGET).gnuplotanglelst
|
273
|
+
######################################################
|
274
|
+
##gnuplot
|
275
|
+
##set out "Angle.ps"
|
276
|
+
##plot "$(TARGET).gnuplotanglelst"
|
277
|
+
######################################################
|
278
|
+
|
279
|
+
GnuplotShift::
|
280
|
+
awk '{ print $$4,$$5}' $(TARGET).parcorinfolst > $(TARGET).gnuplotshiftlst
|
281
|
+
######################################################
|
282
|
+
##gnuplot
|
283
|
+
##set out "Shift.ps"
|
284
|
+
##plot "$(TARGET).gnuplotshiftlst"
|
285
|
+
######################################################
|
286
|
+
|
287
|
+
MontageList::
|
288
|
+
awk '{ print $$1}' $(TARGET).3dlst > $(TARGET).monlst
|
289
|
+
mrcImageMontageCreate -i $(TARGET).monlst -o $(TARGET).mon -nx 15 -ny 10
|
@@ -0,0 +1,153 @@
|
|
1
|
+
#
|
2
|
+
# Eos for 3D reconstrucion from 2D rois using 3D initail reference
|
3
|
+
#
|
4
|
+
|
5
|
+
.SUFFIXES: .3d .ref3d .ref2d .pad .padtmp .mask .maskfit .fit .fitmask .roi .corinfo .3dinfo .3dlst .3d .corinfo2 .corinfolst .cormap
|
6
|
+
|
7
|
+
SHELL=/bin/bash
|
8
|
+
|
9
|
+
-include ROIs
|
10
|
+
-include CORINFOs
|
11
|
+
-include PADs
|
12
|
+
-include 3DINFOs
|
13
|
+
-include 3DLIST
|
14
|
+
|
15
|
+
#
|
16
|
+
# Initial Reference Model
|
17
|
+
INITIAL=initial
|
18
|
+
# Target structure name
|
19
|
+
TARGET=all
|
20
|
+
|
21
|
+
# Simultaneous Jobs for AutoRotaionCorrelation
|
22
|
+
JOP_NUM=-j 3
|
23
|
+
|
24
|
+
#
|
25
|
+
# Search Area for 3D
|
26
|
+
#
|
27
|
+
ROTMODE=YOYS
|
28
|
+
# Rot1
|
29
|
+
ROT1MIN=0
|
30
|
+
ROT1MAX=359
|
31
|
+
ROT1D=30
|
32
|
+
nRot1=12
|
33
|
+
#
|
34
|
+
ROT2MIN=0
|
35
|
+
ROT2MAX=359
|
36
|
+
ROT2D=30
|
37
|
+
nRot2=12
|
38
|
+
# Rot3
|
39
|
+
ROT3MIN=0
|
40
|
+
ROT3MAX=0
|
41
|
+
ROT3D=30
|
42
|
+
nRot3=1
|
43
|
+
# For 2D
|
44
|
+
STEP=12
|
45
|
+
ROTMIN=0
|
46
|
+
ROTMAX=359
|
47
|
+
nRot=`echo "" | awk 'BEGIN {printf 360 / $(STEP)}'`
|
48
|
+
|
49
|
+
# Seletion Step
|
50
|
+
COR_THRESHOLD=0.4
|
51
|
+
Y_SHIFT_THRESHOLD=20
|
52
|
+
|
53
|
+
# Pad size for 2D
|
54
|
+
PAD_W=64
|
55
|
+
PAD_H=64
|
56
|
+
|
57
|
+
###
|
58
|
+
### Initial model from PDB
|
59
|
+
###
|
60
|
+
REFSOURCE=121p-shift
|
61
|
+
DELTA=2.5
|
62
|
+
SIZE_X=64
|
63
|
+
SIZE_Y=64
|
64
|
+
SIZE_Z=64
|
65
|
+
START_X=`awk 'BEGIN { print -1*$(DELTA)*$(SIZE_X)/2}'`
|
66
|
+
START_Y=`awk 'BEGIN { print -1*$(DELTA)*$(SIZE_Y)/2}'`
|
67
|
+
START_Z=`awk 'BEGIN { print -1*$(DELTA)*$(SIZE_Z)/2}'`
|
68
|
+
SNRATIO=3
|
69
|
+
###############################
|
70
|
+
|
71
|
+
all:
|
72
|
+
$(MAKE) ROIs;
|
73
|
+
$(MAKE) $(JOP_NUM) pad;
|
74
|
+
$(MAKE) PADs;
|
75
|
+
$(MAKE) $(JOP_NUM) corinfo;
|
76
|
+
$(MAKE) CORINFOs;
|
77
|
+
$(MAKE) $(JOP_NUM) 3dinfo;
|
78
|
+
$(MAKE) 3DINFOs;
|
79
|
+
$(MAKE) $(JOP_NUM) 3dlst;
|
80
|
+
$(MAKE) 3DLIST;
|
81
|
+
$(MAKE) $(TARGET).3d;
|
82
|
+
|
83
|
+
clean:
|
84
|
+
$(RM) -f *.pad *.padtmp *.mask *.cormap *.fit *.3dinfo *.3dinfolst *.corinfo
|
85
|
+
$(RM) -f all.3dcounter all.3d all.3dlst
|
86
|
+
$(RM) -f ROIs CORINFOs PADs 3DINFOs 3DLIST
|
87
|
+
$(RM) -f .EosLog
|
88
|
+
|
89
|
+
##############
|
90
|
+
|
91
|
+
pad:$(ROIs:.roi=.pad)
|
92
|
+
corinfo:$(PADs:.pad=.corinfo)
|
93
|
+
3dinfo:$(CORINFOs:.corinfo=.3dinfo)
|
94
|
+
fit:$(ROIs:.roi=.fit)
|
95
|
+
3dlst:$(3DINFOs:.3dinfo=.3dlst)
|
96
|
+
3d:$(3DLIST:.3dlst=.3d)
|
97
|
+
|
98
|
+
##############
|
99
|
+
|
100
|
+
ROIs::
|
101
|
+
touch ROIs
|
102
|
+
echo "ROIs=\\" > ROIs
|
103
|
+
find -name "*.roi" -type f | sed s/..// | xargs ls -1 | sed s/roi/roi\\\\/ >> ROIs
|
104
|
+
echo "" >> ROIs
|
105
|
+
|
106
|
+
CORINFOs::
|
107
|
+
touch CORINFOs
|
108
|
+
echo "CORINFOs=\\" > CORINFOs
|
109
|
+
find -name "*.corinfo" -type f | sed s/..// | xargs ls -1 | sed s/corinfo/corinfo\\\\/ >> CORINFOs
|
110
|
+
echo "" >> CORINFOs
|
111
|
+
|
112
|
+
PADs::
|
113
|
+
touch PADs
|
114
|
+
echo "PADs=\\" > PADs
|
115
|
+
find -name "*.pad" -type f | sed s/..// | xargs ls -1 | sed s/pad/pad\\\\/ >> PADs
|
116
|
+
echo "" >> PADs
|
117
|
+
|
118
|
+
3DINFOs::
|
119
|
+
touch 3DINFOs
|
120
|
+
echo "3DINFOs=\\" > 3DINFOs
|
121
|
+
find -name "*.3dinfo" -type f | sed s/..// | xargs ls -1 | sed s/3dinfo/3dinfo\\\\/ >> 3DINFOs
|
122
|
+
echo "" >> 3DINFOs
|
123
|
+
|
124
|
+
3DLIST::
|
125
|
+
touch 3DLIST
|
126
|
+
echo "3DLIST=\\" > 3DLIST
|
127
|
+
find -name "*.3dlst" -type f | sed s/..// | xargs ls -1 | sed s/3dlst/3dlst\\\\/ >> 3DLIST
|
128
|
+
echo "" >> 3DLIST
|
129
|
+
|
130
|
+
#### Prepare Reference ####
|
131
|
+
|
132
|
+
.roi.pad:
|
133
|
+
mrcImageWindowing -i $*.roi -o $*.mask -W 0.1 0.0 0.05 0.0 -m 18
|
134
|
+
mrcImagePad -i $*.mask -o $*.padtmp -W $(PAD_W) -H $(PAD_H) -m 3
|
135
|
+
mrcImageWindowing -i $*.padtmp -o $*.pad -W 0.1 0.0 0.1 0.0 -m 2
|
136
|
+
|
137
|
+
.pad.corinfo:
|
138
|
+
mrcImageAutoRotationCorrelation -i $*.pad -r $(TARGET).ref2d -O $*.corinfo -fit $*.fit -cor $*.cormap -n $(nRot) -m 18 -range $(ROTMIN) $(ROTMAX) -Iter 2 -nRot2 $(nRot2) -nRot1 $(nRot1) -nRot3 $(nRot3) 2> /dev/null
|
139
|
+
|
140
|
+
##############################################################################
|
141
|
+
|
142
|
+
|
143
|
+
.corinfo.3dinfo:
|
144
|
+
awk '/Cor/ { print $$7,$$16,$$2,$$3,$$4,$$5,$$9,$$11,$$12}' $*.corinfo | sort -r | sed -e s/.pad/.fit/ > $*.3dinfolst
|
145
|
+
head -n 1 $*.3dinfolst | awk '{print $$2,$$3,$$4,$$5,$$6,$$1}' > $*.3dinfo
|
146
|
+
## ##18 -> ##7 ##
|
147
|
+
|
148
|
+
.3dinfo.3dlst:
|
149
|
+
cat $*.3dinfo >> $(TARGET).3dlst
|
150
|
+
|
151
|
+
.3dlst.3d:
|
152
|
+
mrc2Dto3D -I $(TARGET).3dlst -o $(TARGET).3d -InterpolationMode 2 -Double -DoubleCounter $(TARGET).3dcounter -CounterThreshold 0.5 -m 1 -WeightMode 2
|
153
|
+
|