diamond4py preview
Pre-release
Pre-release
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")