AllenInstitute / brain_observatory_qc

Other
2 stars 0 forks source link

From lims update #409

Closed DowntonCrabby closed 2 months ago

DowntonCrabby commented 2 months ago

Updates several .py files in the data_access module:

from_lims
from_lims_utilities 
utilities

Updates made were to allow workarounds for getting general info for experiments that do not have a container assigned to them.

an example of how the new workaround can be done is:

import pandas as pd
import from_lims_utilities as lims_utils

c_exp = 1345581430 # id with container
n_exp = 1343780655 # id with no container

missing_container = lims_utils.experiment_missing_container(n_exp)
if missing_container == False:
    general_info = lims_utils.get_general_info_for_LIMS_imaging_id("ophys_experiment_id", n_exp)
else:
    general_info = lims_utils.get_general_info_for_LIMS_imaging_id_no_container("ophys_experiment_id", c_exp)

general_info

or thefrom_lims.get_general_info_for_ophys_experiment_id function incorporates that exact logic and should now work with experiments that have containers or not.