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

Renaming CytoPipe to CytoSnake #19

Merged
merged 2 commits into from
Sep 2, 2022
Merged
Show file tree
Hide file tree
Changes from all 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
6 changes: 3 additions & 3 deletions cytopipe/cli/args.py → cytosnake/cli/args.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
args.py Module

Responsible for centralizing and handling all user inputted
parameters for cytopipe.
parameters for cytosnake.

Contains different modes with their respected parameters
"""
Expand Down Expand Up @@ -51,7 +51,7 @@ class CliControlPanel
data_type: tuple[str] = ("cell_profiler", "deep_profiler")
modes: tuple[str] = ("init", "run", "test", "help")
workflows: tuple[str] = ("cp_process", "dp_process", "help")
__exec_name: str = "cytopipe"
__exec_name: str = "cytosnake"

# ----------------------------------------
# Metaclass class methods
Expand Down Expand Up @@ -111,7 +111,7 @@ def parse_init_args(self) -> argparse.Namespace:
parser.add_argument(
"mode",
choices=["init"],
help="Init mode sets up the all files for cytopipe processing",
help="Init mode sets up the all files for cytosnake processing",
)
parser.add_argument(
"-d", "--data", nargs="+", required=True, help="list of plate data files"
Expand Down
12 changes: 6 additions & 6 deletions cytopipe/cli/cli_checker.py → cytosnake/cli/cli_checker.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
cli_checker.py Module

Argument checking module that checks and validates user input
arguments from cytopipe's cli interface,
arguments from CytoSnake's cli interface,
"""
import sys
from typing import Union
Expand All @@ -19,14 +19,14 @@
@dataclass
class CliProperties:
"""Struct object that contains information of all arguments in
cytopipe's cli interface
CytoSnake's cli interface

Attributes
-----------
modes : tuple[str]
Supported modes in CytoPipe's CLI
Supported modes in CytoSnake's CLI
workflows : tuple[str]
Available cytopipe workflows
Available CytoSnake workflows
"""

modes: tuple[str] = ("init", "run", "test", "help")
Expand All @@ -39,7 +39,7 @@ def cli_check(args_list: list[Union[str, int, bool]]) -> bool:
Parameters
----------
mode : str
cytopipe mode
CytoSnake mode
args_list : list[Union[str, int, bool]]
list of user inputted arguments

Expand All @@ -54,7 +54,7 @@ def cli_check(args_list: list[Union[str, int, bool]]) -> bool:
NoArgumentsException
Raised if the user provides no arguments
InvalidModeException
Raised if user inputs an invalid cytopipe mode
Raised if user inputs an invalid CytoSnake mode
InvalidWorkflowException
Raised if user inputs an invalid workflow name
MultipleModesException
Expand Down
32 changes: 16 additions & 16 deletions cytopipe/cli/cli_docs.py → cytosnake/cli/cli_docs.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,11 @@
Command line::
Run Documentation

Cytopipe's run mode allows users to execute Cytopipes available workflows
CytoSnake's run mode allows users to execute CytoSnake's available workflows

Usage:
cytopipe run workflow [-c]
cytopipe run help
cytosnake run workflow [-c]
cytosnake run help

Required Arguments:
workflow Name of the workflow to execute
Expand All @@ -26,22 +26,22 @@

cp_process Workflow for analyzing cell morphology reads
obtained from CellProfiler
dp_process Workflow for analyzing cell morphology reads
dp_process Workflow for analyzing cell morphology reads
obtained from DeepProfiler


Help Arguments:
help Displays cytopipe's Run mode documentation
help Displays CytoSnake's Run mode documentation
"""

init_doc = """
Command line::
Init mode Documentation

Cytopipe's init mode allows user to setup up the require files for processing.
CytoSnake's init mode allows user to setup up the require files for processing.

Usage:
cytopipe init [-d] [-m] [-b] [-p]
cytosnake init [-d] [-m] [-b] [-p]

Required Arguments:
-d, --data List of plate data files
Expand All @@ -51,31 +51,31 @@
-b, --barcode Path to file containing barcode labeling. This is used
for cell morphology reads obtained by CellProfiler.
[Default=None]
--datatype Datatype flag helps cytopipe in how to setup the input
--datatype Datatype flag helps CytoSnake in how to setup the input
files for processing.
[Choices = "cell_profiler", "deep_profiler"]
[Default="cell_profiler"]

Help Arguments:
help Displays cytopipe's init mode documentation
help Displays CytoSnake's init mode documentation
"""

cli_docs = f"""
Cytopipe Documentation
CytoSnake Documentation

Cytpipe's command line interface
CytoSnake's command line interface

Usage:
cytopipe [mode] [ mode options]
cytopipe help
cytosnake [mode] [ mode options]
cyotsnake help

Required Arguments:
mode Cytopipe cli instruction on what to execute. There are
mode CytoSnake cli instruction on what to execute. There are
3 modes [init, run, help]. Init setups ups the required
files for processing. Run executes cytopipe's workflows.
files for processing. Run executes CytoSnake's workflows.
Help displays the help message documentation.
Help Argument:
help Displays cytopipe's CLI help and mode documentation
help Displays CytoSnake's CLI help and mode documentation

Mode Documentations:
{init_doc.replace("Command line::", "")}
Expand Down
8 changes: 3 additions & 5 deletions cytopipe/cli/cmd.py → cytosnake/cli/cmd.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

cmd.py Module

Generates CLI interface in order to interact with cytopipe.
Generates CLI interface in order to interact with CytoSnake.
"""
import sys

Expand All @@ -20,8 +20,7 @@ def run_cmd() -> None:
Parameters
----------
params : list
list of user provided parameters

list of user provided parametersCytoSnake
Returns
-------
None
Expand All @@ -45,7 +44,7 @@ def run_cmd() -> None:
print(init_doc)
sys.exit(0)

# setting up input files for cytopipe
# setting up input files for cytosnake
print("INFO: Formatting input files")
init_args = args_handler.parse_init_args()

Expand Down Expand Up @@ -75,7 +74,6 @@ def run_cmd() -> None:
# parsing workflow parameters
print(f"INFO: Executing {args_handler.workflow} workflow")
wf_params = args_handler.parse_workflow_args()

wf_executor = workflow_executor(
workflow=wf_params.workflow,
n_cores=wf_params.max_cores,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
from typing import Optional
import snakemake

from cytopipe.utils.config_utils import load_workflow_path
from cytosnake.utils.config_utils import load_workflow_path


def __base_exec(
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
23 changes: 11 additions & 12 deletions rules/merge_logs.smk
Original file line number Diff line number Diff line change
@@ -1,20 +1,19 @@
# ----------------------------------------------------------------
# Documentation:
# Rule collects all generated logs from all porcessess and merges
# them into a single log file.
#
# individual log files are stored into an archive file along with
# the generated merged log.
#
# The archive file is taged with (Month-day-year)-(hour-min-sec)
# Example: 072922-083033_archived_logs
# ----------------------------------------------------------------
"""
Documentation:
Rule collects all generated logs from all porcessess and merges
them into a single log file.

individual log files are stored into an archive file along with
the generated merged log.

The archive file is taged with (Month-day-year)-(hour-min-sec)
Example: 072922-083033_archived_logs
"""

rule merge_logs:
input:
expand("logs/{logname}.log", logname=LOG_NAMES),
output:
"logs/CytoPipe_preprocess.log",
"logs/CytoSnake_preprocess.log",
script:
"../scripts/merge_logs.py"
45 changes: 23 additions & 22 deletions rules/preprocessing.smk
Original file line number Diff line number Diff line change
@@ -1,26 +1,27 @@
# Documentation:
# Workflow that involves preprocessing raw single-cell plate data and
# transforming it into normalized aggregate profiles.
#
# Parameters
# ----------
# sql_files : List[str]
# List of SQL files containing plate data
# barcodes : str
# path pointing to the barcode file storing platemap IDs
# metadata : str
# path pointing to plate metadata
#
# Generates
# ---------
# cell_counts: .csv file
# csv file containing n_cells per well
# augmented: csv.gz file
# Annotated aggregated profiles
# normalized: csv.gz file
# Normalized annotated aggregate profiles
# --------------------
"""
Documentation:
Workflow that involves preprocessing raw single-cell plate data and
transforming it into normalized aggregate profiles.

Parameters
----------
sql_files : List[str]
List of SQL files containing plate data
barcodes : str
path pointing to the barcode file storing platemap IDs
metadata : str
path pointing to plate metadata

Generates
---------
cell_counts: .csv file
csv file containing n_cells per well
augmented: csv.gz file
Annotated aggregated profiles
normalized: csv.gz file
Normalized annotated aggregate profiles
# --------------------
"""

# collecting all unique IDs from plate
configfile: "configs/configuration.yaml"
Expand Down
4 changes: 2 additions & 2 deletions setup.py
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
from setuptools import setup, find_packages

setup(
name="cytopipe",
name="CytoSnake",
version="0.0.1",
url="https://github.com/WayScience/CytoPipe",
author="Way Lab",
packages=find_packages(),
python_requires=">=3.10",
entry_points={
"console_scripts": [
"cytopipe=cytopipe.cli.cmd:run_cmd",
"cytosnake=cytosnake.cli.cmd:run_cmd",
]
},
)