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

Check for MACS2 before splitting file #1678

Open
AmelZulji opened this issue Apr 5, 2024 · 3 comments
Open

Check for MACS2 before splitting file #1678

AmelZulji opened this issue Apr 5, 2024 · 3 comments
Labels
enhancement New feature or request

Comments

@AmelZulji
Copy link

When calling peaks using:

peaks <- CallPeaks(
  object = seu,
  group.by = "cell_type",
  macs2.path = "wrong_path"
)

splitting fragments will start before checking whether specified macs2.path points to existing instance of MACS2. It would be nice to first check for MACS2.

@AmelZulji AmelZulji added the enhancement New feature or request label Apr 5, 2024
@timoast
Copy link
Collaborator

timoast commented Apr 5, 2024

What version are you using? This should indeed be happening before splitting files:

signac/R/peaks.R

Lines 80 to 89 in 8b98f63

if (!is.null(x = group.by)) {
# first check macs2 path before we spend time splitting the files
macs2.path <- SetIfNull(
x = macs2.path,
y = unname(obj = Sys.which(names = "macs2"))
)
if (nchar(x = macs2.path) == 0) {
stop("MACS2 not found. Please install MACS:",
"https://macs3-project.github.io/MACS/")
}

@timoast
Copy link
Collaborator

timoast commented Apr 5, 2024

Ah, nevermind, I see what you're saying. We only check if there is a path, not that there's a functional MACS at that path. Ok, we can try to add that check.

@AmelZulji
Copy link
Author

Thank you!

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

No branches or pull requests

2 participants