Skip to content

Commit

Permalink
correct paired argument parsing and length retrieval
Browse files Browse the repository at this point in the history
  • Loading branch information
agillen committed Aug 28, 2024
1 parent c5b2539 commit cf31eaa
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
2 changes: 1 addition & 1 deletion rules/count.snake
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
""" Extract correction length target"""
def _get_chem_length_R1(wildcards):
return CHEMISTRY[_get_config(wildcards.sample, "chemistry")]["filter_R1_length"]
return _get_config(wildcards.sample, "filter_R1_length")

""" rules for scraps counting """

Expand Down
4 changes: 3 additions & 1 deletion rules/cutadapt_star.snake
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,8 @@ def _get_chem_version(sample, alignment):
extra_args = _get_config(sample, alignment+"_extra_args")
except KeyError:
extra_args = ""
if alignment == "STAR_paired":
alignment = "STAR_R1"
return [whitelist, _get_config(sample, alignment), extra_args]

""" Extract per-capture chemistry from gex libs (R2)"""
Expand All @@ -42,7 +44,7 @@ def _get_chem_version_R1(wildcards):

""" Extract per-capture extra arguments for gex paired alignments """
def _get_chem_version_paired(wildcards):
return _get_chem_version(wildcards.sample, "STAR_R1") + [_get_config(wildcards.sample, "STAR_paired")]
return _get_chem_version(wildcards.sample, "STAR_paired") + [_get_config(wildcards.sample, "STAR_paired")]

""" This rule trims R1-only libraries """
rule cutadapt_R1:
Expand Down

0 comments on commit cf31eaa

Please sign in to comment.