Skip to content

Commit

Permalink
Add --force-single-end and --force-paired-reads
Browse files Browse the repository at this point in the history
  • Loading branch information
arteymix committed Oct 28, 2024
1 parent 8e71bc4 commit 0de706c
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion rnaseq_pipeline/sources/sra.py
Original file line number Diff line number Diff line change
Expand Up @@ -131,6 +131,9 @@ class DownloadSraExperiment(DynamicTaskWithOutputMixin, DynamicWrapperTask):
"""
srr = luigi.OptionalParameter(default=None, description='Specific SRA run accession to use (defaults to latest)')

force_single_end = luigi.BoolParameter(positional=False, significant=False, default=False, description='Force the library layout to be single-end')
force_paired_reads = luigi.BoolParameter(positional=False, significant=False, default=False, description='Force the library layout to be paired')

@property
def sample_id(self):
return self.srx
Expand All @@ -148,7 +151,12 @@ def run(self):
else:
run = df.sort_values('Run', ascending=False).iloc[0]

is_paired = run.LibraryLayout == 'PAIRED'
if self.force_paired_reads:
is_paired = True
elif self.force_single_end:
is_paired = False
else:
run.LibraryLayout == 'PAIRED'

metadata = dict(self.metadata)
# do not override the sample_id when invoked from DownloadGeoSample or DownloadGemmaExperiment
Expand Down

0 comments on commit 0de706c

Please sign in to comment.