Skip to content

Commit

Permalink
Fix tecan samplesheet for pools and python3 fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
rernst committed Aug 9, 2021
1 parent ea091d8 commit 70b19a8
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
7 changes: 5 additions & 2 deletions clarity_epp/export/tecan.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,12 @@ def samplesheet(lims, process_id, output_file):
process = Process(lims, id=process_id)
well_plate = {}

for placement, artifact in process.output_containers()[0].placements.iteritems():
for placement, artifact in process.output_containers()[0].placements.items():
placement = ''.join(placement.split(':'))
well_plate[placement] = artifact.name.split('_')[0]
if len(artifact.samples) == 1: # Remove 'meet_id' from artifact name if artifact is not a pool
well_plate[placement] = artifact.name.split('_')[0]
else:
well_plate[placement] = artifact.name

for well in clarity_epp.export.utils.sort_96_well_plate(well_plate.keys()):
output_file.write('{well}\t{sample}\n'.format(
Expand Down
2 changes: 1 addition & 1 deletion clarity_epp/export/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ def sort_96_well_plate(wells):
]
order = dict(zip(order, range(len(order))))

wells.sort(key=lambda val: order[val])
wells = sorted(wells, key=lambda val: order[val])
return wells


Expand Down

0 comments on commit 70b19a8

Please sign in to comment.