Skip to content

Commit

Permalink
Merge branch 'master' into logs
Browse files Browse the repository at this point in the history
  • Loading branch information
rnmitchell committed Jul 8, 2024
2 parents 2e84c3e + 3c2b19b commit 23e1cd5
Show file tree
Hide file tree
Showing 8 changed files with 814 additions and 11 deletions.
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ style:

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

## devenv: configure a development environment
devenv:
Expand Down
15 changes: 15 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,10 @@ lusSTR is a tool written in Python to convert NGS sequence data of forensic STR
Further, lusSTR can perform filtering and stutter identification using the CE allele, the LUS+ allele, or the bracketed sequence form for autosomal loci and create files for direct input into three probabilistic genotyping software packages, EuroForMix (CE and LUS+), MPSproto (NGS), and STRmix (CE and NGS).

lusSTR also processes SNP data from the Verogen ForenSeq and Kintelligence panels and create evidence and/or reference files for use in EFM. See the below section ```SNP Data Processing``` for more information.
____

**lusSTR is available as a command line tool or as a GUI.**
____

This Python package has been written for use with either:
* ForenSeq Signature Prep panel
Expand Down Expand Up @@ -42,6 +46,17 @@ make devenv

## Usage

## *GUI*

Once lusSTR has been installed, the GUI can be started with the command:
```
lusstr gui
```
All lusSTR settings for either the STR pipeline or the SNP pipeline can be specified after selecting the desired pipeline tab.
____

## *Command line interface*

lusSTR accomodates four different input formats:
(1) UAS Sample Details Report, UAS Sample Report, and UAS Phenotype Report (for SNP processing) in .xlsx format (a single file or directory containing multiple files)
(2) STRait Razor v3 output with one sample per file (a single file or directory containing multiple files)
Expand Down
30 changes: 20 additions & 10 deletions lusSTR/cli/__init__.py
Original file line number Diff line number Diff line change
@@ -1,33 +1,40 @@
import argparse
import importlib.resources
import streamlit.web.cli as stcli
import sys
import lusSTR
from lusSTR.cli import config
from lusSTR.cli import strs
from lusSTR.cli import snps
import snakemake

from lusSTR.cli import gui

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

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


def main(args=None):
if args is 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

elif args.subcmd == "gui":
gui_path = importlib.resources.files("lusSTR") / "cli" / "gui.py"
sys.argv = ["streamlit", "run", str(gui_path)]
sys.exit(stcli.main())
else:
mainmethod = mains[args.subcmd]
result = mainmethod(args)
return result

def get_parser():
parser = argparse.ArgumentParser()
Expand All @@ -39,3 +46,6 @@ def get_parser():
for func in subparser_funcs.values():
func(subparsers)
return parser

if __name__ == "__main__":
main()
Loading

0 comments on commit 23e1cd5

Please sign in to comment.