profile
viewpoint
If you are wondering where the data of this site comes from, please visit https://api.github.com/users/lebovic/events. GitMemory does not store any data, but only uses NGINX to cache data for a period of time. The idea behind GitMemory is simply to give users a better reading experience.

intocs/BHS-SRC 0

The BHS Science Resource Center project

lebovic/apprtc-ios 0

A native iOS video chat app based on WebRTC

lebovic/archhacks-2017 0

Disaster relief archhacks-2017.

lebovic/intercom-node 0

Node.js bindings for the Intercom API

lebovic/react-date-picker 0

A date picker for your React app.

lebovic/SimpleWebRTC 0

Simplest WebRTC ever

PR opened trytoolchest/toolchest-client-r

v0.8.0
+21 -12

0 comment

9 changed files

pr created time in 18 hours

PullRequestReviewEvent
PullRequestReviewEvent
PullRequestReviewEvent

startedtrytoolchest/toolchest-client-r

started time in 5 days

created tagtrytoolchest/toolchest-client-r

tagv0.7.0

R Client for Toolchest

created time in 7 days

release trytoolchest/toolchest-client-r

v0.7.0

released time in 7 days

push eventtrytoolchest/toolchest-client-r

bcai2

commit sha eb5d492f20f701c597f94d9972cae6b61c026348

added reticulate base, loading Python package, auth

view details

bcai2

commit sha 614b4ebee64235fb1071bdf3073d4f5efa0d1358

reformatted existing tools with reticulate wrapper, added file selection helpers

view details

bcai2

commit sha d6cd525f54f866fd8cb1d40cfcac47ff1e4894d6

added bowtie2 and test tools

view details

bcai2

commit sha 39c58b6bd15a0ca14753fbf5545495e06ed5607d

applied style_pkg() to package

view details

bcai2

commit sha 1e5ae93a6d631ff0a2aa6f1dbc359119f5cc10d5

updated .gitignore to include env files

view details

bcai2

commit sha 6c697ebb6bb7c419801e8a6f0612c34c5107664e

fixed typo in bowtie2 docs

view details

bcai2

commit sha e7feaf0cceccbbd62bbfb85b11de9973bd3b467f

changed order of params in test() docs

view details

bcai2

commit sha 5b13888422e32f26fd5cb59cf1369da701f50bc5

edited docs, customized startup message for pre-set TOOLCHEST_KEY

view details

bcai2

commit sha d9184f4b4ddbfd83590e7a22e9f126c9bece7a2d

added creator

view details

bcai2

commit sha 443f464e3e8d5879d6dba9b49dc8694afd286611

changed tool_args placement in tool function argument order

view details

bcai2

commit sha 2fa071df6c08438ceb2593cf8bcf822869d6083e

updated package authors, version number

view details

bcai2

commit sha a2c148c8e9941bd5717f039ea94a3a6a668c9796

added test function to README

view details

bcai2

commit sha 079b0ad7a4cca854f9b087204fc8fdabe679fc6b

deprecated query.R

view details

Bryce Cai

commit sha 520538b3c31cf3064a77187b16587531e36e541c

Unicycler/STAR support + v0.7 features (#3) * Adds support for `unicycler` and `STAR` in the R client. * Adds the ability to select specific input files interactively (e.g., for long reads), as well as selecting multiple input files interactively for the same job. * Adds handling for non-essential arguments like `read_one`. If left as NULL, they are ignored so that defaults in the python client are not clobbered. * Adds support for `kraken2` DB choices.

view details

Noah Lebovic

commit sha de1adae6a094b545fd2644eab5d576b2222db4e9

Merge pull request #2 from trytoolchest/staging v0.7.0

view details

push time in 7 days

PR merged trytoolchest/toolchest-client-r

v0.7.0

See #3

+1312 -359

0 comment

27 changed files

bcai2

pr closed time in 7 days

PullRequestReviewEvent

delete branch trytoolchest/toolchest-client-r

delete branch : feature/unicycler-support

delete time in 7 days

push eventtrytoolchest/toolchest-client-r

Bryce Cai

commit sha 520538b3c31cf3064a77187b16587531e36e541c

Unicycler/STAR support + v0.7 features (#3) * Adds support for `unicycler` and `STAR` in the R client. * Adds the ability to select specific input files interactively (e.g., for long reads), as well as selecting multiple input files interactively for the same job. * Adds handling for non-essential arguments like `read_one`. If left as NULL, they are ignored so that defaults in the python client are not clobbered. * Adds support for `kraken2` DB choices.

view details

push time in 7 days

PR merged trytoolchest/toolchest-client-r

Unicycler/STAR support + v0.7 features
  • Adds support for unicycler and STAR in the R client.
  • Adds the ability to select specific input files interactively (e.g., for long reads), as well as selecting multiple input files interactively for the same job.
  • Adds handling for non-essential arguments like read_one. If left as NULL, they are ignored so that defaults in the python client are not clobbered.
  • Adds support for kraken2 DB choices.
+1000 -30

0 comment

17 changed files

bcai2

pr closed time in 7 days

issue openedrstudio/reticulate

Redirected output from reticulate is suppressed in Jupyter

Standard output from Python when invoked by reticulate is not shown by the R kernel in Jupyter Notebooks. This is problematic, because we can't show progress for long running commands.

We can work around this – and show all the output in the end – by specifically capturing the standard output rather than just redirecting with reticulate. However, this still does not allow us to show progress.

It looks like it stems from this Rprintf call: https://github.com/rstudio/reticulate/blob/4967abddb35865a1be6ad839298695f1481bcade/src/output.cpp#L8

Which was introduced a few years ago in this commit: https://github.com/rstudio/reticulate/commit/672f20a1b66873d75f238e250ae5f62d6f9f999d

And it doesn't print, presumably because non-R stdout/stderr is not captured by Jupyter: https://github.com/IRkernel/IRkernel/issues/416

We'll submit a patch for this shortly, but I'm not sure what the best approach is. We could:

  • Default write using R (this would break terminal control sequences)
  • Allow the user to specify their desired output
  • Check manually for the context in which we're operating, and redirect appropriately (ala https://github.com/rstudio/reticulate/blob/4967abddb35865a1be6ad839298695f1481bcade/R/output.R#L8)

Any preference or other ideas?

created time in 11 days

Pull request review commenttrytoolchest/toolchest-client-r

Unicycler/STAR support + v0.7 features

 bowtie2 <- function(tool_args = "", inputs = NULL, output_path = NULL, database_ #' @examples #' \dontrun{ #' cutadapt(tool_args = "-a AATTCCGG")-#' cutadapt(input_path = "C://Users/YourName/Documents/my_input_file.fastq", tool_args = "-a AATTCCGG")+#' cutadapt(inputs = "C://Users/YourName/Documents/my_input_file.fastq", tool_args = "-a AATTCCGG") #' } #' #' @export cutadapt <- function(tool_args, inputs = NULL, output_path = NULL) {   inputs <- .validate.inpath(inputs)   output_path <- .validate.outpath(output_path)-  toolchest_client$cutadapt(inputs, output_path, tool_args)+  toolchest_args <- list(+    inputs = inputs,+    output_path = output_path,+    tool_args = tool_args+  )+  .do.toolchest.call(toolchest_client$cutadapt, toolchest_args) }  #' Kraken 2 Client #' #' Starts a query for Kraken 2 using Toolchest. #'-#' (Currently, only single .fastq inputs are supported.)-#' #' If left unspecified, inputs and output_path can be selected by the user #' manually. #' #' @param tool_args (optional) Additional arguments to be passed to Kraken 2. #' @param inputs Path or list of paths (client-side) to be passed in as input. #' @param output_path Path (client-side) where the output will be downloaded.+#' @param database_name (optional) Name (string) of database to use for Kraken 2 alignment.+#' @param database_version (optional) Version (string) of database to use for Kraken 2 alignment.+#'+#' @note If the database is unspecified, Kraken 2 will use the standard+#' database, using index files generated by Ben Langmead's lab at+#' \url{https://benlangmead.github.io/aws-indexes/k2}. #' #' @export-kraken2 <- function(tool_args = "", inputs = NULL, output_path = NULL) {-  inputs <- .validate.inpath(inputs)+kraken2 <- function(tool_args = "", inputs = NULL, output_path = NULL,+                    database_name = NULL, database_version = NULL) {+  inputs <- .validate.inpath(inputs, choose_multiple = TRUE)

(meaning we should probably disable until enabled on the Python side)

bcai2

comment created time in 20 days

PullRequestReviewEvent

Pull request review commenttrytoolchest/toolchest-client-r

Unicycler/STAR support + v0.7 features

 bowtie2 <- function(tool_args = "", inputs = NULL, output_path = NULL, database_ #' @examples #' \dontrun{ #' cutadapt(tool_args = "-a AATTCCGG")-#' cutadapt(input_path = "C://Users/YourName/Documents/my_input_file.fastq", tool_args = "-a AATTCCGG")+#' cutadapt(inputs = "C://Users/YourName/Documents/my_input_file.fastq", tool_args = "-a AATTCCGG") #' } #' #' @export cutadapt <- function(tool_args, inputs = NULL, output_path = NULL) {   inputs <- .validate.inpath(inputs)   output_path <- .validate.outpath(output_path)-  toolchest_client$cutadapt(inputs, output_path, tool_args)+  toolchest_args <- list(+    inputs = inputs,+    output_path = output_path,+    tool_args = tool_args+  )+  .do.toolchest.call(toolchest_client$cutadapt, toolchest_args) }  #' Kraken 2 Client #' #' Starts a query for Kraken 2 using Toolchest. #'-#' (Currently, only single .fastq inputs are supported.)-#' #' If left unspecified, inputs and output_path can be selected by the user #' manually. #' #' @param tool_args (optional) Additional arguments to be passed to Kraken 2. #' @param inputs Path or list of paths (client-side) to be passed in as input. #' @param output_path Path (client-side) where the output will be downloaded.+#' @param database_name (optional) Name (string) of database to use for Kraken 2 alignment.+#' @param database_version (optional) Version (string) of database to use for Kraken 2 alignment.+#'+#' @note If the database is unspecified, Kraken 2 will use the standard+#' database, using index files generated by Ben Langmead's lab at+#' \url{https://benlangmead.github.io/aws-indexes/k2}. #' #' @export-kraken2 <- function(tool_args = "", inputs = NULL, output_path = NULL) {-  inputs <- .validate.inpath(inputs)+kraken2 <- function(tool_args = "", inputs = NULL, output_path = NULL,+                    database_name = NULL, database_version = NULL) {+  inputs <- .validate.inpath(inputs, choose_multiple = TRUE)

Sounds good

bcai2

comment created time in 20 days

PullRequestReviewEvent

Pull request review commenttrytoolchest/toolchest-client-r

Unicycler/STAR support + v0.7 features

 bowtie2 <- function(tool_args = "", inputs = NULL, output_path = NULL, database_ #' @examples #' \dontrun{ #' cutadapt(tool_args = "-a AATTCCGG")-#' cutadapt(input_path = "C://Users/YourName/Documents/my_input_file.fastq", tool_args = "-a AATTCCGG")+#' cutadapt(inputs = "C://Users/YourName/Documents/my_input_file.fastq", tool_args = "-a AATTCCGG") #' } #' #' @export cutadapt <- function(tool_args, inputs = NULL, output_path = NULL) {   inputs <- .validate.inpath(inputs)   output_path <- .validate.outpath(output_path)-  toolchest_client$cutadapt(inputs, output_path, tool_args)+  toolchest_args <- list(+    inputs = inputs,+    output_path = output_path,+    tool_args = tool_args+  )+  .do.toolchest.call(toolchest_client$cutadapt, toolchest_args) }  #' Kraken 2 Client #' #' Starts a query for Kraken 2 using Toolchest. #'-#' (Currently, only single .fastq inputs are supported.)-#' #' If left unspecified, inputs and output_path can be selected by the user #' manually. #' #' @param tool_args (optional) Additional arguments to be passed to Kraken 2. #' @param inputs Path or list of paths (client-side) to be passed in as input. #' @param output_path Path (client-side) where the output will be downloaded.+#' @param database_name (optional) Name (string) of database to use for Kraken 2 alignment.+#' @param database_version (optional) Version (string) of database to use for Kraken 2 alignment.+#'+#' @note If the database is unspecified, Kraken 2 will use the standard+#' database, using index files generated by Ben Langmead's lab at+#' \url{https://benlangmead.github.io/aws-indexes/k2}. #' #' @export-kraken2 <- function(tool_args = "", inputs = NULL, output_path = NULL) {-  inputs <- .validate.inpath(inputs)+kraken2 <- function(tool_args = "", inputs = NULL, output_path = NULL,+                    database_name = NULL, database_version = NULL) {+  inputs <- .validate.inpath(inputs, choose_multiple = TRUE)

Did you test Kraken with multiple inputs?

bcai2

comment created time in 20 days

Pull request review commenttrytoolchest/toolchest-client-r

Unicycler/STAR support + v0.7 features

 Toolchest currently supports the following tools: -   Bowtie 2 (`bowtie2`) -   Cutadapt (`cutadapt`) -   Kraken 2 (`kraken2`)+-   Unicycler (`unicycler`)

Missing STAR?

bcai2

comment created time in 20 days

Pull request review commenttrytoolchest/toolchest-client-r

Unicycler/STAR support + v0.7 features

 bowtie2 <- function(tool_args = "", inputs = NULL, output_path = NULL, database_ #' @examples #' \dontrun{ #' cutadapt(tool_args = "-a AATTCCGG")-#' cutadapt(input_path = "C://Users/YourName/Documents/my_input_file.fastq", tool_args = "-a AATTCCGG")+#' cutadapt(inputs = "C://Users/YourName/Documents/my_input_file.fastq", tool_args = "-a AATTCCGG") #' } #' #' @export cutadapt <- function(tool_args, inputs = NULL, output_path = NULL) {   inputs <- .validate.inpath(inputs)   output_path <- .validate.outpath(output_path)-  toolchest_client$cutadapt(inputs, output_path, tool_args)+  toolchest_args <- list(+    inputs = inputs,+    output_path = output_path,+    tool_args = tool_args+  )+  .do.toolchest.call(toolchest_client$cutadapt, toolchest_args) }  #' Kraken 2 Client #' #' Starts a query for Kraken 2 using Toolchest. #'-#' (Currently, only single .fastq inputs are supported.)-#'

🎉

bcai2

comment created time in 20 days

Pull request review commenttrytoolchest/toolchest-client-r

Unicycler/STAR support + v0.7 features

 bowtie2 <- function(tool_args = "", inputs = NULL, output_path = NULL, database_ #' @examples #' \dontrun{ #' cutadapt(tool_args = "-a AATTCCGG")-#' cutadapt(input_path = "C://Users/YourName/Documents/my_input_file.fastq", tool_args = "-a AATTCCGG")+#' cutadapt(inputs = "C://Users/YourName/Documents/my_input_file.fastq", tool_args = "-a AATTCCGG") #' } #' #' @export cutadapt <- function(tool_args, inputs = NULL, output_path = NULL) {   inputs <- .validate.inpath(inputs)   output_path <- .validate.outpath(output_path)-  toolchest_client$cutadapt(inputs, output_path, tool_args)+  toolchest_args <- list(+    inputs = inputs,+    output_path = output_path,+    tool_args = tool_args

👌

bcai2

comment created time in 20 days

Pull request review commenttrytoolchest/toolchest-client-r

Unicycler/STAR support + v0.7 features

 Package: toolchest Title: R Client for Toolchest-Version: 0.5.0+Version: 0.7.0

Are you thinking we match minor but not patch numbers Python <-> R?

bcai2

comment created time in 20 days

PullRequestReviewEvent
PullRequestReviewEvent
PullRequestReviewEvent

Pull request review commenttrytoolchest/toolchest-client-python

Basic unit tests for files module

+import filecmp+import os+import pathlib++import pytest++from .. import assert_exists, check_file_size, files_in_path, sanity_check++THIS_FILE_PATH = os.path.normpath(pathlib.Path(__file__).parent.resolve())+++def test_small_file():+    small_file_path = f"{THIS_FILE_PATH}/data/very_small_file.txt"+    with pytest.raises(ValueError):+        sanity_check(small_file_path)++def test_files_in_path():+    tmp_dir = f"{THIS_FILE_PATH}/tmp"+    tmp1 = f"{tmp_dir}/tmp1"+    tmp2 = f"{tmp_dir}/tmp2"+    sub_dir = f"{tmp_dir}/sub_dir"+    tmp3 = f"{sub_dir}/tmp3"+    file_paths = [tmp1, tmp2, tmp3]+    for dir in [tmp_dir, sub_dir]:+        if not os.path.exists(dir):+            os.mkdir(dir)+    for file in file_paths:+        open(file, "w")

In that case you can chain a .close() to the open call to immediately close the file

bcai2

comment created time in 21 days

Pull request review commenttrytoolchest/toolchest-client-python

Basic unit tests for files module

+import filecmp+import os+import pathlib++import pytest++from .. import assert_exists, check_file_size, files_in_path, sanity_check++THIS_FILE_PATH = os.path.normpath(pathlib.Path(__file__).parent.resolve())+++def test_small_file():+    small_file_path = f"{THIS_FILE_PATH}/data/very_small_file.txt"+    with pytest.raises(ValueError):+        sanity_check(small_file_path)++def test_files_in_path():+    tmp_dir = f"{THIS_FILE_PATH}/tmp"+    tmp1 = f"{tmp_dir}/tmp1"+    tmp2 = f"{tmp_dir}/tmp2"+    sub_dir = f"{tmp_dir}/sub_dir"+    tmp3 = f"{sub_dir}/tmp3"+    file_paths = [tmp1, tmp2, tmp3]+    for dir in [tmp_dir, sub_dir]:+        if not os.path.exists(dir):+            os.mkdir(dir)+    for file in file_paths:+        open(file, "w")

Is the intent here to just create a blank new file?

bcai2

comment created time in 22 days

Pull request review commenttrytoolchest/toolchest-client-python

Basic unit tests for files module

+import filecmp+import os+import pathlib++import pytest++from .. import assert_exists, check_file_size, files_in_path, sanity_check++THIS_FILE_PATH = os.path.normpath(pathlib.Path(__file__).parent.resolve())+++def test_small_file():+    small_file_path = f"{THIS_FILE_PATH}/data/very_small_file.txt"+    with pytest.raises(ValueError):+        sanity_check(small_file_path)++def test_files_in_path():+    tmp_dir = f"{THIS_FILE_PATH}/tmp"+    tmp1 = f"{tmp_dir}/tmp1"+    tmp2 = f"{tmp_dir}/tmp2"+    sub_dir = f"{tmp_dir}/sub_dir"+    tmp3 = f"{sub_dir}/tmp3"+    file_paths = [tmp1, tmp2, tmp3]+    for dir in [tmp_dir, sub_dir]:+        if not os.path.exists(dir):+            os.mkdir(dir)

Could also: os.makedirs(dir, exist_ok=True)

bcai2

comment created time in 22 days