Skip to content

Instantly share code, notes, and snippets.

@pcantalupo
Created February 6, 2021 18:53
Show Gist options
  • Save pcantalupo/81f9b8800aa73880104c3c90b29ca3f8 to your computer and use it in GitHub Desktop.
Save pcantalupo/81f9b8800aa73880104c3c90b29ca3f8 to your computer and use it in GitHub Desktop.
library(optparse)
##################### Options ########################
opts=list(
make_option("--project", action="store", default="", type="character", help="Project (default: none)"),
make_option("--mc", action="store", default=3, type="integer", help="Min cells (default: 3)"),
make_option("--resolution", action="store", default=0.8, type="numeric", help="Resolution value (default: 0.8)"),
make_option("--usehvg", action="store", default=TRUE, type="logical", help="Use HVG? (default: TRUE")
)
opts=parse_args(OptionParser(option_list=opts))
if (opts$indropsdata == "") {
cat("\n")
message("Error: --indropsdata parameter must be provided. See script usage (--help)")
quit()
}
message("Options: \n")
print(opts)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment