Releases: GCS-ZHN/diamond4py
Releases · GCS-ZHN/diamond4py
v0.0.6
- support to custom tabular output column
OutFormat.BLAST_TABULAR.with_extra_option(
"qseqid", "qstart",
"qend", "qlen", "sseqid"
) # it will change it globally
# call this will reset to default
OutFormat.BLAST_TABULAR.reset()
- support use
kwargs
to use unimplemented diamond options inblastp
diamond.blastp(
query="test_proteins.fasta",
out="test_blastp_output",
outfmt=OutFormat.BLAST_TABULAR,
sensitivity=Sensitivity.DEFAULT,
top=5 # `--top` option is not directly defined
block_size=2.0 # `--block-size` is not directly defined
)
- add new subcommand
blastx
diamond.blastx(
query="test_dna.fasta",
out="test_blastx_output",
outfmt=OutFormat.BLAST_TABULAR.reset().value,
max_target_seqs=10
)
- add subcommand dynamic wrapper for any other unimplemented subcomand,
# a dynamic wrapper the same as `diamond test` in cli
diamond.test()
diamond.help()
v0.0.5
- support sensitivity mode
- support ouput format
from diamond4py import Diamond, Sensitivity, OutFormat
# 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",
sensitivity = Sensitivity.DEFAULT,
outfmt=OutFormat.BLAST_TABULAR
)
v0.0.3
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")
v0.0.2rc3
- add version info
diamond4py preview
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")