Skip to content

Releases: GCS-ZHN/diamond4py

v0.0.6

27 Dec 07:40
Compare
Choose a tag to compare
  • 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 in blastp
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

18 Feb 11:13
Compare
Choose a tag to compare
  • 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

26 Jan 15:22
Compare
Choose a tag to compare

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

26 Jan 12:39
Compare
Choose a tag to compare
v0.0.2rc3 Pre-release
Pre-release
  • add version info

diamond4py preview

24 Jan 08:02
Compare
Choose a tag to compare
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")