Skip to content

Commit

Permalink
Add = to the prefix when there is an n in inversion, in order to …
Browse files Browse the repository at this point in the history
…be recognized as a valid cstag
  • Loading branch information
akikuno committed Jan 31, 2024
1 parent 369a2d4 commit 747ff3e
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/DAJIN2/core/consensus/consensus.py
Original file line number Diff line number Diff line change
Expand Up @@ -115,4 +115,4 @@ def call_consensus(tempdir: Path, sample_name: str, clust_sample: list[dict]) ->
key = ConsensusKey(allele, label, clust[0]["PERCENT"])
cons_percentages[key] = cons_percentage
cons_sequences[key] = call_sequence(cons_percentage)
return dict(cons_percentages), dict(cons_sequences)
return cons_percentages, cons_sequences
2 changes: 1 addition & 1 deletion src/DAJIN2/utils/cssplits_handler.py
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ def revcomp_cssplits(cssplits: list[str]) -> list[str]:

def add_match_operator_to_n(cssplits: list[str]) -> list[str]:
"""Add "=" (match operator) to the sequences that start with "N"."""
return ["=" + seq if seq.startswith("N") else seq for seq in cssplits]
return ["=" + seq if seq.startswith("N") or seq.startswith("n") else seq for seq in cssplits]


def format_insertion(cs: str) -> str:
Expand Down

0 comments on commit 747ff3e

Please sign in to comment.