diff --git a/README.md b/README.md index d29a0a8253ba52cf971b3b747deb9d63f3c74a40..2d8c3ba9f2149b4cd0b9e01f67a9b0060e3ebf3d 100644 --- a/README.md +++ b/README.md @@ -27,15 +27,11 @@ To install package, run pip install . ``` -Afterwards, it can be imported using +To generate the sampled transcripts, open a new shell, activate your environment and run -```python -import tsg ``` +conda activate transcript-structure-generator -To generate the sampled transcripts, run - -``` transcript-generator --transcripts <transcripts_file> --annotation <annotations_file> --prob_inclusion=<probability_inclusion> ``` diff --git a/pyproject.toml b/pyproject.toml new file mode 100644 index 0000000000000000000000000000000000000000..ed805ec4ea5becc2831a237eade717e3f4a7581d --- /dev/null +++ b/pyproject.toml @@ -0,0 +1,21 @@ +[project] +name = "tsg" +version = "0.1.0" +authors = [ + { name="Michael Zimmermann", email="michael.zimmermann@unibas.ch" }, + { name="Andri Fraenkl", email="andri.fraenkl@unibas.ch" }, + { name="Larissa Glass", email="larissa.glass@unibas.ch" }, +] +description = "Transcript Structure Generator" +readme = "README.md" +requires-python = ">=3.7" +license = {text = "MIT"} +dependencies = [ + "pandas", +] + +[project.urls] +"Homepage" = "https://git.scicore.unibas.ch/zavolan_group/tools/transcript-structure-generator" + +[project.scripts] +transcript-generator = "tsg.cli:app" \ No newline at end of file diff --git a/setup.py b/setup.py deleted file mode 100644 index 3352b1f711749b9a9816c794b818be70ca5677b9..0000000000000000000000000000000000000000 --- a/setup.py +++ /dev/null @@ -1,18 +0,0 @@ -"""Setup the package.""" - -from setuptools import setup - -setup( - name='tsg', - author='Zimmermann, M; Fraenkl, A;Glass, L', - url='https://git.scicore.unibas.ch/zavolan_group/tools/transcript-structure-generator', - license='MIT', - version='0.0.1', - packages=['tsg'], - install_requires=['pandas'], - entry_points={ - 'console_scripts': [ - 'transcript-generator = tsg:cli', - ] - } -) diff --git a/tsg/__init__.py b/tsg/__init__.py index b9b9505644f3871476ec18738d8b1ee7b37f32fe..229aaf550c8788ccbe44fbdbf7f085303664d7ab 100644 --- a/tsg/__init__.py +++ b/tsg/__init__.py @@ -1,5 +1,4 @@ """Transcript structure generator package.""" -from tsg.cli import cli __version__ = '0.0.0' diff --git a/tsg/__main__.py b/tsg/__main__.py new file mode 100644 index 0000000000000000000000000000000000000000..cd76d30035f16b5178784275c315eecc622dff67 --- /dev/null +++ b/tsg/__main__.py @@ -0,0 +1,4 @@ +from tsg.cli import app + +if __name__ == "__main__": + app() \ No newline at end of file diff --git a/tsg/cli.py b/tsg/cli.py index 72da7ba229bea7448d5ec66beba9ee26d8a20763..29de2978714539315dc82f7718c3f1d74f298d58 100644 --- a/tsg/cli.py +++ b/tsg/cli.py @@ -2,7 +2,7 @@ import argparse import logging from pathlib import Path -from .main import sample_transcripts +from tsg.main import sample_transcripts def setup_logging(loglevel: str=None) -> None: @@ -40,7 +40,7 @@ def output_filename(filename: str) -> str: return "generated_" + filepath.name -def cli(): +def app(): args = get_args() setup_logging(args.log) @@ -51,7 +51,3 @@ def cli(): output_filename(args.transcripts), output_filename(args.annotation), ) - - -if __name__ == "__main__": - cli()