Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

detect_read_strand falls back to "-" strand if context sequence not detected #40

Open
didacs opened this issue Jan 22, 2025 · 0 comments

Comments

@didacs
Copy link

didacs commented Jan 22, 2025

Hi,

I noticed that detect_read_strand will fall back to "-" strand if editDistance is the same for both fwd and rev context sequence, for example if there are no hits (editDistance = -1). Is this the expected behavior?

def detect_read_strand(read_5p_seq, upstream_context_fwd, upstream_context_rev):
result_fwd = edlib.align(upstream_context_fwd, read_5p_seq, mode="HW", k=5)
result_rev = edlib.align(upstream_context_rev, read_5p_seq, mode="HW", k=5)
strand = "-"
if result_fwd["editDistance"] < result_rev["editDistance"]:
strand = "+"
return strand

Thank you,
Didac

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant