Damien Goutte-Gattat
0e801b94ea
Switch to Black-enforced code style.
2 months ago
Damien Goutte-Gattat
fa20c968af
Switch back to the original click-shell.
...
Development of click-shell has resumed, so we no longer have to rely on
our own fork.
1 year ago
Damien Goutte-Gattat
4b3cffa39c
Replace click_shell by incenp.click_shell.
1 year ago
Damien Goutte-Gattat
b9723dcd10
Prepare the 0.2.0 release.
2 years ago
Damien Goutte-Gattat
671486d80c
Add more documentation.
...
Start properly documenting the project in a Sphinx-based manual.
2 years ago
Damien Goutte-Gattat
df47a1ed6c
Allow seqtool to access user-configured databases.
...
Make seqtool use the default DatabaseProvider object, so that it can
fetch sequences from any database listed in databases.ini.
2 years ago
Damien Goutte-Gattat
b3d14b925f
Remove the seqvault.rc configuration file.
...
Make the seqvault program use the same configuration file as the
default DatabaseProvider object.
Also remove the possibility to specify server settings on the command
line. This effectively makes the presence of a configuration file
mandatory.
2 years ago
Damien Goutte-Gattat
5f5f96b6ad
Change option for database name in databases.ini.
...
In the configuration file for databases, change the name of the
option indicating the database name from `name' to `database', for
clarity.
2 years ago
Damien Goutte-Gattat
d18fa3ea7d
Change location of seqvault's configuration file.
...
Make seqvault look for a seqvault.rc file in the
$XDG_CONFIG_HOME/bioutils directory.
2 years ago
Damien Goutte-Gattat
73d28dc432
Add more documentation.
2 years ago
Damien Goutte-Gattat
3fab6608c0
Improve documentation of the USA module.
2 years ago
Damien Goutte-Gattat
c9e45ce936
Remove unneeded import.
...
The usa module is no longer coupled to the databases module.
2 years ago
Damien Goutte-Gattat
efc07ed7ca
Remove query methods from the DatabaseProvider class.
...
With the new dict-like interface, that class is no longer supposed
to be used to query the databases directly. Client code should
instead get the database adapter from the dictionary and then use
the adapter to perfor any query.
2 years ago
Damien Goutte-Gattat
a82269f98c
Use a dict-like interface for the DatabaseProvider.
...
Make the DatabaseProvider object use a dict-like interface to check
if a database name exists and to get a database adapter. This allows
the USA code to accept a mere dictionary (with database names as keys
and database adapters as values) instead of a DatabaseProvider object.
Rename the `db_provider' argument to `databases' to reflect that
change.
2 years ago
Damien Goutte-Gattat
63a14f1d85
Do not use a global DatabaseProvider object.
...
Make the read_usa and parse_usa functions accept an optional
db_provider argument instead of relying on a module-level global
DatabaseProvider object.
2 years ago
Damien Goutte-Gattat
4230b44a1f
Fix creation of an unprefixed database.
...
A typo (missing closing parenthesis) prevented the creation of a
new subdatabase on a BioSQL server without support for prefixed
databases.
2 years ago
Damien Goutte-Gattat
d08bde1e5a
seqvault: Add support for SQLite databases.
...
Add the (unreleased by upstream) BioSQL schema for SQLite3. Fix
detection of the 'prefix' column.
2 years ago
Damien Goutte-Gattat
b64f943c77
seqvault: Fix creation of a new database.
...
Add a missing call to commit() to make sure the new database is
indeed created.
2 years ago
Damien Goutte-Gattat
3437bc4031
Add the expasy and entrez database sources.
...
Add adapters to allow fetching sequences from the NCBI servers and
from ExPASy.
2 years ago
Damien Goutte-Gattat
9e3e02afcd
Support SQLite-backed BioSQL databases.
...
Add support for sqlite3 driver for BioSQL databases. Unfortunately
this involves having to add an explicit 'ESCAPE' clause to all
queries as sqlite3 does not define any escape character by default.
2 years ago
Damien Goutte-Gattat
30da42775b
Use a single adapter for BioSQL-based databases.
...
Do not use one adapter for BioSQL subdatabases and another one for
BioSQL "entire" databases. Merge the two into a single adapter and
adjust the SQL queries when needed.
2 years ago
Damien Goutte-Gattat
5cfd8b0b6f
Support wildcards when querying a BioSQL database.
...
Implement support for '*' and '?' wildcards in database-backed USAs.
2 years ago
Damien Goutte-Gattat
f7735db4eb
Allow access to a specific subdatabase.
...
A BioSQL server contains subdatabases. This patch allows to define
a database source corresponding to a single subdatabase, while still
allowing to define a source corresponding to the entire server
(spanning all subdatabases).
2 years ago
Damien Goutte-Gattat
7bf4106794
Change the DatabaseProvider interface.
...
Do not use a single method for all kind of queries. Instead, use 3
distinct methods for fetching records based on a identifier, fetching
records based on a field query, and fetching all records.
2 years ago
Damien Goutte-Gattat
439255721c
Rough implementation of the database access layer.
...
Start implementing fetching records from database-backed USAs. Only
BioSQL-based databases are supported for now.
2 years ago
Damien Goutte-Gattat
c1a8553eef
Prepare 0.1.2 release.
2 years ago
Damien Goutte-Gattat
31b216528a
Fix Click interface for the blast tool.
...
Add the missing pass_context decorator to the definition of the
blast tool.
2 years ago
Damien Goutte-Gattat
e89320c0a2
Prepare 0.1.1 release.
...
Present the USA module in the README; bump version number and add the
NEWS file.
2 years ago
Damien Goutte-Gattat
f253447794
Compile search patterns in database-based USAs.
...
When creating a database-based USAs, compile the search pattern given
(if any). This will be used when fetching records from a database-based
USA is actually implemented.
2 years ago
Damien Goutte-Gattat
ae29033b6b
Only allow valid search fields.
...
When parsing a file-based or database-based USA, check that the search
field, if any, is one of the fields allowed by the USA specification.
2 years ago
Damien Goutte-Gattat
d0f5ca6339
Implement per-field search in USAs.
...
When reading a file-based USA, allow to filter sequences based on
explicitly specified fields.
2 years ago
Damien Goutte-Gattat
c36e3f352b
Match identifier against unversioned accession number.
...
If a record’s accession number contains a version number, ignore it
when matching against an identifier.
2 years ago
Damien Goutte-Gattat
b43e77c717
Use both name and id when matching a record against an identifier.
...
The USA specification says that unless a ID or ACC field is
explicitly used, an identifier in a USA should match against any of the
two fields.
2 years ago
Damien Goutte-Gattat
660ea77f3c
Support wildcard ID lookups.
...
Add support for USAs with wildcard ID specifiers.
2 years ago
Damien Goutte-Gattat
8a6448ad2f
Support reading from program-based USAs.
...
Implement fetching sequences from a ProgramUSA object.
2 years ago
Damien Goutte-Gattat
c849b899e4
Reuse first record's details when catenating sequences.
...
When catenating several sequences into one, default to copying the
details and annotations from the first sequence.
2 years ago
Damien Goutte-Gattat
a87abf8e62
Add dependencies in setup.py.
...
Add Biopython as a required dependency, and reportlab as an optional
dependency. Do not require reportlab to launch the seqtool program.
2 years ago
Damien Goutte-Gattat
d26b0741c3
Fix invocation of the plasmm command.
...
The plasmm command expects an array of USA specs.
2 years ago
Damien Goutte-Gattat
c146e376f0
Autodetect format for file-based USAs.
...
When parsing a file-based USA, try to guess the format from the
extension if no explicit format is specified.
2 years ago
Damien Goutte-Gattat
209f190b70
Add the newdb command.
...
Add a command to create a new biodatabase.
2 years ago
Damien Goutte-Gattat
b01e79ccdb
Fix incorrect use of is_prefixed().
...
One call to is_prefixed was still using the temporary name of
is_prefixed_biosql().
2 years ago
Damien Goutte-Gattat
5d679630d2
Support edit records in unprefixed databases.
...
The edit command was relying on the existence of database prefixes.
Make it work also in unprefixed databases.
2 years ago
Damien Goutte-Gattat
3712e13548
Add support for non-modified BioSQL servers.
...
Make the classes in vault.py support BioSQL servers that use the
unmodified BioSQL schema.
2 years ago
Damien Goutte-Gattat
d5c5b4e4c7
Add the ipython command to seqvault.
...
Add a command to start a IPython shell. This is mainly intended for
development and debugging, but could be useful for an end-user as well.
2 years ago
Damien Goutte-Gattat
7a6c2657c4
Convert cc3d.py to Click.
...
Use a Click-based interface for cc3d instead of using argparse.
2 years ago
Damien Goutte-Gattat
d508e69d7f
Allow missing default configuration file.
...
It should not be an error if the default configuration does not exist.
Only if a configuration file has been explicitly specified on the
command line should we check that it does exist.
2 years ago
Damien Goutte-Gattat
71342729b9
Add some error handling.
...
Catch some error situations in SeqVault.
2 years ago
Damien Goutte-Gattat
ab6e617215
Rework the seqvault command.
...
Move the seqvault command to a separate Click-based module.
2 years ago
Damien Goutte-Gattat
1b4084fd91
Reorganize the seq utilities.
...
Regroup all command-line tools into a single Click-based master tool.
2 years ago
Damien Goutte-Gattat
92bd0186ab
Add draft version of the vault command.
...
Add a command acting as a user-facing interface to a BioSQL database.
2 years ago