Skip to content

Commit 3802e09

Browse files
committed
Merge remote-tracking branch 'origin/master'
2 parents 557cdb8 + 64bce74 commit 3802e09

File tree

4 files changed

+49
-0
lines changed

4 files changed

+49
-0
lines changed

python/Readme.md

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
# libdna - Python API
2+
3+
The aim of this project is to unify functionality commonly found in bioinformatics projects working on DNA. DNA, as opposed to RNA or amino acid sequences, are very long strings. Even bacterial genomes are easily a few megabyte in size. Thus, for efficient analysis the length has to be taken into account in the design of routines.
4+
5+
This is the Python API with similar functionality as the C funtions. Support is experimental and may change in the future.
6+
7+
8+
9+
# License
10+
11+
Copyright © 2018 - 2024 Fabian Klötzl <fabian-libdna@kloetzl.info>
12+
MIT License

python/examples/libdna

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
../libdna

python/examples/random.py

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
from libdna import dna4
2+
import argparse
3+
4+
5+
def main():
6+
parser = argparse.ArgumentParser(
7+
prog='random',
8+
description='Create a random string of DNA')
9+
parser.add_argument('-s', type=int, help='seed', default=1729)
10+
parser.add_argument('-l', type=int, help='length', default=80)
11+
12+
args = parser.parse_args()
13+
seed = args.s
14+
length = args.l
15+
16+
print(f">rnd {seed=}")
17+
print(dna4.random(length, seed))
18+
19+
20+
if __name__ == '__main__':
21+
main()

python/pyproject.toml

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
[tool.poetry]
2+
name = "libdna"
3+
version = "1.3"
4+
description = "Essential Functions for DNA Manipulation"
5+
authors = ["Fabian Klötzl <fabian-libdna@kloetzl.info>"]
6+
license = "MIT"
7+
readme = "Readme.md"
8+
9+
[tool.poetry.dependencies]
10+
python = "^3.11"
11+
12+
13+
[build-system]
14+
requires = ["poetry-core"]
15+
build-backend = "poetry.core.masonry.api"

0 commit comments

Comments
 (0)