From 06c3d93c843a7a49ccd413eef1af7c9507f16dfd Mon Sep 17 00:00:00 2001 From: Bryan Briney Date: Tue, 8 Mar 2022 12:15:02 +0000 Subject: [PATCH 01/14] fix airr output header --- abstar/utils/output.py | 1 + 1 file changed, 1 insertion(+) diff --git a/abstar/utils/output.py b/abstar/utils/output.py index 5046d6d..f60cd3f 100644 --- a/abstar/utils/output.py +++ b/abstar/utils/output.py @@ -1064,6 +1064,7 @@ def _hadoop_tabular_output(vdj): 'raw_input'] AIRR_HEADER = ['sequence_id', + 'umi', 'sequence', 'sequence_aa', 'rev_comp', From 6fdb5cab4e0e016aea0b10c14c8d207df718f1f0 Mon Sep 17 00:00:00 2001 From: Bryan Briney Date: Tue, 8 Mar 2022 12:15:14 +0000 Subject: [PATCH 02/14] ignore BiopythonWarnings --- abstar/__init__.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/abstar/__init__.py b/abstar/__init__.py index c56dd5a..0009264 100644 --- a/abstar/__init__.py +++ b/abstar/__init__.py @@ -1,4 +1,6 @@ -from __future__ import absolute_import, division, print_function, unicode_literals +import warnings +from Bio import BiopythonWarning +warnings.simplefilter('ignore', BiopythonWarning) from .core.abstar import run, run_standalone, main, parse_arguments, validate_args from .preprocess import fastqc, adapter_trim, quality_trim From f298a7dcc5e7990b8b478443dd81a42d30caa3ea Mon Sep 17 00:00:00 2001 From: Bryan Briney Date: Fri, 1 Apr 2022 12:46:14 -0700 Subject: [PATCH 03/14] update AIRR output header --- abstar/utils/output.py | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/abstar/utils/output.py b/abstar/utils/output.py index f60cd3f..0160482 100644 --- a/abstar/utils/output.py +++ b/abstar/utils/output.py @@ -1074,11 +1074,13 @@ def _hadoop_tabular_output(vdj): 'v_call', 'v_gene', 'v_identity', + 'v_identity_aa', 'd_call', 'd_gene', 'j_call', 'j_gene', 'j_identity', + 'j_identity_aa', 'c_call', 'cdr3_length', 'fwr1_aa', @@ -1098,8 +1100,19 @@ def _hadoop_tabular_output(vdj): 'v_deletions', 'junction', 'junction_aa', + 'junction_in_frame', + 'isotype', + 'locus', 'v_cigar', 'd_cigar', 'j_cigar', 'species', + 'germline_database', 'raw_input'] + + + + + + + From 0636bc0b23a873a1885b62fd3edd103bdaeb055b Mon Sep 17 00:00:00 2001 From: Bryan Briney Date: Fri, 1 Apr 2022 12:49:54 -0700 Subject: [PATCH 04/14] update AIRR output header --- abstar/utils/output.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/abstar/utils/output.py b/abstar/utils/output.py index 0160482..a4f7ee7 100644 --- a/abstar/utils/output.py +++ b/abstar/utils/output.py @@ -1073,12 +1073,15 @@ def _hadoop_tabular_output(vdj): 'stop_codon', 'v_call', 'v_gene', + 'v_score', 'v_identity', 'v_identity_aa', 'd_call', 'd_gene', + 'd_score', 'j_call', 'j_gene', + 'j_score', 'j_identity', 'j_identity_aa', 'c_call', From b0d9c23c57130ac6a9585542bd4286d13d7b068d Mon Sep 17 00:00:00 2001 From: Bryan Briney Date: Wed, 6 Apr 2022 16:45:15 -0700 Subject: [PATCH 05/14] fix vdj_aa translation --- abstar/core/antibody.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/abstar/core/antibody.py b/abstar/core/antibody.py index d631bc5..dfb2db3 100644 --- a/abstar/core/antibody.py +++ b/abstar/core/antibody.py @@ -263,7 +263,7 @@ def _vdj_aa(self): # the only offset that matters is the offset between the full germline and the portion that matched. #self.v_rf_offset = self.oriented_input.sequence.find(self.vdj_nt) % 3 if self.v.germline_start > 0: - self.v_rf_offset = 3 - self.v.germline_start + self.v_rf_offset = 3 - (self.v.germline_start % 3) else: self.v_rf_offset = 0 self.coding_start = self.v.query_start + self.v_rf_offset From 0fab122a55fc0d4131a0aaf3431d3dec53019c9d Mon Sep 17 00:00:00 2001 From: Bryan Briney Date: Wed, 6 Apr 2022 16:56:15 -0700 Subject: [PATCH 06/14] update tests to use 'bcr' as receptor for Germline objects --- abstar/tests/test_indels.py | 4 ++-- abstar/tests/test_mutations.py | 8 ++++---- abstar/tests/test_regions.py | 4 ++-- 3 files changed, 8 insertions(+), 8 deletions(-) diff --git a/abstar/tests/test_indels.py b/abstar/tests/test_indels.py index 755e33f..2fea189 100644 --- a/abstar/tests/test_indels.py +++ b/abstar/tests/test_indels.py @@ -28,7 +28,7 @@ def compare_v_ins_to_reference(antibodies): errors = [] for antibody in antibodies: ref = antibody.v - v = GermlineSegment(ref.full, ref.species, ref.db_name, initialize_log=False) + v = GermlineSegment(ref.full, ref.species, ref.db_name, 'bcr', initialize_log=False) v.query_alignment = ref.query_alignment v.germline_alignment = ref.germline_alignment v.alignment_midline = ref.alignment_midline @@ -83,7 +83,7 @@ def compare_v_del_to_reference(antibodies): errors = [] for antibody in antibodies: ref = antibody.v - v = GermlineSegment(ref.full, ref.species, ref.db_name, initialize_log=False) + v = GermlineSegment(ref.full, ref.species, ref.db_name, 'bcr', initialize_log=False) v.query_alignment = ref.query_alignment v.germline_alignment = ref.germline_alignment v.alignment_midline = ref.alignment_midline diff --git a/abstar/tests/test_mutations.py b/abstar/tests/test_mutations.py index fe18d42..9542c4d 100644 --- a/abstar/tests/test_mutations.py +++ b/abstar/tests/test_mutations.py @@ -40,7 +40,7 @@ def compare_v_nt_mutations_to_reference(antibodies): for antibody in antibodies: ref = antibody.v.nt_mutations ab = MockAntibody() - v = GermlineSegment(antibody.v.full, antibody.v.species, antibody.v.db_name, initialize_log=False) + v = GermlineSegment(antibody.v.full, antibody.v.species, antibody.v.db_name, 'bcr', initialize_log=False) v.gene_type = antibody.v.gene_type v.query_alignment = antibody.v.query_alignment v.germline_alignment = antibody.v.germline_alignment @@ -90,7 +90,7 @@ def compare_j_nt_mutations_to_reference(antibodies): for antibody in antibodies: ref = antibody.j.nt_mutations ab = MockAntibody() - j = GermlineSegment(antibody.j.full, antibody.j.species, antibody.j.db_name, initialize_log=False) + j = GermlineSegment(antibody.j.full, antibody.j.species, antibody.j.db_name, 'bcr', initialize_log=False) j.gene_type = antibody.j.gene_type j.query_alignment = antibody.j.query_alignment j.germline_alignment = antibody.j.germline_alignment @@ -142,7 +142,7 @@ def compare_v_aa_mutations_to_reference(antibodies): for antibody in antibodies: ref = antibody.v.aa_mutations ab = MockAntibody() - v = GermlineSegment(antibody.v.full, antibody.v.species, antibody.v.db_name, initialize_log=False) + v = GermlineSegment(antibody.v.full, antibody.v.species, antibody.v.db_name, 'bcr', initialize_log=False) v.gene_type = antibody.v.gene_type v.query_alignment = antibody.v.query_alignment v.germline_alignment = antibody.v.germline_alignment @@ -197,7 +197,7 @@ def compare_j_aa_mutations_to_reference(antibodies): for antibody in antibodies: ref = antibody.j.aa_mutations ab = MockAntibody() - j = GermlineSegment(antibody.j.full, antibody.j.species, antibody.j.db_name, initialize_log=False) + j = GermlineSegment(antibody.j.full, antibody.j.species, antibody.j.db_name, 'bcr', initialize_log=False) j.gene_type = antibody.j.gene_type j.query_alignment = antibody.j.query_alignment j.germline_alignment = antibody.j.germline_alignment diff --git a/abstar/tests/test_regions.py b/abstar/tests/test_regions.py index 0c25ec2..6a8c208 100644 --- a/abstar/tests/test_regions.py +++ b/abstar/tests/test_regions.py @@ -32,7 +32,7 @@ def compare_v_regions_to_reference(antibodies): ab = MockAntibody() ab.oriented_input = antibody.oriented_input ab.v_rf_offset = antibody.v_rf_offset - v = GermlineSegment(antibody.v.full, antibody.v.species, antibody.v.db_name, initialize_log=False) + v = GermlineSegment(antibody.v.full, antibody.v.species, antibody.v.db_name, 'bcr', initialize_log=False) v.query_start = antibody.v.query_start v.gene_type = antibody.v.gene_type v._imgt_position_from_raw = antibody.v._imgt_position_from_raw @@ -65,7 +65,7 @@ def compare_j_regions_to_reference(antibodies): ab = MockAntibody() ab.oriented_input = antibody.oriented_input ab.v_rf_offset = antibody.v_rf_offset - j = GermlineSegment(antibody.j.full, antibody.j.species, antibody.j.db_name, initialize_log=False) + j = GermlineSegment(antibody.j.full, antibody.j.species, antibody.j.db_name, 'bcr', initialize_log=False) j.query_start = antibody.j.query_start j.gene_type = antibody.j.gene_type j._imgt_position_from_raw = antibody.j._imgt_position_from_raw From c76f4730edd7f979771dcd10d5af5992ae19a874 Mon Sep 17 00:00:00 2001 From: Bryan Briney Date: Wed, 6 Apr 2022 17:05:29 -0700 Subject: [PATCH 07/14] drop CI testing of python 3.7 --- .travis.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.travis.yml b/.travis.yml index fa8fa1d..63e2dd9 100644 --- a/.travis.yml +++ b/.travis.yml @@ -2,10 +2,10 @@ language: python # pick the appropriate requirements file matrix: include: - - python: "3.7" - env: REQUIREMENTS=requirements.txt - python: "3.8" env: REQUIREMENTS=requirements.txt + - python: "3.9" + env: REQUIREMENTS=requirements.txt branches: only: - master From 1f3f42dd72d3f08ef4e54951dd885828fa476add Mon Sep 17 00:00:00 2001 From: Bryan Briney Date: Wed, 6 Apr 2022 17:07:07 -0700 Subject: [PATCH 08/14] update supported python versions --- setup.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/setup.py b/setup.py index f5c4f9e..7fde220 100644 --- a/setup.py +++ b/setup.py @@ -59,8 +59,8 @@ 'bin/make_basespace_credfile',], 'include_package_data': True, 'classifiers': ['License :: OSI Approved :: MIT License', - 'Programming Language :: Python :: 3.7', 'Programming Language :: Python :: 3.8', + 'Programming Language :: Python :: 3.9', 'Topic :: Scientific/Engineering :: Bio-Informatics'] } From ae3fa336bfb9ba04fcca9923dc06d5278c1355ff Mon Sep 17 00:00:00 2001 From: Bryan Briney Date: Wed, 6 Apr 2022 17:07:24 -0700 Subject: [PATCH 09/14] Update README.md --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 13aeb6d..a8a03fb 100644 --- a/README.md +++ b/README.md @@ -69,7 +69,7 @@ A few helper scripts are included with abstar: To run the test suite, clone or download the repository and run `pytest ./` from the top-level directory. ### requirements -Python 3.7+ +Python 3.8+ abutils biopython celery From 5252aaca6c424da8004ac978c515d3811ddfe0a7 Mon Sep 17 00:00:00 2001 From: Bryan Briney Date: Wed, 6 Apr 2022 17:12:39 -0700 Subject: [PATCH 10/14] Update requirements.txt --- requirements.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/requirements.txt b/requirements.txt index 5172d10..b0ebb5c 100644 --- a/requirements.txt +++ b/requirements.txt @@ -8,4 +8,4 @@ pandas pyarrow pymongo pytest -scikit-bio +scikit-bio==0.5.6 From 751c73c522e9a1bd3a08aba1efb746513bf5f3cb Mon Sep 17 00:00:00 2001 From: Bryan Briney Date: Wed, 6 Apr 2022 17:38:32 -0700 Subject: [PATCH 11/14] Update .travis.yml --- .travis.yml | 27 ++++++++++++++++++++------- 1 file changed, 20 insertions(+), 7 deletions(-) diff --git a/.travis.yml b/.travis.yml index 63e2dd9..618e553 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,11 +1,23 @@ language: python + +python: + - "3.6" + # - "3.7" + - "3.8" + - "3.9" + +dist: + - bionic + - focal + # pick the appropriate requirements file -matrix: - include: - - python: "3.8" - env: REQUIREMENTS=requirements.txt - - python: "3.9" - env: REQUIREMENTS=requirements.txt +# matrix: +# include: +# - python: "3.8" +# env: REQUIREMENTS=requirements.txt +# - python: "3.9" +# env: REQUIREMENTS=requirements.txt + branches: only: - master @@ -16,7 +28,8 @@ before_install: - sudo apt-get install -y build-essential muscle mafft cd-hit # command to install dependencies install: - - pip install -r $REQUIREMENTS + # - pip install -r $REQUIREMENTS + - pip install -r requirements.txt # command to run tests script: - pytest # or py.test for Python versions 3.5 and below From 0346f4d4f408bdaa7401d074da6ba0c8fbc5c8da Mon Sep 17 00:00:00 2001 From: Bryan Briney Date: Wed, 6 Apr 2022 17:39:01 -0700 Subject: [PATCH 12/14] bump version to v0.5.4 --- abstar/version.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/abstar/version.py b/abstar/version.py index d8f68ee..9adb577 100644 --- a/abstar/version.py +++ b/abstar/version.py @@ -2,4 +2,4 @@ # 1) we don't load dependencies by storing it in __init__.py # 2) we can import it in setup.py for the same reason # 3) we can import it into your module module -__version__ = '0.5.3' \ No newline at end of file +__version__ = '0.5.4' \ No newline at end of file From c70c6077b850399601dc88f556e25703d66e9237 Mon Sep 17 00:00:00 2001 From: Bryan Briney Date: Wed, 6 Apr 2022 17:45:36 -0700 Subject: [PATCH 13/14] Update .travis.yml --- .travis.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index 618e553..4044067 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,7 +1,7 @@ language: python python: - - "3.6" + # - "3.6" # - "3.7" - "3.8" - "3.9" From f9ceb0444f4c5f26384099cc282757847d9fd2ae Mon Sep 17 00:00:00 2001 From: Bryan Briney Date: Wed, 6 Apr 2022 17:46:35 -0700 Subject: [PATCH 14/14] Update version.py --- abstar/version.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/abstar/version.py b/abstar/version.py index 9adb577..5094ae5 100644 --- a/abstar/version.py +++ b/abstar/version.py @@ -2,4 +2,4 @@ # 1) we don't load dependencies by storing it in __init__.py # 2) we can import it in setup.py for the same reason # 3) we can import it into your module module -__version__ = '0.5.4' \ No newline at end of file +__version__ = '0.5.5' \ No newline at end of file