Attachment 'e2runfrealign.py'
Download 1 #!/usr/bin/env python
2 # Author: Stephen Murray (scmurray@bcm.edu), 2/14/11
3 # Copyright (c) 2000-2011 Baylor Colelge of Medicine
4
5 # Official copyright notice. EMAN2 is distributed under a joint GPL/BSD license. Please copy
6 # this statement from one of the other programs. You must agree to use this license if your
7 # code is distributed with EMAN2. While you may use your own institution for the copyright notice
8 # the terms of the GPL/BSD license permit us to redistribute it.
9
10 # import block
11 import os
12 import sys
13 from EMAN2 import *
14
15 if len(sys.argv) != 1:
16 print "Please use e2runfrealign.py"
17 exit(-1)
18
19 E2n=E2init(sys.argv)
20
21 os.system('clear')
22 os.system('cp 3DMapInOut.mrc 3DMapInOut.mrc.old')
23 os.system('cp ptcl_meta_data ptcl_meta_data.old')
24 dir_list = os.listdir('.')
25 dir_list.sort()
26 high = 0
27 for item in dir_list:
28 if len(item) > 6:
29 if item[:4] == 'card':
30 item = item.replace(".txt",'')
31 item = item.replace("card",'')
32 if int(item) > high:
33 high = int(item)
34
35 if high == 0:
36 high = high + 1
37 for i in range(high):
38 os.system('frealign_v8.exe < card' + str(i) + '.txt')
39 if i < 10:
40 k = '0' + str(i)
41 else:
42 k = str(i)
43 s = "cp 3DMapInOut.mrc OutputMap_" + k +".mrc"
44 os.system(s)
45 s = "cp OutParam OutParam_" + k
46 os.system(s)
47 os.system('mv OutParam ptcl_meta_data')
48 s = "cp OutParamShift OutParamShift_" + k
49 os.system(s)
50 os.system('cp 3DMapInOut.mrc.old 3DMapInOut.mrc')
51
52 os.system('mv 3DMapInOut.mrc.old 3DMapInOut.mrc')
53 os.system('mv ptcl_meta_data.old ptcl_meta_data')
54
55 print "e2runfrealign.py finished"
56
57 E2end(E2n)
Attached Files
To refer to attachments on a page, use attachment:filename, as shown below in the list of files. Do NOT use the URL of the [get] link, since this is subject to change and can break easily.- [get | view] (2011-10-26 21:54:10, 1.5 KB) [[attachment:e2runfrealign.py]]
- [get | view] (2011-10-26 21:54:10, 1024.0 KB) [[attachment:frealign_2256.exe]]
- [get | view] (2011-10-26 21:54:10, 1050.0 KB) [[attachment:frealign_mac_2256.tar]]
You are not allowed to attach a file to this page.