Skip to content

Commit

Permalink
Fix MAGeCKFlute error
Browse files Browse the repository at this point in the history
  • Loading branch information
LaurenceKuhl committed Jul 10, 2024
1 parent a4e18cf commit bd3a824
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 3 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
- Fix singularity image pull tag for MAGeCKFlute ([#160](https://github.com/nf-core/crisprseq/pull/160))
- Skip dolar signs on containerOptions ([#163](https://github.com/nf-core/crisprseq/pull/163))
- Fix error in R script when adding patterns ([#170](https://github.com/nf-core/crisprseq/pull/170))
- Skip MAGeCKFlute when the function produces an error within the R package

### Deprecated

Expand Down
20 changes: 17 additions & 3 deletions templates/template_fluteMLE.R
Original file line number Diff line number Diff line change
Expand Up @@ -17,14 +17,28 @@
before_beta <- sub("\\\\.beta.*", "", beta_strings)
unique_strings <- unique(before_beta)
for(i in unique_strings) {
FluteMLE(mle, treatname= i, proj=i, pathview.top=5)
}
tryCatch(
{
FluteMLE(mle, treatname= i, proj=i, pathview.top=5)
},
error=function(e) {
print(paste0("Could not run FluteMLE with project ",i))
}
)
}
} else {
beta_strings <- grep("\\\\.beta", colnames(mle), value = TRUE)
before_beta <- sub("\\\\.beta.*", "", beta_strings)
unique_strings <- unique(before_beta)
for(i in unique_strings) {
FluteMLE(mle, treatname= i, proj=i, ${args}, pathview.top=5)
tryCatch(
{
FluteMLE(mle, treatname= i, proj=i, ${args}, pathview.top=5)
},
error=function(e) {
print(paste0("Could not run FluteMLE with project ",i))
}
)
}
}

Expand Down

0 comments on commit bd3a824

Please sign in to comment.