From 5d3898ca3b4d47677e9aac34adb5baca09756e85 Mon Sep 17 00:00:00 2001 From: Dan Fornika Date: Wed, 8 May 2024 17:35:59 -0700 Subject: [PATCH] Revert "Bump mlst version (#23)" (#24) This reverts commit dbe554b41e0581f7ddb5b5b7a53c7fb43770dafd. --- .github/data/expected_sequence_types.csv | 4 ++-- .github/scripts/prepare_artifacts.sh | 4 ++-- bin/parse_alleles.py | 10 +++++----- environments/environment.yml | 4 ++-- 4 files changed, 11 insertions(+), 11 deletions(-) diff --git a/.github/data/expected_sequence_types.csv b/.github/data/expected_sequence_types.csv index 41c77cd..c051629 100644 --- a/.github/data/expected_sequence_types.csv +++ b/.github/data/expected_sequence_types.csv @@ -1,4 +1,4 @@ sample_id,scheme,sequence_type -NC-000913.3,ecoli_achtman_4,10 -NC-016845.1,klebsiella,11 +NC-000913.3,ecoli,10 +NC-016845.1,kpneumoniae,11 NZ-LR890181.1,cfreundii,8 diff --git a/.github/scripts/prepare_artifacts.sh b/.github/scripts/prepare_artifacts.sh index 881b7d3..2ac7069 100755 --- a/.github/scripts/prepare_artifacts.sh +++ b/.github/scripts/prepare_artifacts.sh @@ -4,9 +4,9 @@ artifacts_dir="artifacts" echo "Prepare artifacts .." >> ${artifacts_dir}/test.log -mkdir -p ${artifacts_dir}/assemblies +mkdir -p ${artifacts_dir}/fastq -cp -r .github/data/assemblies/* ${artifacts_dir}/assemblies +mv .github/data/fastq/*.fastq.gz ${artifacts_dir}/fastq mkdir -p ${artifacts_dir}/pipeline_outputs diff --git a/bin/parse_alleles.py b/bin/parse_alleles.py index c199227..2863c69 100755 --- a/bin/parse_alleles.py +++ b/bin/parse_alleles.py @@ -14,7 +14,7 @@ def main(args): if args.sample_id: sample_id = args.sample_id else: - sample_id = sample['id'] + sample_id = sample print(','.join([ 'sample_id', @@ -26,11 +26,11 @@ def main(args): 'score', ])) - if not sample['alleles']: + if not mlst[sample]['alleles']: continue - num_alleles = len(sample['alleles']) - scheme = sample['scheme'] - for locus, allele in sample['alleles'].items(): + num_alleles = len(mlst[sample]['alleles']) + scheme = mlst[sample]['scheme'] + for locus, allele in mlst[sample]['alleles'].items(): perfect_match = True novel_allele = False score = round(90 / num_alleles, 2) diff --git a/environments/environment.yml b/environments/environment.yml index a5f0a08..fcaf24e 100644 --- a/environments/environment.yml +++ b/environments/environment.yml @@ -1,9 +1,9 @@ -name: mlst-nf +name: mlst channels: - conda-forge - bioconda - defaults dependencies: - python=3 - - mlst=2.23.0 + - mlst=2.16.1 - quast=5.0.2