コード例 #1
0
from ibl_pipeline import reference, subject, action, acquisition, data
from ingest_utils import copy_table


REF_TABLES = (
    'Lab',
    'LabMember',
    'LabMembership',
    'LabLocation',
    'Project',
    'ProjectLabMember'
)

for table in REF_TABLES:
    print(table)
    copy_table(reference, reference_ingest, table)

SUBJECT_TABLES = (
    'Species',
    'Strain',
    'Source',
    'Sequence',
    'Allele',
    'AlleleSequence',
    'Line',
    'LineAllele',
    'Subject',
    'BreedingPair',
    'Litter',
    'LitterSubject',
    'Weaning',
コード例 #2
0
from ibl_pipeline import reference, subject, action, acquisition, data, ephys, histology
from ingest_utils import copy_table
from table_names import *

if __name__ == '__main__':

    mods = [[reference, reference_ingest, REF_TABLES],
            [subject, subject_ingest, SUBJECT_TABLES],
            [action, action_ingest, ACTION_TABLES],
            [acquisition, acquisition_ingest, ACQUISITION_TABLES],
            [data, data_ingest, DATA_TABLES]]

    for (target, source, table_list) in mods:
        for table in table_list:
            print(table)
            copy_table(target, source, table)

    # ephys tables
    table = 'ProbeModel'
    print(table)
    copy_table(ephys, ephys_ingest, table)

    table = 'ProbeInsertion'
    print(table)
    copy_table(ephys, ephys_ingest, table, allow_direct_insert=True)

    # histology tables
    print('ProbeTrajectory')
    histology.ProbeTrajectory.populate(suppress_errors=True,
                                       display_progress=True)