Skip to content

v0.0.3

Compare
Choose a tag to compare
@github-actions github-actions released this 26 Jan 15:22
· 18 commits to main since this release

A python binding for Diamond open-sourced by @bbuchfink

Current version is a previews version and only support limited diamond operations.

  • blastp
  • makedb
from diamond4py import Diamond

# create a object
diamond = Diamond(
    database="database.dmnd",
    n_threads=4
)

# make db if you don't create it or just download one from websites
diamond.makedb("database.fasta")
print(diamond.version)

# print database statistic info
diamond.dbinfo()

# run blast for proteins
diamond.blastp(
    query="test_proteins.fasta",
    out="test_output"
)

For more operations, you can import Cpp ext module libdiamond and use it like diamond command prompt.

from diamond4py.libdiamond import main
main("blastx", "--query", "test.fastq", "--out", "output.txt")