bug
parent
dbd9c852a8
commit
d3173ebb75
25
tools/t7.py
25
tools/t7.py
|
|
@ -79,7 +79,7 @@ class AutoLayout:
|
||||||
self.chip_speciallib_size[chipname] = library_data['size']
|
self.chip_speciallib_size[chipname] = library_data['size']
|
||||||
else:
|
else:
|
||||||
self.chip_speciallib_size[chipname] = 0
|
self.chip_speciallib_size[chipname] = 0
|
||||||
if 'Nextera' in library_data['classification'].lower():
|
if 'nextera' in library_data['classification'].lower():
|
||||||
self.chip_speciallib_nextera_size[chipname] = library_data['size']
|
self.chip_speciallib_nextera_size[chipname] = library_data['size']
|
||||||
else:
|
else:
|
||||||
self.chip_speciallib_nextera_size[chipname] = 0
|
self.chip_speciallib_nextera_size[chipname] = 0
|
||||||
|
|
@ -88,7 +88,7 @@ class AutoLayout:
|
||||||
self.chip_size[chipname] += library_data['size']
|
self.chip_size[chipname] += library_data['size']
|
||||||
if library_data['is_balance_lib'] == '否':
|
if library_data['is_balance_lib'] == '否':
|
||||||
self.chip_speciallib_size[chipname] += library_data['size']
|
self.chip_speciallib_size[chipname] += library_data['size']
|
||||||
if 'Nextera' in library_data['classification'].lower():
|
if 'nextera' in library_data['classification'].lower():
|
||||||
self.chip_speciallib_nextera_size[chipname] += library_data['size']
|
self.chip_speciallib_nextera_size[chipname] += library_data['size']
|
||||||
|
|
||||||
def count_barcode_radio(self, data):
|
def count_barcode_radio(self, data):
|
||||||
|
|
@ -236,22 +236,23 @@ class AutoLayout:
|
||||||
|
|
||||||
def add_loc_num(self):
|
def add_loc_num(self):
|
||||||
# 有nextera文库 必须满足大于50G
|
# 有nextera文库 必须满足大于50G
|
||||||
nextera_size = self.chip_speciallib_nextera_size[f'chip{self.loc_chip_num}']
|
chipname = f'chip{self.loc_chip_num}'
|
||||||
|
nextera_size = self.chip_speciallib_nextera_size[chipname]
|
||||||
if nextera_size > 50 or nextera_size == 0:
|
if nextera_size > 50 or nextera_size == 0:
|
||||||
self.loc_chip_num += 1
|
self.loc_chip_num += 1
|
||||||
else:
|
else:
|
||||||
# 有nextera文库,但是不满足50G 去除
|
# 有nextera文库,但是不满足50G 去除
|
||||||
nextary_barcode = set()
|
nextary_barcode = set()
|
||||||
no_nextary_data = list()
|
no_nextary_data = list()
|
||||||
for libdata in self.index_assignments[self.loc_chip_num]:
|
for libdata in self.index_assignments[chipname]:
|
||||||
if libdata['classification'].lower() != 'nextera':
|
if libdata['classification'].lower() != 'nextera':
|
||||||
no_nextary_data.append(libdata)
|
no_nextary_data.append(libdata)
|
||||||
|
|
||||||
else:
|
else:
|
||||||
self.no_assign_data.extend(libdata['data'])
|
self.no_assign_data.append(libdata)
|
||||||
nextary_barcode.update(set([nextera_data['barcode'] for nextera_data in libdata['data']]))
|
nextary_barcode.update(libdata['barcode'])
|
||||||
|
self.index_assignments[chipname] = no_nextary_data
|
||||||
self.chip_barcode_recode[self.loc_chip_num] -= nextary_barcode
|
self.chip_barcode_recode[chipname] -= nextary_barcode
|
||||||
|
self.chip_speciallib_nextera_size[chipname] = 0
|
||||||
|
|
||||||
def assign_samples(self):
|
def assign_samples(self):
|
||||||
ori_library_data = list()
|
ori_library_data = list()
|
||||||
|
|
@ -261,7 +262,8 @@ class AutoLayout:
|
||||||
ori_library_df = pd.DataFrame(self.ori_data['未测'])
|
ori_library_df = pd.DataFrame(self.ori_data['未测'])
|
||||||
|
|
||||||
need_col = ['status', '#library', 'sublibrary', 'i5', 'i7', 'data_needed', 'real_data', 'customer',
|
need_col = ['status', '#library', 'sublibrary', 'i5', 'i7', 'data_needed', 'real_data', 'customer',
|
||||||
'classification', 'priority', 'time', '拆分方式', 'barcode', 'is_balance_lib', '备注'
|
'classification', 'priority', 'time', '拆分方式', 'barcode', 'is_balance_lib', '备注',
|
||||||
|
'TIPS1', 'TIPS2', 'TIPS3'
|
||||||
]
|
]
|
||||||
get_col = set(ori_library_df.columns)
|
get_col = set(ori_library_df.columns)
|
||||||
unhave_col = set(need_col) - get_col
|
unhave_col = set(need_col) - get_col
|
||||||
|
|
@ -382,8 +384,11 @@ class AutoLayout:
|
||||||
chip_loc = 1
|
chip_loc = 1
|
||||||
librarynum = 0
|
librarynum = 0
|
||||||
for chip_idx, chip_assignments in self.index_assignments.items():
|
for chip_idx, chip_assignments in self.index_assignments.items():
|
||||||
|
if not chip_assignments:
|
||||||
|
continue
|
||||||
df = pd.DataFrame(chip_assignments)
|
df = pd.DataFrame(chip_assignments)
|
||||||
df['time'] = df['time'].dt.strftime('%Y-%m-%d')
|
df['time'] = df['time'].dt.strftime('%Y-%m-%d')
|
||||||
|
|
||||||
if df['data_needed'].sum() < 1600 or librarynum > self.librarynum:
|
if df['data_needed'].sum() < 1600 or librarynum > self.librarynum:
|
||||||
self.no_assign_data.extend(df.to_dict('records'))
|
self.no_assign_data.extend(df.to_dict('records'))
|
||||||
continue
|
continue
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue