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

Bug fix related to correct default targets file in GUI #109

Merged
merged 6 commits into from
Aug 19, 2024

Conversation

samarth8392
Copy link
Collaborator

@samarth8392 samarth8392 commented Aug 15, 2024

Changes

Updated gui.py to include another if-else statement to choose the correct default targets file based on the genome selected.

Issues

Resolves #108

PR Checklist

(Strikethrough any points that are not applicable.)

  • This comment contains a description of changes with justifications, with any relevant issues linked.
    - [ ] Update docs if there are any API changes.
  • Update CHANGELOG.md with a short description of any user-facing changes and reference the PR number. Guidelines: https://keepachangelog.com/en/1.1.0/

@samarth8392 samarth8392 changed the title Hotfix gui targ Bug fix related to correct default targets file in GUI Aug 15, 2024
@kelly-sovacool
Copy link
Member

run() selects the targets file in the genome config if the value of --targets is None or "" (empty string). i.e. --targets is now optional but can be used to override the genome's default targets file.

XAVIER/src/xavier/run.py

Lines 373 to 379 in dd7509e

config["input_params"]["EXOME_TARGETS"] = (
str(sub_args.targets)
if sub_args.targets
else os.path.join(
config["project"]["workpath"], config["references"]["exome_targets"]
)
)

Instead of hardcoding targets with an if-else statement in the GUI logic, can you allow GUI users to pass an empty string through -TARGETS-, so it will work the same way as the CLI?

@samarth8392 samarth8392 marked this pull request as ready for review August 16, 2024 15:57
Copy link
Member

@kelly-sovacool kelly-sovacool left a comment

Choose a reason for hiding this comment

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

@samarth8392 See comment below and let me know!

src/xavier/gui.py Outdated Show resolved Hide resolved
src/xavier/gui.py Outdated Show resolved Hide resolved
src/xavier/gui.py Outdated Show resolved Hide resolved
@samarth8392
Copy link
Collaborator Author

Thanks @kelly-sovacool , the updated code works as expected. I have pushed the changes. Ready for final review.

@kelly-sovacool kelly-sovacool self-requested a review August 19, 2024 15:56
@kelly-sovacool
Copy link
Member

@samarth8392 Looks good, thanks for fixing this!

@kelly-sovacool kelly-sovacool merged commit 43c6961 into main Aug 19, 2024
3 checks passed
@kelly-sovacool kelly-sovacool deleted the hotfix-gui-targ branch August 19, 2024 16:00
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.

bug: Default targets file is always for hg38 when running GUI
2 participants