Skip to content

Commit

Permalink
Merge pull request #887 from alneberg/element_empty_bugfix
Browse files Browse the repository at this point in the history
Use RunManifest.json instead of AvitiRunstats since it exists earlier
  • Loading branch information
aanil authored Oct 25, 2024
2 parents bd5c47f + 3a02036 commit d95b15e
Showing 1 changed file with 9 additions and 12 deletions.
21 changes: 9 additions & 12 deletions status/flowcell.py
Original file line number Diff line number Diff line change
Expand Up @@ -546,20 +546,17 @@ def get(self, name):
)
else:
project_ids = []
for lane in (
for sample in (
flowcell.get("instrument_generated_files", {})
.get("AvitiRunStats.json", {})
.get("LaneStats", {})
.get("RunManifest.json", {})
.get("Samples", [])
):
for sample in lane.get("IndexAssignments", {}).get(
"IndexSamples", {}
):
sample_name = sample.get("SampleName")
# Check that the sample name is on the format PX..X_Y..Y"
if re.match(r"^P\d+_\d+$", sample_name):
# Parse out the PXXXXXX number from the sample name on the format "
project_id = sample_name.split("_")[0]
project_ids.append(project_id)
sample_name = sample.get("SampleName")
# Check that the sample name is on the format PX..X_Y..Y"
if re.match(r"^P\d+_\d+$", sample_name):
# Parse out the PXXXXXX number from the sample name on the format "
project_id = sample_name.split("_")[0]
project_ids.append(project_id)

project_ids = list(set(project_ids))
projects = get_project_names_from_ids(
Expand Down

0 comments on commit d95b15e

Please sign in to comment.