diff --git a/README.Rmd b/README.Rmd index 7caa7fc..382b7a4 100644 --- a/README.Rmd +++ b/README.Rmd @@ -121,7 +121,6 @@ We would first create an isolated environment containing a specific version of t rm(temp_out_dir_2) ``` - ```{r} condathis::create_env(packages = "fastqc==0.12.1", env_name = "fastqc_env", verbose = "output") ``` @@ -131,7 +130,8 @@ Then we run the command inside the environment just created which contains a ver ```{r echo=FALSE} # dir of output files temp_out_dir_2 <- tempdir() -out <- condathis::run("fastqc", fastq_file, "-o", temp_out_dir_2, # command +out <- condathis::run( + "fastqc", fastq_file, "-o", temp_out_dir_2, # command env_name = "fastqc_env" # environment ) ``` @@ -142,10 +142,11 @@ The `out` object contains info regarding the exit status, standard error, standa out ``` -In the our temp dir, `fastqc`generated the output files as expected. +In the output temporary directory, `fastqc`generated the output files as expected. ```{r} -fs::dir_ls(temp_out_dir_2) +fs::dir_ls(temp_out_dir_2) |> + basename() ``` The code that we created with `{condathis}` **uses a system CLI tool but is reproducible**. @@ -165,7 +166,8 @@ However, we can choose to use a different version of `curl` run in a different e ```{r} condathis::create_env(packages = "curl==8.10.1", env_name = "curl_env", verbose = "output") -out <- condathis::run("curl", "--version", +out <- condathis::run( + "curl", "--version", env_name = "curl_env" # environment ) @@ -191,7 +193,3 @@ Special characters in CLI commands are interpreted as literals and not expanded. - File paths should not use special characters for relative paths, e.g. "~", ".", "..". - Expand file paths directly in R, using `base` functions or functions from the `fs` package. - - - - diff --git a/README.md b/README.md index 1bf6dd9..d38479d 100644 --- a/README.md +++ b/README.md @@ -141,12 +141,13 @@ out #> [1] FALSE ``` -In the our temp dir, `fastqc`generated the output files as expected. +In the output temporary directory, `fastqc`generated the output files as +expected. ``` r -fs::dir_ls(temp_out_dir_2) -#> /var/folders/2q/937_bkg10svdwx1x00prs9nm0000gn/T/RtmpZmaOFM/sample1_L001_R1_001_fastqc.html -#> /var/folders/2q/937_bkg10svdwx1x00prs9nm0000gn/T/RtmpZmaOFM/sample1_L001_R1_001_fastqc.zip +fs::dir_ls(temp_out_dir_2) |> + basename() +#> [1] "sample1_L001_R1_001_fastqc.html" "sample1_L001_R1_001_fastqc.zip" ``` The code that we created with `{condathis}` **uses a system CLI tool but @@ -185,7 +186,8 @@ the newly installed `curl`. condathis::create_env(packages = "curl==8.10.1", env_name = "curl_env", verbose = "output") #> ! Environment curl_env already exists. -out <- condathis::run("curl", "--version", +out <- condathis::run( + "curl", "--version", env_name = "curl_env" # environment ) diff --git a/condathis.Rproj b/condathis.Rproj index 766b3b2..b313031 100644 --- a/condathis.Rproj +++ b/condathis.Rproj @@ -1,4 +1,5 @@ Version: 1.0 +ProjectId: 9ddf74f2-3627-4d31-97aa-6a6d7606c524 RestoreWorkspace: No SaveWorkspace: No