Skip to content

Commit

Permalink
Avoid overriding metadata in DownloadGeoSample and DownloadSraExperiment
Browse files Browse the repository at this point in the history
  • Loading branch information
arteymix committed Aug 13, 2024
1 parent ae02f56 commit 16f249d
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 @@ -104,7 +104,9 @@ def run(self):
platform, srx_url = samples_info[self.gsm]
srx = parse_qs(urlparse(srx_url).query)['term'][0]
metadata = dict(self.metadata)
metadata['sample_id'] = self.sample_id
# do not override the sample_id when invoked from DownloadGemmaExperiment
if 'sample_id' not in 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 @@ -151,7 +151,9 @@ def run(self):
is_paired = run.LibraryLayout == 'PAIRED'

metadata = dict(self.metadata)
metadata['sample_id'] = self.sample_id
# do not override the sample_id when invoked from DownloadGeoSample or DownloadGemmaExperiment
if 'sample_id' not in 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 16f249d

Please sign in to comment.