Skip to content

Commit

Permalink
Drop the paired_read_expeirments option and simplify pairedness check
Browse files Browse the repository at this point in the history
  • Loading branch information
arteymix committed Aug 13, 2024
1 parent a45ed54 commit fed06f5
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 12 deletions.
3 changes: 0 additions & 3 deletions example.luigi.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,3 @@ appdata_dir=/space/gemmaData
human_reference_id=hg38_ncbi
mouse_reference_id=mm10_ncbi
rat_reference_id=rn7_ncbi

[rnaseq_pipeline.sources.sra]
paired_read_experiments=[]
10 changes: 1 addition & 9 deletions rnaseq_pipeline/sources/sra.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,13 +18,7 @@
from ..targets import ExpirableLocalTarget
from ..utils import remove_task_output, RerunnableTaskMixin

class sra(luigi.Config):
task_namespace = 'rnaseq_pipeline.sources'

paired_read_experiments = luigi.ListParameter(description='List of SRA experiments known to contain paired reads')

cfg = rnaseq_pipeline()
sra_cfg = sra()

logger = logging.getLogger('luigi-interface')

Expand Down Expand Up @@ -154,9 +148,7 @@ def run(self):
else:
run = df.sort_values('Run', ascending=False).iloc[0]

# layout is very often not annotated correctly and it is best to rely
# on the number of mates per spot
is_paired = (self.sample_id in sra_cfg.paired_read_experiments) or (run.get('spots_with_mates', 0) > 0) or (run.LibraryLayout == 'PAIRED')
is_paired = run.LibraryLayout == 'PAIRED'

metadata = dict(self.metadata)
metadata['sample_id'] = self.sample_id
Expand Down

0 comments on commit fed06f5

Please sign in to comment.