Skip to content

Commit 71c0247

Browse files
committed
Fix duplicated keys in metadata dict
1 parent 20a570d commit 71c0247

File tree

2 files changed

+6
-2
lines changed

2 files changed

+6
-2
lines changed

rnaseq_pipeline/sources/geo.py

+3-1
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,9 @@ def run(self):
103103
raise RuntimeError('{} GEO record is not linked to SRA.'.format(self.gsm))
104104
platform, srx_url = samples_info[self.gsm]
105105
srx = parse_qs(urlparse(srx_url).query)['term'][0]
106-
yield DownloadSraExperiment(srx, metadata=dict(**self.metadata, sample_id=self.sample_id))
106+
metadata = dict(self.metadata)
107+
metadata['sample_id'] = self.sample_id
108+
yield DownloadSraExperiment(srx, metadata=metadata)
107109

108110
class DownloadGeoSeriesMetadata(TaskWithMetadataMixin, RerunnableTaskMixin, luigi.Task):
109111
"""

rnaseq_pipeline/sources/sra.py

+3-1
Original file line numberDiff line numberDiff line change
@@ -157,7 +157,9 @@ def run(self):
157157
# on the number of mates per spot
158158
is_paired = (self.sample_id in sra_cfg.paired_read_experiments) or (run.spots_with_mates > 0) or (run.LibraryLayout == 'PAIRED')
159159

160-
yield DumpSraRun(run.Run, self.srx, paired_reads=is_paired, metadata=dict(**self.metadata, sample_id=self.sample_id))
160+
metadata = dict(self.metadata)
161+
metadata['sample_id'] = self.sample_id
162+
yield DumpSraRun(run.Run, self.srx, paired_reads=is_paired, metadata=metadata)
161163

162164
class DownloadSraProjectRunInfo(TaskWithMetadataMixin, RerunnableTaskMixin, luigi.Task):
163165
"""

0 commit comments

Comments
 (0)