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']
|
||||
else:
|
||||
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']
|
||||
else:
|
||||
self.chip_speciallib_nextera_size[chipname] = 0
|
||||
|
|
@ -88,7 +88,7 @@ class AutoLayout:
|
|||
self.chip_size[chipname] += library_data['size']
|
||||
if library_data['is_balance_lib'] == '否':
|
||||
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']
|
||||
|
||||
def count_barcode_radio(self, data):
|
||||
|
|
@ -236,22 +236,23 @@ class AutoLayout:
|
|||
|
||||
def add_loc_num(self):
|
||||
# 有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:
|
||||
self.loc_chip_num += 1
|
||||
else:
|
||||
# 有nextera文库,但是不满足50G 去除
|
||||
nextary_barcode = set()
|
||||
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':
|
||||
no_nextary_data.append(libdata)
|
||||
|
||||
else:
|
||||
self.no_assign_data.extend(libdata['data'])
|
||||
nextary_barcode.update(set([nextera_data['barcode'] for nextera_data in libdata['data']]))
|
||||
|
||||
self.chip_barcode_recode[self.loc_chip_num] -= nextary_barcode
|
||||
self.no_assign_data.append(libdata)
|
||||
nextary_barcode.update(libdata['barcode'])
|
||||
self.index_assignments[chipname] = no_nextary_data
|
||||
self.chip_barcode_recode[chipname] -= nextary_barcode
|
||||
self.chip_speciallib_nextera_size[chipname] = 0
|
||||
|
||||
def assign_samples(self):
|
||||
ori_library_data = list()
|
||||
|
|
@ -261,7 +262,8 @@ class AutoLayout:
|
|||
ori_library_df = pd.DataFrame(self.ori_data['未测'])
|
||||
|
||||
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)
|
||||
unhave_col = set(need_col) - get_col
|
||||
|
|
@ -382,8 +384,11 @@ class AutoLayout:
|
|||
chip_loc = 1
|
||||
librarynum = 0
|
||||
for chip_idx, chip_assignments in self.index_assignments.items():
|
||||
if not chip_assignments:
|
||||
continue
|
||||
df = pd.DataFrame(chip_assignments)
|
||||
df['time'] = df['time'].dt.strftime('%Y-%m-%d')
|
||||
|
||||
if df['data_needed'].sum() < 1600 or librarynum > self.librarynum:
|
||||
self.no_assign_data.extend(df.to_dict('records'))
|
||||
continue
|
||||
|
|
|
|||
Loading…
Reference in New Issue