Skip to content

Commit

Permalink
Make fetch_sequences.py easier to read, as part of #806.
Browse files Browse the repository at this point in the history
Also reorder build steps to speed up test failures.
  • Loading branch information
donkirkby committed Feb 7, 2022
1 parent 4725d68 commit 16517be
Show file tree
Hide file tree
Showing 2 changed files with 28 additions and 27 deletions.
43 changes: 22 additions & 21 deletions .github/workflows/build-and-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,27 +15,6 @@ jobs:
- uses: actions/setup-go@v2
with:
go-version: '^1.15.6'
- name: Install Singularity
run: |
sudo apt-get install -qq \
build-essential \
uuid-dev \
libgpgme-dev \
squashfs-tools \
libseccomp-dev \
wget \
pkg-config \
git \
cryptsetup-bin
git clone https://github.com/singularityware/singularity.git
cd singularity
git checkout -q tags/v3.7.1
./mconfig && \
make -C ./builddir && \
sudo make -C ./builddir install
cd ..
rm -rf singularity
singularity --version

- name: Install IVA assembler dependencies
run: |
Expand Down Expand Up @@ -84,6 +63,28 @@ jobs:
- name: Test with pytest
run: coverage run --source=micall/core,micall/g2p,micall/resistance,micall/monitor -m pytest

- name: Install Singularity
run: |
sudo apt-get install -qq \
build-essential \
uuid-dev \
libgpgme-dev \
squashfs-tools \
libseccomp-dev \
wget \
pkg-config \
git \
cryptsetup-bin
git clone https://github.com/singularityware/singularity.git
cd singularity
git checkout -q tags/v3.7.1
./mconfig && \
make -C ./builddir && \
sudo make -C ./builddir install
cd ..
rm -rf singularity
singularity --version
- name: Singularity build
run: sudo singularity build micall.simg Singularity
- name: Upload Singularity Image
Expand Down
12 changes: 6 additions & 6 deletions micall/utils/fetch_sequences.py
Original file line number Diff line number Diff line change
Expand Up @@ -98,14 +98,14 @@ def check_hiv_seeds(project_config, unchecked_ref_names: set):


def check_hivgha_seeds(project_config, unchecked_ref_names: set):
print("HIVGHA project uses the same seeds as HIV, plus three chimeric seeds.")
ref_names = ["HIV1-CRF02_AG-GH-AB286855-seed",
"HIV1-CRF06_CPX-GH-AB286851-seed"]
print("HIVGHA project uses the same seeds as HIV, plus two chimeric seeds.")
source_names = ["HIV1-CRF02_AG-GH-AB286855-seed",
"HIV1-CRF06_CPX-GH-AB286851-seed"]
source_sequences = {}
for ref_name in ref_names:
parts = ref_name.split('-')
for source_name in source_names:
parts = source_name.split('-')
accession_number = parts[3]
source_sequences[ref_name] = fetch_by_accession(accession_number)
source_sequences[source_name] = fetch_by_accession(accession_number)

ref_names = set(project_config.getProjectSeeds('HIVGHA'))
ref_names -= set(project_config.getProjectSeeds('HIV'))
Expand Down

0 comments on commit 16517be

Please sign in to comment.