Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Snakemake workflow #52

Merged
merged 39 commits into from
Apr 21, 2023
Merged
Show file tree
Hide file tree
Changes from 35 commits
Commits
Show all changes
39 commits
Select commit Hold shift + click to select a range
0dde64c
created snakefile
rnmitchell Mar 9, 2023
b7d759c
cleaned up code and fixed rule running x2
rnmitchell Mar 9, 2023
88eeb8c
fixed double run error
rnmitchell Mar 9, 2023
85cadca
updated code to accomodate EFM different outputs [skip ci]
rnmitchell Mar 10, 2023
f114939
fixed failing tests
rnmitchell Mar 10, 2023
1eff1e2
reformatted snakemake
rnmitchell Mar 28, 2023
835f352
fixed main error
rnmitchell Mar 29, 2023
c4c4986
fixing errors [skip ci]
rnmitchell Mar 29, 2023
5e34778
fixed str scripts
rnmitchell Apr 4, 2023
f638e21
fixed STR cli issue [skip ci]
rnmitchell Apr 4, 2023
656de31
added command for copy config file to working dir
rnmitchell Apr 4, 2023
fbd4841
updated manifest and setup.py [skip ci]
rnmitchell Apr 4, 2023
72ad24c
added target for cli [skip ci]
rnmitchell Apr 5, 2023
9869f4d
added option to change config file using cl arguments
rnmitchell Apr 5, 2023
52ea09c
updated clis [skip ci]
rnmitchell Apr 5, 2023
9c32166
updating code to accomodate nocombine option [skip ci]
rnmitchell Apr 14, 2023
09e6faa
updated test_repeat.py
rnmitchell Apr 17, 2023
5f87672
updated format tests [skip ci]
rnmitchell Apr 17, 2023
f468e57
updated test_marker.py [skip ci]
rnmitchell Apr 17, 2023
eeee192
fixed all tests for test_suite.py [skip ci]
rnmitchell Apr 18, 2023
913750a
fixed error in test file [skip ci]
rnmitchell Apr 18, 2023
f78b560
updated snakefile to extract sampleIDs from format or annot output file
rnmitchell Apr 18, 2023
6a59b6e
updated snakefile to assign correct output name for filter step [skip…
rnmitchell Apr 18, 2023
ea3efa1
update tests [skip ci]
rnmitchell Apr 18, 2023
ec99cd7
fixed format and removed separate from annot.py [skip ci]
rnmitchell Apr 18, 2023
82bc6ae
removed separate from config for annotate step [skip ci]
rnmitchell Apr 18, 2023
176672e
updated config file [skip ci]
rnmitchell Apr 19, 2023
effe222
remove .DS_Store file [skip ci]
rnmitchell Apr 19, 2023
d5af9bd
updated README [skip ci]
rnmitchell Apr 19, 2023
7cb34b9
add error message for snps workflow, update setup.py [skip ci]
rnmitchell Apr 20, 2023
a0bbbba
removed old argument from config.py [skip ci]
rnmitchell Apr 20, 2023
ea86844
changed all "annotate" to "convert" [skip ci]
rnmitchell Apr 20, 2023
26433e0
updated default config [skip ci]
rnmitchell Apr 20, 2023
1fec516
banishing annotate and anno in tests and test files [skip ci]
rnmitchell Apr 20, 2023
83ddecf
missed files [skip ci]
rnmitchell Apr 20, 2023
bce9efc
NotImplementedError (change to trigger a CI build)
Apr 21, 2023
d483f8e
pinned pandas version and deselected snp tests
rnmitchell Apr 21, 2023
93f9ed3
Merge branch 'snakemake' of https://github.com/bioforensics/lusSTR in…
rnmitchell Apr 21, 2023
abbfc30
added missing test files
rnmitchell Apr 21, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 6 additions & 4 deletions MANIFEST.in
Original file line number Diff line number Diff line change
@@ -1,10 +1,12 @@
include versioneer.py
include lusSTR/_version.py
include lusSTR/filters.json
include lusSTR/str_markers.json
include lusSTR/snp_data.json
include lusSTR/filters.json
include lusSTR/data/filters.json
include lusSTR/data/str_markers.json
include lusSTR/data/snp_data.json
include lusSTR/data/config.yaml
include lusSTR/tests/data/*
include lusSTR/workflows/*
include lusSTR/wrappers/*
include lusSTR/tests/data/STRait_Razor_test_output/*
include lusSTR/tests/data/UAS_bulk_input/*
include lusSTR/tests/data/snps/*
Expand Down
6 changes: 3 additions & 3 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -6,15 +6,15 @@ help: Makefile

## test: run the automated test suite and print coverage information
test:
pytest --cov=lusSTR --doctest-modules lusSTR/annot.py lusSTR/tests/test_*.py
pytest --cov=lusSTR --doctest-modules lusSTR/tests/test_*.py

## style: check code style
style:
black --line-length=99 --check *.py lusSTR/*.py lusSTR/tests/test_*.py
black --line-length=99 --check *.py lusSTR/scripts/*.py lusSTR/wrappers/*.py lusSTR/tests/test_*.py

## format: auto-reformat code with Black
format:
black --line-length=99 *.py lusSTR/*.py lusSTR/tests/test_*.py
black --line-length=99 *.py lusSTR/scripts/*.py lusSTR/wrappers/*.py lusSTR/tests/test_*.py

## devenv: configure a development environment
devenv:
Expand Down
245 changes: 86 additions & 159 deletions README.md

Large diffs are not rendered by default.

17 changes: 10 additions & 7 deletions lusSTR/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,14 +10,17 @@
# Development Center.
# -------------------------------------------------------------------------------------------------

from lusSTR import annot
from lusSTR import marker
from lusSTR import repeat
from lusSTR import format
from lusSTR import snps
from lusSTR import filter
from pkg_resources import resource_filename
from lusSTR import cli
from ._version import get_versions
from lusSTR._version import get_versions

__version__ = get_versions()["version"]
del get_versions


def snakefile(workflow="strs"):
return resource_filename("lusSTR", f"workflows/{workflow}.smk")


def wrapper(label):
return resource_filename("lusSTR", f"wrappers/{label}.py")
211 changes: 0 additions & 211 deletions lusSTR/cli.py

This file was deleted.

41 changes: 41 additions & 0 deletions lusSTR/cli/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
import argparse
import lusSTR
from lusSTR.cli import config
from lusSTR.cli import strs
from lusSTR.cli import snps
import snakemake


mains = {
"config": config.main,
"strs": strs.main,
"snps": snps.main
}

subparser_funcs = {
"config": config.subparser,
"strs": strs.subparser,
"snps": snps.subparser
}


def main(args=None):
if args is None:
args = get_parser().parse_args()
if args.subcmd is None:
get_parser().parse_args(["-h"])
mainmethod = mains[args.subcmd]
result = mainmethod(args)
return result


def get_parser():
parser = argparse.ArgumentParser()
parser.add_argument(
"-v", "--version", action="version", version="lusSTR v" + lusSTR.__version__
)
subcommandstr = ", ".join(sorted(subparser_funcs.keys()))
subparsers = parser.add_subparsers(dest="subcmd", metavar="subcmd", help=subcommandstr)
for func in subparser_funcs.values():
func(subparsers)
return parser
Loading