Skip to content

Commit

Permalink
docs: lint readme
Browse files Browse the repository at this point in the history
  • Loading branch information
luciorq committed Nov 14, 2024
1 parent 3c9f0b5 commit 32b5cfb
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 14 deletions.
16 changes: 7 additions & 9 deletions README.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -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")
```
Expand All @@ -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
)
```
Expand All @@ -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**.
Expand All @@ -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
)
Expand All @@ -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.




12 changes: 7 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
)

Expand Down
1 change: 1 addition & 0 deletions condathis.Rproj
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
Version: 1.0
ProjectId: 9ddf74f2-3627-4d31-97aa-6a6d7606c524

RestoreWorkspace: No
SaveWorkspace: No
Expand Down

0 comments on commit 32b5cfb

Please sign in to comment.