Skip to content

Commit

Permalink
Correct path finding
Browse files Browse the repository at this point in the history
  • Loading branch information
ssjunnebo committed Sep 18, 2024
1 parent 08995cb commit ee38b71
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions taca/element/Element_Runs.py
Original file line number Diff line number Diff line change
Expand Up @@ -447,8 +447,12 @@ def upload_demux_results_to_statusdb(self):
with open(unassigned_sequences_file, 'r') as unassigned_file:
reader = csv.DictReader(unassigned_file)
unassigned_sequences = [row for row in reader]
project_dirs = [f.path for f in os.scandir(os.path.join(self.run_dir, "Demultiplexing")) if f.is_dir() and not "PhiX" in f]
for project_dir in project_dirs:
dirs = os.scandir("Demultiplexing")
project_dirs = []
for directory in dirs:
if os.path.isdir(directory.path) and not "Unassigned" in directory.path:
project_dirs.append(directory.path)
for project_dir in project_dirs: # TODO: remove this block when q30 is added to IndexAssignment.csv by Element
run_stats_file = glob.glob(os.path.join(project_dir, "*_RunStats.json"))
with open(run_stats_file) as stats_json:
project_sample_stats_raw = json.load(stats_json)
Expand Down

0 comments on commit ee38b71

Please sign in to comment.