Commit cd5ddfff authored by MARIJON Pierre's avatar MARIJON Pierre

Add install file

parent 90d9c28b
include *.md
include knot/*.rules
include knot/config.yaml
recursive-include knot/extremity_search *
recursive-include knot/filter_tig *
recursive-include knot/path_search *
......@@ -51,6 +51,7 @@ source deactivate knot_env
Requirements:
- python3
- snakemake >= 5.3
- [yacrd](https://github.com/natir/yacrd) avaible in bioconda or cargo
- [fpa](https://github.com/natir/fpa) avaible in bioconda or cargo
......
name: knot_env
channels:
- conda-forge
- bioconda
- pdrops
dependencies:
- python=3
- yacrd
- fpa
- snakemake
- pip:
- "git+https://gitlab.inria.fr/pmarijon/knot.git"
......@@ -41,7 +41,6 @@ def main(args = None):
help="output prefix")
parser.add_argument("--read-type", choices=["pb", "ont"], default="pb",
help="type of input read, default pb")
parser.add_argument("--clean", action="store_true")
args, unknow_arg = parser.parse_known_args(args)
args = vars(args)
......@@ -83,19 +82,6 @@ def main(args = None):
"--snakefile", snakemake_rule
]
if args["clean"]:
call.append("-S")
out = subprocess.run(call, stdout=subprocess.PIPE)
fakefile = io.StringIO(str(out.stdout.decode("utf-8")))
fakefile.seek(0)
reader = csv.reader(fakefile, delimiter="\t")
next(reader)
for row in reader:
rm_out = subprocess.run(["rm", "-rf", row[0]])
return
call += unknow_arg
print(" ".join(call))
......
......@@ -5,12 +5,12 @@ import argparse
from knot.extremity_search import *
def main(args):
def main(args=None):
if args is None:
args = sys.argv[1:]
parser = argparse.ArgumentParser(prog="extremity_search")
parser = argparse.ArgumentParser(prog="knot.extremity_search")
parser.add_argument("read2tig", type=argparse.FileType('r'),
help="read mapped against asm")
......
......@@ -21,13 +21,13 @@ stream_handler = logging.StreamHandler()
stream_handler.setFormatter(formatter)
logger.addHandler(stream_handler)
def main(args = None):
def main(args=None):
# argument parsing
if args is None:
args = sys.argv[1:]
parser = argparse.ArgumentParser(prog="paf2gfa",
parser = argparse.ArgumentParser(prog="knot.path_search",
formatter_class=argparse.
ArgumentDefaultsHelpFormatter)
......
#!/usr/bin/env python
# -*- coding: utf-8 -*-
from setuptools import setup, find_packages
from knot import __version__, __name__
try:
from pip._internal.req import parse_requirements
except ImportError:
from pip.req import parse_requirements
from itertools import tee
pip_reqs = parse_requirements("requirements.txt", session=False)
pipy_reqs = [str(ir.req) for ir in pip_reqs if ir.link is None]
git_reqs = parse_requirements("requirements.txt", session=False)
links_reqs = [str(ir.link) for ir in git_reqs if ir.link is not None]
setup(
name = __name__,
version = __version__,
packages = find_packages(),
author = "Pierre Marijon",
author_email = "pierre.marijon@inria.fr",
description = "run Snakemake pipeline for analysis assembly output",
long_description = open('Readme.md').read(),
url = "https://gitlab.inria.fr/pmarijon/knot",
install_requires = pipy_reqs,
include_package_data = True,
classifiers = [
"Programming Language :: Python :: 3",
"Development Status :: 2 - Pre-Alpha"
],
entry_points = {
'console_scripts': [
'knot = knot.__main__:main',
'knot.path_search = knot.path_search.__main__:main',
'knot.extremity_search = knot.extremity_search.__main__:main'
]
}
)
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment