Skip to content

Commit

Permalink
Fix duplicated keys in metadata dict
Browse files Browse the repository at this point in the history
  • Loading branch information
arteymix committed Mar 13, 2024
1 parent 20a570d commit 71c0247
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
4 changes: 3 additions & 1 deletion rnaseq_pipeline/sources/geo.py
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,9 @@ def run(self):
raise RuntimeError('{} GEO record is not linked to SRA.'.format(self.gsm))
platform, srx_url = samples_info[self.gsm]
srx = parse_qs(urlparse(srx_url).query)['term'][0]
yield DownloadSraExperiment(srx, metadata=dict(**self.metadata, sample_id=self.sample_id))
metadata = dict(self.metadata)
metadata['sample_id'] = self.sample_id
yield DownloadSraExperiment(srx, metadata=metadata)

class DownloadGeoSeriesMetadata(TaskWithMetadataMixin, RerunnableTaskMixin, luigi.Task):
"""
Expand Down
4 changes: 3 additions & 1 deletion rnaseq_pipeline/sources/sra.py
Original file line number Diff line number Diff line change
Expand Up @@ -157,7 +157,9 @@ def run(self):
# on the number of mates per spot
is_paired = (self.sample_id in sra_cfg.paired_read_experiments) or (run.spots_with_mates > 0) or (run.LibraryLayout == 'PAIRED')

yield DumpSraRun(run.Run, self.srx, paired_reads=is_paired, metadata=dict(**self.metadata, sample_id=self.sample_id))
metadata = dict(self.metadata)
metadata['sample_id'] = self.sample_id
yield DumpSraRun(run.Run, self.srx, paired_reads=is_paired, metadata=metadata)

class DownloadSraProjectRunInfo(TaskWithMetadataMixin, RerunnableTaskMixin, luigi.Task):
"""
Expand Down

0 comments on commit 71c0247

Please sign in to comment.