Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add option to specify database path #200

Open
pimarin opened this issue Sep 1, 2023 · 4 comments
Open

Add option to specify database path #200

pimarin opened this issue Sep 1, 2023 · 4 comments

Comments

@pimarin
Copy link

pimarin commented Sep 1, 2023

Hello,
Is there a way to manually add the database folder to plasmidfinder, resfinder and pointfinder ?
Using the argument --database i failed to try it.
Especially on galaxy we need to bind a data manager (which deal with all version of databases) and I need an entry point to speificy the path.

@apetkau
Copy link
Member

apetkau commented Sep 5, 2023

Hello @pimarin

You will have to build a separate staramr database first within a particular directory:

staramr db build --dir db

Now, you can use the --database argument with the built database in the db/ directory:

staramr search --database db ...

@Leonervin
Copy link

Leonervin commented Sep 26, 2023

Hi. I am running the following command

staramr search --database staramr_databases/ -o Baumanii barcode05.asm.contigs.fasta --no-exclude-genes 

I am getting the following error. ERROR: error with [blastn -out /tmp/tmpsfc0otw4/

Any ways to solve?

@apetkau
Copy link
Member

apetkau commented Sep 29, 2023

Hello @Leonervin

Was that the full error message?

I built a new directory with the staramr databases as described above, and I get the error message:

error with [blastn -out /tmp/tmpjahnntev/SRR1952908.fasta.all.resfinder.blast.tsv
...
stderr=FASTA-Reader: Ignoring invalid residues at position(s): On line 44207: 58, 63-66, 68-72

Does this match what you got?

Creating a separate directory with the staramr databases will by default download the latest commits in the ResFinder/PointFinder/PlasmidFinder git repositories. As I do not maintain or have control over those repositories, I cannot guarantee that any commits other than the commits used by the database files distributed with staramr work. I would recommend using the version of the ResFinder/PointFinder/PlasmidFinder databases that are distributed with staramr rather than updating them (i.e., run staramr search without the --database option).

If you instead wish to have the ResFinder/PointFinder/PlasmidFinder databases stored in a separate directory (and use the --database staramr_databases as described above), then I would recommend specifying the particular commits that are used by staramr by default:

# Build database in directory staramr_databases/
staramr db build --dir staramr_databases --resfinder-commit fa32d9a3cf0c12ec70ca4e90c45c0d590ee810bd --pointfinder-commit 8c694b9f336153e6d618b897b3b4930961521eb8 --plasmidfinder-commit c18e08c17a5988d4f075fc1171636e47546a323d

# Search using the database files in the passed directory
staramr search --database staramr_databases/ -o Baumanii barcode05.asm.contigs.fasta --no-exclude-genes 

Those specific commits can be found here for your reference:

DEFAULT_COMMITS = {
'resfinder': 'fa32d9a3cf0c12ec70ca4e90c45c0d590ee810bd', # 2022-05-24
'pointfinder': '8c694b9f336153e6d618b897b3b4930961521eb8', # 2021-02-01
'plasmidfinder': 'c18e08c17a5988d4f075fc1171636e47546a323d', # 2023-01-18
}

@splaisan
Copy link

splaisan commented Nov 8, 2023

nice, was looking for it, this could best be added to the doc to be found by others

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants