Skip to content

Commit

Permalink
Merge pull request #46 from UMCUGenetics/hotfix/v1.6.3
Browse files Browse the repository at this point in the history
Hotfix v1.6.3
  • Loading branch information
rernst authored Nov 18, 2022
2 parents ad1f392 + 6e22afb commit 5e187f6
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions clarity_epp/export/illumina.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,13 +17,14 @@ def update_samplesheet(lims, process_id, artifact_id, output_file):
def get_project(projects, urgent=False):
"""Inner function to get a project name for samples."""
if urgent: # Sort projects for urgent samples on name
projects = sorted(projects.items(), key=operator.itemgetter(0))
for project in projects:
projects_sorted = sorted(projects.items(), key=operator.itemgetter(0))
for project in projects_sorted:
if project[1] < 9:
return project[0] # return first project with < 9 samples
else: # Sort projects for other samples on number of samples
projects = sorted(projects.items(), key=operator.itemgetter(1))
return projects[0][0] # return project with least amount of samples.

# Sort projects on number of samples, if not urgent or no projects left with <9 samples
projects_sorted = sorted(projects.items(), key=operator.itemgetter(1))
return projects_sorted[0][0] # return project with least amount of samples.

# Parse families
families = {}
Expand Down

0 comments on commit 5e187f6

Please sign in to comment.