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

GUI #74

Merged
merged 18 commits into from
Jul 8, 2024
Merged

GUI #74

Show file tree
Hide file tree
Changes from 15 commits
Commits
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
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
Loading