From 874c989856580bd52bc077870dce5a5ee4bd4ace Mon Sep 17 00:00:00 2001 From: Christopher Tomkins-Tinch Date: Tue, 12 Mar 2024 11:15:21 -0400 Subject: [PATCH 1/9] update viral-core 2.3.0 -> 2.3.1 update viral-core 2.3.0 -> 2.3.1 (w/ python 3.8 -> 3.10) --- Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index 5e1a10fd..dcda7937 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,4 +1,4 @@ -FROM quay.io/broadinstitute/viral-core:2.3.0 +FROM quay.io/broadinstitute/viral-core:2.3.1 LABEL maintainer "viral-ngs@broadinstitute.org" From e36dda84e64d7148a080156c8be395f8ec782eb0 Mon Sep 17 00:00:00 2001 From: Christopher Tomkins-Tinch Date: Tue, 12 Mar 2024 11:30:32 -0400 Subject: [PATCH 2/9] comment out kwip in requirements-conda.txt comment out kwip in requirements-conda.txt since it relies on khmer, which does not yet support py 3.10 --- requirements-conda.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/requirements-conda.txt b/requirements-conda.txt index 0d7faad3..5a35058a 100644 --- a/requirements-conda.txt +++ b/requirements-conda.txt @@ -8,5 +8,5 @@ mashtree>=1.4.6 #sourmash-minimal>=4.8.6 ## see below #sourmash_plugin_branchwater>=0.9.1 ## running into resolver problems at least with our current version of python skani>=0.2.1 -kwip>=0.2.0 +#kwip>=0.2.0 ## relies on khmer, which as of 2024-03-12 does not support python 3.10 # Python packages below From ac7345839225cf3e2a29c35b1f9f6c40727cf2df Mon Sep 17 00:00:00 2001 From: Christopher Tomkins-Tinch Date: Tue, 12 Mar 2024 12:10:02 -0400 Subject: [PATCH 3/9] include sourmash among dependencies --- requirements-conda.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/requirements-conda.txt b/requirements-conda.txt index 5a35058a..e34ab240 100644 --- a/requirements-conda.txt +++ b/requirements-conda.txt @@ -5,7 +5,7 @@ muscle=3.8.1551 spades>=3.15.5 fastani>=1.34 mashtree>=1.4.6 -#sourmash-minimal>=4.8.6 ## see below +sourmash-minimal>=4.8.6 ## see below #sourmash_plugin_branchwater>=0.9.1 ## running into resolver problems at least with our current version of python skani>=0.2.1 #kwip>=0.2.0 ## relies on khmer, which as of 2024-03-12 does not support python 3.10 From d9325503cc844f87838c726b9c1fc71b22e99767 Mon Sep 17 00:00:00 2001 From: Christopher Tomkins-Tinch Date: Tue, 12 Mar 2024 12:10:25 -0400 Subject: [PATCH 4/9] include sourmash_plugin_branchwater among dependencies --- requirements-conda.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/requirements-conda.txt b/requirements-conda.txt index e34ab240..dfc5cf36 100644 --- a/requirements-conda.txt +++ b/requirements-conda.txt @@ -6,7 +6,7 @@ spades>=3.15.5 fastani>=1.34 mashtree>=1.4.6 sourmash-minimal>=4.8.6 ## see below -#sourmash_plugin_branchwater>=0.9.1 ## running into resolver problems at least with our current version of python +sourmash_plugin_branchwater>=0.9.1 ## running into resolver problems at least with our current version of python skani>=0.2.1 #kwip>=0.2.0 ## relies on khmer, which as of 2024-03-12 does not support python 3.10 # Python packages below From 9534fd82b5c02038de86a6c7dcfeab55b61410d1 Mon Sep 17 00:00:00 2001 From: Christopher Tomkins-Tinch Date: Tue, 12 Mar 2024 12:12:15 -0400 Subject: [PATCH 5/9] change Seq.ungap("-") to Seq.replace("-","") https://github.com/biopython/biopython/blob/master/DEPRECATED.rst#bioseqsequngap --- assembly.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/assembly.py b/assembly.py index 1f0a371e..820d7443 100755 --- a/assembly.py +++ b/assembly.py @@ -478,7 +478,7 @@ def order_and_orient(inFasta, inReference, outFasta, assert r==0 scaffolds = [tuple(Bio.SeqIO.parse(scaffolds_fasta[ref_num], 'fasta')) for ref_num in range(n_refs)] - base_counts = [sum([len(seg.seq.ungap('N')) for seg in scaffold]) \ + base_counts = [sum([len(seg.seq.replace("-","")) for seg in scaffold]) \ if len(scaffold)==n_genome_segments else 0 for scaffold in scaffolds] best_ref_num = numpy.argmax(base_counts) if (len(scaffolds[best_ref_num]) != n_genome_segments) and not allow_incomplete_output: From 0cf15db678579d976fd78c79971b86eb9743b46e Mon Sep 17 00:00:00 2001 From: Christopher Tomkins-Tinch Date: Tue, 12 Mar 2024 15:27:56 -0400 Subject: [PATCH 6/9] "ungap" ambig bases in order_and_orient --- assembly.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/assembly.py b/assembly.py index 820d7443..e71bbe94 100755 --- a/assembly.py +++ b/assembly.py @@ -478,7 +478,7 @@ def order_and_orient(inFasta, inReference, outFasta, assert r==0 scaffolds = [tuple(Bio.SeqIO.parse(scaffolds_fasta[ref_num], 'fasta')) for ref_num in range(n_refs)] - base_counts = [sum([len(seg.seq.replace("-","")) for seg in scaffold]) \ + base_counts = [sum([len(seg.seq.replace("N","")) for seg in scaffold]) \ if len(scaffold)==n_genome_segments else 0 for scaffold in scaffolds] best_ref_num = numpy.argmax(base_counts) if (len(scaffolds[best_ref_num]) != n_genome_segments) and not allow_incomplete_output: From 4165af34d41cec2e0ccaa809cc81fd5bb7ca0769 Mon Sep 17 00:00:00 2001 From: Christopher Tomkins-Tinch Date: Tue, 12 Mar 2024 15:47:20 -0400 Subject: [PATCH 7/9] more flexible version pin for matplotlib in docs build --- docs/requirements.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/requirements.txt b/docs/requirements.txt index 0f98095a..20bf937d 100644 --- a/docs/requirements.txt +++ b/docs/requirements.txt @@ -2,7 +2,7 @@ jinja2==3.1.2 # https://github.com/readthedocs/readthedocs.org/issues/9037#issue Sphinx==5.3.0 #override sphinx pinning done by RTD: https://docs.readthedocs.io/en/stable/build-default-versions.html#external-dependencies sphinx-argparse sphinx-rtd-theme==1.1.1 -matplotlib==2.2.4 +matplotlib>=2.2.4 PyYAML==6.0 mock==5.0.1 recommonmark From 989e92261a958a5f3238208071124e41165befb2 Mon Sep 17 00:00:00 2001 From: Christopher Tomkins-Tinch Date: Tue, 12 Mar 2024 16:22:42 -0400 Subject: [PATCH 8/9] try pinning khmer to an older version like sourmash did some time ago --- requirements-conda.txt | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/requirements-conda.txt b/requirements-conda.txt index dfc5cf36..29152ecb 100644 --- a/requirements-conda.txt +++ b/requirements-conda.txt @@ -8,5 +8,6 @@ mashtree>=1.4.6 sourmash-minimal>=4.8.6 ## see below sourmash_plugin_branchwater>=0.9.1 ## running into resolver problems at least with our current version of python skani>=0.2.1 -#kwip>=0.2.0 ## relies on khmer, which as of 2024-03-12 does not support python 3.10 +khmer>=2.1,<3.0a0 +kwip>=0.2.0 ## relies on khmer, which as of 2024-03-12 does not support python 3.10 # Python packages below From 8fca953387f4fa81766731d7f39e992caabf6847 Mon Sep 17 00:00:00 2001 From: Christopher Tomkins-Tinch Date: Tue, 12 Mar 2024 16:32:18 -0400 Subject: [PATCH 9/9] comment out kwip for now --- requirements-conda.txt | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/requirements-conda.txt b/requirements-conda.txt index 29152ecb..dfc5cf36 100644 --- a/requirements-conda.txt +++ b/requirements-conda.txt @@ -8,6 +8,5 @@ mashtree>=1.4.6 sourmash-minimal>=4.8.6 ## see below sourmash_plugin_branchwater>=0.9.1 ## running into resolver problems at least with our current version of python skani>=0.2.1 -khmer>=2.1,<3.0a0 -kwip>=0.2.0 ## relies on khmer, which as of 2024-03-12 does not support python 3.10 +#kwip>=0.2.0 ## relies on khmer, which as of 2024-03-12 does not support python 3.10 # Python packages below