Skip to content

Commit

Permalink
update GHA
Browse files Browse the repository at this point in the history
  • Loading branch information
ChangqingW committed Nov 25, 2024
1 parent efc10e4 commit 626135b
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 14 deletions.
21 changes: 19 additions & 2 deletions .github/workflows/check-bioc.yml
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,10 @@ jobs:
- name: Checkout Repository
uses: actions/checkout@v3

- name: Temporary workaround for macOS-latest
if: matrix.config.os == 'macOS-latest'
run: brew uninstall pkg-config@0.29.2

## R is already included in the Bioconductor docker images
- name: Setup R from r-lib
if: runner.os != 'Linux'
Expand Down Expand Up @@ -129,6 +133,8 @@ jobs:
brew install libxml2
echo "XML_CONFIG=/usr/local/opt/libxml2/bin/xml2-config" >> $GITHUB_ENV
brew install libjpeg
## Required to install magick as noted at
## /~https://github.com/r-lib/usethis/commit/f1f1e0d10c1ebc75fd4c18fa7e2de4551fd9978f#diff-9bfee71065492f63457918efcd912cf2
brew install imagemagick@6
Expand All @@ -142,8 +148,12 @@ jobs:
## Required for tcltk
brew install xquartz --cask
brew install minimap2
brew install samtools
## Temporary fix for libraries not found
## https://pat-s.me/transitioning-from-x86-to-arm64-on-macos-experiences-of-an-r-user/
sudo ln -s /opt/homebrew/opt/* /usr/local/opt/
mkdir ~/.R
echo 'CFLAGS=-I/opt/homebrew/include -I/opt/homebrew/opt/jpeg/include' > ~/.R/Makevars
echo 'LDFLAGS+=-L/opt/homebrew/opt/jpeg/lib' >> ~/.R/Makevars
- name: Install Windows system dependencies
if: runner.os == 'Windows'
Expand Down Expand Up @@ -182,6 +192,13 @@ jobs:
continue-on-error: true
shell: Rscript {0}

# - name: Debug with SSH
# if: matrix.config.os == 'macOS-latest'
# uses: owenthereal/action-upterm@v1
# with:
# limit-access-to-actor: true
# limit-access-to-users: ChangqingW

- name: Install dependencies pass 2
run: |
## Pass #2 at installing dependencies
Expand Down
14 changes: 2 additions & 12 deletions src/main-functions/pileup_readid.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -38,9 +38,7 @@ bool within_edit_dist(const std::string &s1, const std::string &s2) {
for (std::size_t j = 1; j < len2; ++j)
dist_holder[j] = j; //[0][j];
for (std::size_t i = 1; i < len1; ++i)
dist_holder[i * len2] = 0; //[i][0];

unsigned int best = len2;
dist_holder[i * len2] = i; //[i][0];

// loop over the distance matrix elements and calculate running distance
for (std::size_t j = 1; j < len2; ++j) {
Expand All @@ -58,20 +56,12 @@ bool within_edit_dist(const std::string &s1, const std::string &s2) {

if (min_value <= MAX_EDIT_DISTANCE)
any_below_threshold = true;
if (j == (len2 - 1) && min_value < best) {
// if this is the last row in j
// check if this is the best running score
best = min_value;
if (best <= MAX_EDIT_DISTANCE) {
return true;
}
}
}
if (!any_below_threshold) { // early exit to save time.
return false;
}
}
return best <= MAX_EDIT_DISTANCE;
return dist_holder.back() <= MAX_EDIT_DISTANCE;
}

// barcode -> UMI -> array of allele counts (A, T, C, G, -)
Expand Down

0 comments on commit 626135b

Please sign in to comment.