10000 Expose more options in workflow; clean up core Python scripts by etal · Pull Request #10 · formbio/laava · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content
10000

Expose more options in workflow; clean up core Python scripts #10

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

Merged
merged 15 commits into from
Apr 30, 2024
Merged

Conversation

etal
Copy link
Contributor
@etal etal commented Apr 16, 2024

Add workflow input options to enable some investigations.

  • Expose the previously unused script options max_allowed_missing_flanking and flipflop_fa
  • Convert a previously hard-coded parameter target_gap_threshold into a script option and workflow input
  • Add a new parameter max_allowed_outside_vector, similar to max_allowed_missing_flanking but for the regions just outside the vector region (full reads overlapping the backbone a bit), while the latter now only refers to the portion of each ITR allowed to be missing.
  • Unify the repcap_fa and helper_fa inputs into a single packaging_fa, and optionally take repcap_name (str) to count repcap mappings as such for that mapped reference in packaging_fa. For dual constructs, the "repcap" region on the vector backbone can be explicitly annotated in the input BED file.

Include type/subtype BAMs in Nextflow output.

Profiled both Python scripts and sped up summarize_AAV_alignment.py by about 25%. (The other spends almost all its time inside Parasail.)

Cleaned up code with ruff check.

@etal etal marked this pull request as draft April 16, 2024 05:19
@etal etal force-pushed the refactor-1 branch 2 times, most recently from 34a66ac to eb634df Compare April 16, 2024 07:11
etal added 3 commits April 17, 2024 23:09
…cleanup

summarize_AAV_alignment:
- Use ruff to fix if-else block.
- Remove unused imports and dead code.
- Add a leading underscore to the names of unused loop variables.
- Standardize docstrings, exceptions, string formatting, etc.

No functional change.
The default AAV2 f/f info still comes from a global variable, not the
new FASTA file, but the contents are identical and it can be used for
local testing.
- Expose argument --target-gap-threshold to set what was (and still is)
  a global constant.
- Reduce run time by 25%
- Use more precise variable names
- Remove some dead code
@etal etal force-pushed the refactor-1 branch 3 times, most recently from 0b43dc8 to 8362b9d Compare April 24, 2024 18:40
etal added 7 commits April 24, 2024 11:49
- Rename global MAX_DIFF_W_REF to MAX_MISSING_FLANK; settable by the same CLI
  arg --max-allowed-missing-flanking
- Add global MAX_OUTSIDE_VECTOR and CLI arg --max-allowed-outside-vector,
  similar but referring to the margin just outside the vector region
Added input options: target_gap_threshold, max_allowed_outside_vector,
max_allowed_missing_flanking, flipflop_fa
Also optionally take repcap_name (str) to count repcap mappings as
before.
Add a hidden parameter "container_version" to streamline testing
development builds.
@etal etal marked this pull request as ready for review April 25, 2024 03:35
@etal etal requested review from Magdoll and alphabdiallo April 25, 2024 03:35
@etal etal changed the title Refactor core scripts Expose more options in workflow; clean up core Python scripts Apr 25, 2024
@etal etal requested a review from mcrocker-bioborg April 25, 2024 04:21
Copy link
Contributor
@alphabdiallo alphabdiallo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@etal etal merged commit 03dd3d6 into main Apr 30, 2024
@etal etal deleted the refactor-1 branch April 30, 2024 14:42
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

Successfully merging this pull request may close these issues.

2 participants
0