Пример #1
0
 def process(self, **kwargs):
     output_dir = self.project_dir
     if BLredis.get('SMX') =='0':
         file_to_link = 'CORRECT.LP_hsymm'
     elif BLredis.get('SMX') == '1':
         return
     src = os.path.join(output_dir, file_to_link)
     dst = os.path.join(output_dir, 'CORRECT.LP')
     try:
         os.symlink(src, dst)
     except:
         print "warning, %s to %s symlink could not be made" % (src, dst)
Пример #2
0
    def run_xdsme(self, extra):
        hostname = socket.gethostname().split('.')[0]
        args = get_xdsme_commandline(hostname)
        if int(BLredis.get('SMX')) == 1:
            args.extend(['--index_refine'])
        args.extend(['-p', self.output.project])
        if self.XDS_INPUT:
            args.extend(['-i', ' '.join(self.XDS_INPUT)])
        if self.p1:
            sg, cell = self.__get_cell_and_sg()
            args.extend(['-s', sg])
            args.extend(['-c', cell])
        args.extend(self.args)
        args.extend(extra)
        args.extend(self.output.images)

        if args[0] in ['xdsme', 'nice']:
            call(args, cwd=self.base_dir)
        else:
            labels=dict(
                  epn=mxvars.EPN,
                  project=self.output.project,
                  xds="master")
            try:
                jib_request = dict(labels=labels, working_dir=self.base_dir, hostname=hostname.lower())
                call(args, stderr=STDOUT, env={"JIB_REQUEST":json.dumps(jib_request)})
            except CalledProcessError as e:
                print 'call error output and returncode', e.output, e.returncode
        os.makedirs(newdir)
        os.symlink(newdir, 'AR')
    except EnvironmentError:
        pass
else:
    print "Something funny happened while trying to figure out the unique dir. Not parsing this file"
    print runall()
    sys.exit()

newkey = 'shelx:trigger'
correct_file = "CORRECT.LP_hsymm"
table_header = "SUBSET OF INTENSITY DATA WITH SIGNAL/NOISE >= -3.0 AS FUNCTION OF RESOLUTION"
table_offest = 4  #start of data
table_size = 14  #total table size

if redis.get(newkey):
    print 'clear redis anom key'
    print redis.get(newkey)
    redis.set(newkey, json.dumps('off'))
else:
    print "redis was empty"
    redis.set(newkey, json.dumps('off'))

anon_cutoff = 15
anon_col = 11
res_col = 0

get_number = lambda x: int(re.sub(r'[^-\d.]+', '', x))

# get table from correct file
try:
Пример #4
0
from beamline import redis
import pickle
import pandas as pd

# for getting the COVID pdbs off redis and into a spreadsheet

redpickle = redis.get('eleanor:covid_pdb_getter:something')

cov_data = pickle.loads(redpickle)

# convert dataframe to csv
cov_data.to_csv(r"Rapid_access_PDBs_2020.csv", header=True, index=False)
Пример #5
0
    Setup(suffix='retrigger', detector=blconfig.detector_type),
    XDSme(base, base, '-a', subtype='r'), po,
    Aimless(base),
    AimlessPlot(base),
    AimlessScalePlot(base),
    CountOverloads(base),
    XDSme('p1', 'p1', '-5', '-a', p1=True),
    XDSme(base + '_NOANOM', base + '_NOANOM', '-5'),
    Truncate(base),
    LinkCorrect(base),
    Autorickshaw(base),
    RunSpreadsheetCalculator(base)
]

from beamline import redis as BLredis
if int(BLredis.get('SMX')) == 1:
    if blconfig.detector_type == 'eiger':  #TODO get this information from collection object
        delphi = 'DELPHI=15'
    else:
        delphi = 'DELPHI=45'

    p1n = 'p1_noscale'
    hsn = 'hsymm_noscale'

    po = Pointless(base, nonchiral=True)

    default = [
        Setup(suffix='process', detector=blconfig.detector_type),
        CornerResolution(base),
        XDSme(base, base, '-a', '-i', delphi, subtype='p'), po,
        Aimless(base),