Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 6 additions & 7 deletions .github/workflows/R-CMD-check.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
# Workflow derived from https://github.com/r-lib/actions/tree/v2/examples
# Need help debugging build failures? Start at https://github.com/r-lib/actions#where-to-find-help
# Workflow derived from [https://github.com/r-lib/actions/tree/v2/examples](https://github.com/r-lib/actions/tree/v2/examples)
on:
push:
branches: [main, master]
Expand All @@ -24,7 +23,6 @@ jobs:
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }}
R_KEEP_PKG_SOURCE: yes


steps:
- uses: actions/checkout@v3

Expand All @@ -39,11 +37,12 @@ jobs:
- name: Install R dependencies
uses: r-lib/actions/setup-r-dependencies@v2
with:
extra-packages: rcmdcheck, keras3 # Add keras to the list of extra packages
extra-packages: any::rcmdcheck
needs: check

- name: Install Keras Python dependencies
run: R -e 'keras3::install_keras()' # This runs the install_keras function from R

- uses: r-lib/actions/check-r-package@v2
with:
upload-snapshots: true
# If the vignette continues to hang, uncomment the lines below to skip it temporarily
# args: 'c("--no-vignettes", "--no-build-vignettes")'
# build_args: 'c("--no-build-vignettes")'
5 changes: 1 addition & 4 deletions .github/workflows/test-coverage.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -25,12 +25,9 @@ jobs:

- uses: r-lib/actions/setup-r-dependencies@v2
with:
extra-packages: any::covr, any::xml2, rcmdcheck, keras3
extra-packages: any::covr, any::xml2, rcmdcheck
needs: coverage

- name: Install Keras Python dependencies
run: R -e 'keras3::install_keras()' # This runs the install_keras function from R

- name: Test coverage
run: |
cov <- covr::package_coverage(
Expand Down
1 change: 0 additions & 1 deletion DESCRIPTION
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,6 @@ Suggests:
testthat,
tidygraph,
viridis
SystemRequirements: Python (via basilisk)
LinkingTo:
Rcpp
VignetteBuilder: knitr
Expand Down
4 changes: 1 addition & 3 deletions man/buildNetwork.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

16 changes: 8 additions & 8 deletions vignettes/immApex.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -58,11 +58,11 @@ Parameters for ```getIMGT()```

Here, we will use the ```getIMGT()``` function to get the amino acid sequences for the TRBV region to get all the sequences by V gene allele.

```{r, eval=knitr::is_html_output()}
```{r}
# Function to check IMGT website availability
is_imgt_available <- function() {
tryCatch({
r <- httr::HEAD("https://www.imgt.org", timeout(5))
r <- httr::HEAD("https://www.imgt.org", httr::timeout(5))
httr::status_code(r) == 200
}, error = function(e) {
FALSE
Expand Down Expand Up @@ -121,7 +121,7 @@ Parameters for ```inferCDR```
* **sequence.type** Type of sequence - "aa" for amino acid or "nt" for nucleotide
* **sequences** The specific regions of the CDR loop to get from the data.

```{r }
```{r}
if (is_imgt_available()) {
Adaptive_example <- inferCDR(Adaptive_example,
chain = "TRB",
Expand Down Expand Up @@ -155,7 +155,7 @@ Parameters for ```generateSequences()```
```{r }
sequences <- generateSequences(prefix.motif = "CAS",
suffix.motif = "YF",
number.of.sequences = 1000,
number.of.sequences = 200,
min.length = 8,
max.length = 16)
sequences <- unique(sequences)
Expand All @@ -165,7 +165,7 @@ head(sequences)
If we want to generate nucleotide sequences instead of amino acids, we must to change the **sequence.dictionary**.

```{r }
nucleotide.sequences <- generateSequences(number.of.sequences = 1000,
nucleotide.sequences <- generateSequences(number.of.sequences = 200,
min.length = 8,
max.length = 16,
sequence.dictionary = c("A", "C", "T", "G"))
Expand Down Expand Up @@ -575,15 +575,15 @@ First, we'll simulate two distinct classes of sequences using ```generateSequenc
# Step 1a: Generate two distinct classes of sequences
class1.sequences <- generateSequences(prefix.motif = "CAS",
min.length = 3,
number.of.sequences = 500)
number.of.sequences = 250)

class2.sequences <- generateSequences(prefix.motif = "CSG",
min.length = 3,
number.of.sequences = 500)
number.of.sequences = 250)

# Combine sequences and create labels
all.sequences <- c(class1.sequences, class2.sequences)
labels <- as.factor(c(rep("Class1", 500), rep("Class2", 500)))
labels <- as.factor(c(rep("Class1", 250), rep("Class2", 250)))

# Step 1b: Use propertyEncoder to create a feature matrix from Atchley factors
feature.matrix <- propertyEncoder(all.sequences,
Expand Down