Commit Graph

15987 Commits

Author SHA1 Message Date
47e917086a Restore codecov note to CONTRIBUTING.rst
See #4904

[ci skip]
2025-01-05 20:49:49 +00:00
c5b08bbede Restore CodeCov badge to README.rst
See #4904

[ci skip]
2025-01-05 20:49:33 +00:00
36e82eb537 GitHub actions CodeCov (#4904)
* coverage capture on GitHub Actions (not PyPy), Linux may be too slow?
* collect coverage for Bio and BioSQL (although later not working)
* drop restriction on numpy (no longer an issue)

Pending - coverage upload from AppVeyor too
2025-01-05 20:27:25 +00:00
6ae3c4c7e2 Index MAF files in binary mode
We want the index to use raw bytes offsets, rather
than psuedo offsets after cross platform newline
normalisation.

Note: This has left the MAF iterator able to take
either bytes or text mode handles as input.
2025-01-04 11:37:18 +00:00
b4b1373109 Fix typo 2025-01-03 22:09:31 +00:00
21956fc818 Less aggressive origin-wrapping GenBank fix
Stop it triggering on the different invalid locations reported on #4876.
2025-01-03 22:09:31 +00:00
d546f3e6de Thank Alan in NEWS
[ci skip]
2025-01-03 21:49:42 +00:00
b6f74f2f71 bug fix handle NoneType when writing to newick with branch_length_only=True
added test for phyloxml -> newick with branch_length_only=True

Peter: This is a rebased version of pull request #552.
2025-01-03 21:12:25 +00:00
aea4f9988e Force appveyor to use conda-forge while updating conda to avoid using the defaults channel 2025-01-03 19:21:37 +00:00
fd1737cc00 Update contributors
Including Carlos Peña for a few issues originally logged on #3045

[ci skip]
2025-01-03 19:14:53 +00:00
bc03fc6c24 Fix typo in restriction example
Originally spotted by Carlos Peña on #3045.
2025-01-03 19:11:38 +00:00
3696d28d36 Use .. code-block:: pycon for this docstring (#4902)
Based on an RST rendering issue (due to blank lines within
the doctest output) flagged on #3045 by Carlos Peña.
2025-01-01 11:40:51 +00:00
8d70915132 Update test_GenBank.py 2024-12-31 18:44:31 +00:00
39eb8f9889 Fix formatting errors 2024-12-31 18:44:31 +00:00
b8b90e1152 4775: raise warnings instead of errors if dashes are not in the expected places for dates 2024-12-31 18:44:31 +00:00
e0c081cd4d Modified quality mapping in QualityIO to use faster string-translate method, removed "min" bottleneck in FastqIteratorAbstractBaseClass by replacing with faster string methods, and added more detailed error messaging with a custom InvalidCharError error class 2024-12-31 18:33:38 +00:00
275f04c458 Do not mention BAM when encountering an invalid bgzipped file
If a program reads both a BAM file and a bgzipped compressed FASTA or VCF
file, the error message can confuse the user because it’s easy to overlook
the "e.g.", and the user might think that the BAM file is the problematic
one while it is the other.
2024-12-31 18:31:50 +00:00
83ca2ed29a Bio.SeqIO subclassing in writers (#4857) 2024-12-31 18:30:50 +00:00
8787146879 Add test GenBank file and unit test 2024-12-31 18:13:30 +00:00
67ea5cee9a Fix parsing of DBLINK field with multiline records 2024-12-31 18:13:30 +00:00
f7aedac150 Adjust coverages settings under AppVeyor & CircleCI
Suggested by Manuel Lera-Ramirez, should close #4867
2024-12-31 17:30:38 +00:00
6efb253dd1 Fix for numpy 2.2 testing truth of empty arrays
ValueError: The truth value of an empty array is ambiguous. Use  to check that an array is not empty.

Using bool(empty_array) was deprecated, and became an error in numpy 2.2.0.
2024-12-31 17:13:12 +00:00
1955711222 setup.py: don't error on setuptools 75.3.0.post0 2024-12-16 16:42:57 +00:00
3ddb5bf2ad Rework this doctest to avoid numpy 2.2 shape in repr
With this minor change, the doctest will work on older numpy
and numpy 2.2 as well (where the array __repr__ includes
shape information by default).

This also fixed the over indentation of the PCA docstring,
and switched to the standard 'import numpy as np' idiom.
2024-12-16 16:41:25 +00:00
004ee91384 Update version classifiers in setup.py
Adding Python 3.13 (see preceding commit),
and overdue removal of 3.8
2024-12-06 15:02:32 +00:00
c4ff6403a6 Shift GitHub actions to test on Python 3.13 2024-12-06 15:00:52 +00:00
9b512d8dc6 Add me as contributor 2024-11-25 22:52:29 +00:00
b7a8d7973f Properly update kwargs 2024-11-25 22:52:29 +00:00
474ca70b62 Pass IGNORE_EXCEPTION_DETAIL to run_doctest in Seq.py 2024-11-25 22:52:29 +00:00
0f9f60b43d Avoid loading of doctest: use Bio._utils instead 2024-11-25 22:52:29 +00:00
6ebae6a66d add psiblast test (#4889)
* update

* update

---------

Co-authored-by: Michiel de Hoon <mdehoon@madpc2s-MacBook-Pro.local>
2024-11-21 17:29:30 +09:00
68dc8b6463 Address C compiler warnings (#4885)
* Initialize variables with dummy values to silence warnings

* Fix indentation to silence warnings

* Initialize pointers to NULL to silence warnings
2024-11-20 14:31:17 +09:00
e70e66030b Fix for #4886 (#4887)
* update

* black

---------

Co-authored-by: Michiel de Hoon <mdehoon@tkx288.genome.gsc.riken.jp>
2024-11-19 16:41:59 +09:00
b9dd9cf41f refactor: Make b_factor and occupancy in StructureBuilder init_atom() Optional 2024-11-11 21:16:45 +00:00
cf7844c6e8 Stop explicitly dropping conda defaults on AppVeyor
This has started to fail on 64bit Windows with:

```
CondaKeyError: 'channels': value 'defaults' not present in config
```

See #4801. We might still want to do this for 32bit Windows?
2024-10-28 09:39:52 +00:00
e6b7b96430 fix: free parser resources in some edge cases and enhance error handling 2024-10-27 22:06:46 +00:00
596a552070 fix: free expat parser resources 2024-10-27 22:06:46 +00:00
2f997ec8d6 fix: free expat_parse resources when exception raised 2024-10-27 22:06:46 +00:00
82b3e67096 Fix calculating height of clades when building UPGMA tree version 2 (#3951)
* Fixed a bug in calculating the height of clades when building a UPGMA tree

* added my name to contrib.rst alphabetically

* minor corrections

* formatting changes

* Add tests

---------

Co-authored-by: She Zhang <shz66@pitt.edu>
Co-authored-by: Fabian Egli <fabianegli@users.noreply.github.com>
Co-authored-by: Eric Talevich <etal@users.noreply.github.com>
2024-10-16 21:07:35 -07:00
eedf82d415 FOGSAA PairwiseAligner implementation (#4784)
* scaffold FOGSAA and add setter for PairwiseAligner.algorithm

* add first version of FOGSAA scoring

* add restrictions to algorithm setter and support matrix scoring in FOGSAA

* add test for running fogsaa with matrix scoring

* Remove algorithm setter in lieu of FOGSAA_Mode, scaffold PathGenerator for FOGSAA

* Add basic support for FOGSAA alignment

* Add FOGSAA alignment with matrix scoring

* Add more restrictions to FOGSAA parameters.

These restrictions come from the queue data structure used not from the
algorithm itself. Changing the priority queue implementation may ease
these restrictions at a possible loss to performance.

* Change FOGSAA priority queue implementation to a max heap

This allows for the queue sort doubles, which in turn removes the
requirement of integer scores in FOGSAA.

* Allocate memory once, fix affine gaps, remove threshold

* more fixes

* Add error checking, debugging code, and fix lower bounds

* add support for different affine gaps on edges

* remove debug printfs, warn on invalid parameters

* fix floating point comparison bugs

* only copy cells of optimal path in fogsaa align

* stop using different macros for fogsaa cell types

* fix fogsaa docstrings, iterator, and reset algorithm on set_mode

* mention fogsaa in Tutorial/chapter_pairwise.rst

* fix fogsaa documentation in Doc/Tutorial/chapter_pairwise.rst

* fix typo
2024-10-17 10:07:18 +09:00
113ead19d3 [pre-commit.ci] autoupdate
updates:
- [github.com/pre-commit/pre-commit-hooks: v4.6.0 → v5.0.0](https://github.com/pre-commit/pre-commit-hooks/compare/v4.6.0...v5.0.0)
- [github.com/astral-sh/ruff-pre-commit: v0.5.0 → v0.6.9](https://github.com/astral-sh/ruff-pre-commit/compare/v0.5.0...v0.6.9)
- [github.com/psf/black: 24.4.2 → 24.10.0](https://github.com/psf/black/compare/24.4.2...24.10.0)
- [github.com/PyCQA/flake8: 7.1.0 → 7.1.1](https://github.com/PyCQA/flake8/compare/7.1.0...7.1.1)
- [github.com/pre-commit/mirrors-mypy: v1.10.1 → v1.11.2](https://github.com/pre-commit/mirrors-mypy/compare/v1.10.1...v1.11.2)
- [github.com/rstcheck/rstcheck: v6.2.0 → v6.2.4](https://github.com/rstcheck/rstcheck/compare/v6.2.0...v6.2.4)
- [github.com/PyCQA/doc8: v1.1.1 → v1.1.2](https://github.com/PyCQA/doc8/compare/v1.1.1...v1.1.2)
2024-10-08 09:22:12 +01:00
35b09e7c92 Support escaped quotes in newick trees 2024-10-03 18:48:59 +01:00
d5459bb627 Preserve root branch length in Phylo.TreeMixin.prune 2024-10-02 13:47:27 +01:00
1605da01a7 Add type annotations to methods in Bio.PDB.Atom 2024-09-29 18:37:51 +01:00
ac94e87128 make mode consistent (#4858) 2024-09-26 11:36:14 +09:00
e0c4d1a2e6 Bio.SeqIO.NibIO - use subclassing (#4854)
This also drops the mincount and maxcount arguments on the base
class which were only being used for this file format.
2024-09-24 12:11:17 +01:00
ddd5982280 remove unused variable 2024-09-24 12:08:41 +01:00
0b57f76305 Use modes in SequenceWriter (#4850)
Also use a temporary file for GenBank output test
2024-09-23 15:13:37 +01:00
e6d24c595a - Implemented lazy _per_letter_annotation construction to speed up SeqRecord initialization (if you directly access the protected _per_letter_annotation, be aware that it can now be None. This corresponds to an empty dict)
- Added private alternative constructor SeqRecord._from_validated(...). This avoids type and length checks in cases when these have already been done
- Modified SeqRecord seq and letter_annotation attributes to use decorator-based formatting, and included more type annotations
- Modified sam parser to explicitly construct a new SeqRecord to remove the deepcopy bottleneck
- Modified FastaIterator, QualityIO, and SffIO parsers to use _from_validated to redundant checks and make code cleaner
- Added explicit checks in SeqRecord methods for cases when Seq is None, and specific error messages for those cases
2024-09-23 14:20:26 +01:00
824c34399c Updated miter and endcap settings for Bio.Phylo matplotlib drawing
Updated join and end cap for Bio.phylo phylogenetic trees

Updated join and end cap for Bio.phylo phylogenetic trees
2024-09-23 14:16:57 +01:00