Skip to content

add plasmidfinder 3.0.3#1589

Merged
erinyoung merged 4 commits intoStaPH-B:masterfrom
Kincekara:plasmidfinder
Mar 12, 2026
Merged

add plasmidfinder 3.0.3#1589
erinyoung merged 4 commits intoStaPH-B:masterfrom
Kincekara:plasmidfinder

Conversation

@Kincekara
Copy link
Copy Markdown
Collaborator

There is a new version. Hopefully resolves #1585
Removed .git files after db installation.

diff:

diff build-files/plasmidfinder/3.0.2 build-files/plasmidfinder/3.0.3
diff build-files/plasmidfinder/3.0.2/Dockerfile build-files/plasmidfinder/3.0.3/Dockerfile
5,12c5
< ARG PLASMIDFINDER_VER="3.0.2"
< # Sometimes does not get a proper version
< # If a commit does not have a verion, I think we should do what we do for the other *finder tools and use the latest commit
< # see here: https://bitbucket.org/genomicepidemiology/plasmidfinder_db/commits/4add282963c788762cdc3c6e91eb46c3d109f19b
< 
< # commit date: 2025-09-10
< ARG DB_COMMIT_HASH="49c24c1"
< # Feb 25, 2026 - using git clone in addition to the commit in order to download the database
---
> ARG PLASMIDFINDER_VER="3.0.3"
43,46c36,39
< RUN git clone https://bitbucket.org/genomicepidemiology/plasmidfinder_db.git /database &&\
<     cd /database &&\
<     git checkout ${DB_COMMIT_HASH} &&\
<     python3 INSTALL.py kma_index
---
> RUN git clone -b plasmidfinder-${PLASMIDFINDER_VER} --depth 1 https://git@bitbucket.org/genomicepidemiology/plasmidfinder_db.git &&\
>     cd plasmidfinder_db &&\
>     python INSTALL.py &&\
>     rm -rf .git
56,57c49,50
<     CGE_PLASMIDFINDER_DB=/database \
<     PLASMID_DB=/database
---
>     CGE_PLASMIDFINDER_DB=/plasmidfinder_db \
>     PLASMID_DB=/plasmidfinder_db
diff build-files/plasmidfinder/3.0.2/README.md build-files/plasmidfinder/3.0.3/README.md
8c8
< - plasmidfinder_db : 2.2.0
---
> - plasmidfinder_db : plasmidfinder-3.0.3 (2.2.0)

Pull Request (PR) checklist:

  • Include a description of what is in this pull request in this message.
  • The dockerfile successfully builds to a test target for the user creating the PR. (i.e. docker build --tag samtools:1.15test --target test docker-builds/build-files/samtools/1.15 )
  • Directory structure as name of the tool in lower case with special characters removed with a subdirectory of the version number in build-files (i.e. docker-builds/build-files/spades/3.12.0/Dockerfile)
    • (optional) All test files are located in same directory as the Dockerfile (i.e. build-files/shigatyper/2.0.1/test.sh)
  • Create a simple container-specific README.md in the same directory as the Dockerfile (i.e. docker-builds/build-files/spades/3.12.0/README.md)
    • If this README is longer than 30 lines, there is an explanation as to why more detail was needed
  • Dockerfile includes the recommended LABELS
  • Main README.md has been updated to include the tool and/or version of the dockerfile(s) in this PR
  • Program_Licenses.md contains the tool(s) used in this PR and has been updated for any missing

@Kincekara Kincekara requested a review from erinyoung March 10, 2026 18:28
@Kincekara
Copy link
Copy Markdown
Collaborator Author

@erinyoung, if you still get the error, we can try removing git as well.

@erinyoung
Copy link
Copy Markdown
Contributor

plasmidfinder uses git at runtime, so we can't remove it.

I've tried adding the directory as a safe directory, but then I get a error: could not lock config file //.gitconfig: Permission denied

@Kincekara
Copy link
Copy Markdown
Collaborator Author

@erinyoung, could you check it again with the latest changes?

@erinyoung
Copy link
Copy Markdown
Contributor

Works for me!

Also, tests work in GA actions.

#16 11.21 sbjct_header
#16 11.21 IncFIA_1__AP001918
#16 11.21 sbjct_header
#16 11.21 IncFIA_1__AP001918
#16 11.21 sbjct_header
#16 11.21 IncFII(pRSB107)_1__AJ851089
#16 11.21 sbjct_header
#16 11.21 IncFII(pRSB107)_1__AJ851089
#16 11.21 sbjct_header
#16 11.21 Col(MG828)_1__NC_008486
#16 11.21 sbjct_header
#16 11.21 Col(MG828)_1__NC_008486
#16 11.21 {
#16 11.21     "type": "software_result",
#16 11.21     "databases": {
#16 11.21         "PlasmidFinder-2.2.0": {
#16 11.21             "type": "database",
#16 11.21             "database_name": "PlasmidFinder",
#16 11.21             "database_version": "2.2.0",
#16 11.21             "key": "PlasmidFinder-2.2.0",
#16 11.21             "database_commit": "unknown"
#16 11.21         }
#16 11.21     },
#16 11.21     "seq_regions": {
#16 11.21         "IncFIA_1__AP001918": {
#16 11.21             "type": "seq_region",
#16 11.21             "phenotypes": [],
#16 11.21             "ref_database": "PlasmidFinder-2.2.0:enterobacteriales",
#16 11.21             "key": "IncFIA_1__AP001918",
#16 11.21             "gene": true,
#16 11.21             "name": "IncFIA",
#16 11.21             "identity": 100.0,
#16 11.21             "alignment_length": 388,
#16 11.21             "ref_seq_length": 388,
#16 11.21             "coverage": 100.0,
#16 11.21             "ref_acc": "NC008486",
#16 11.21             "ref_start_pos": 1,
#16 11.21             "ref_end_pos": 263,
#16 11.21             "query_id": "NA",
#16 11.21             "query_start_pos": "NA",
#16 11.21             "query_end_pos": "NA",
#16 11.21             "note": "",
#16 11.21             "query_string": "",
#16 11.21             "alignment_string": "",
#16 11.21             "ref_string": ""
#16 11.21         }
#16 11.21     },
#16 11.21     "seq_variations": {},
#16 11.21     "phenotypes": {},
#16 11.21     "software_executions": {
#16 11.21         "aad720484b2b3586ec9c0d5ad5eb9c739f129194": {
#16 11.21             "type": "software_exec",
#16 11.21             "command": "/usr/local/lib/python3.12/dist-packages/plasmidfinder/__main__.py -i ERR1937840.fastq -o test",
#16 11.21             "parameters": {
#16 11.21                 "infile": [
#16 11.21                     "ERR1937840.fastq"
#16 11.21                 ],
#16 11.21                 "outdir": "test",
#16 11.21                 "tmp_dir": null,
#16 11.21                 "method_path": null,
#16 11.21                 "db_path": "/plasmidfinder_db",
#16 11.21                 "databases": null,
#16 11.21                 "min_cov": 0.6,
#16 11.21                 "threshold": 0.9,
#16 11.21                 "extended_output": false,
#16 11.21                 "speciesinfo_json": null,
#16 11.21                 "quiet": false,
#16 11.21                 "out_json": null,
#16 11.21                 "legacy": false
#16 11.21             },
#16 11.21             "key": "aad720484b2b3586ec9c0d5ad5eb9c739f129194"
#16 11.21         }
#16 11.21     },
#16 11.21     "aln_hits": {},
#16 11.21     "software_name": "PlasmidFinder",
#16 11.21     "software_version": "3.0.3",
#16 11.21     "software_commit": "unknown",
#16 11.21     "run_date": "11.03.2026",
#16 11.21     "key": "PlasmidFinder-3.0.3"
#16 11.21 }

@erinyoung
Copy link
Copy Markdown
Contributor

Thank you for working on this!

@Kincekara Kincekara marked this pull request as ready for review March 12, 2026 12:02
@Kincekara
Copy link
Copy Markdown
Collaborator Author

Future note:
If HOME is unset or the runtime user has no writable home, Git falls back to /.gitconfig. AWS runtimes mount / as read‑only, so Git throws: could not lock config file //.gitconfig: Permission denied.

Copy link
Copy Markdown
Contributor

@erinyoung erinyoung left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I have no changes to recommend. Let's get this merged and deployed.

@erinyoung erinyoung merged commit 4fdd2b7 into StaPH-B:master Mar 12, 2026
2 checks passed
@erinyoung
Copy link
Copy Markdown
Contributor

Thank you so much for getting this together!

The deploy link can be found here : https://github.com/StaPH-B/docker-builds/actions/runs/23009692166

@Kincekara Kincekara deleted the plasmidfinder branch March 12, 2026 17:11
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

Successfully merging this pull request may close these issues.

[Bug]: plasmidfinder 3.0.2 is having git and permission issues

2 participants