-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Decoupling rule modules into individual components (#33)
* fixed minor pathing bugs * separated cp_process module * update logs documentation * added documentation * edit typos * update cp_process workflow * update pycytominer version * file typo fixed
- Loading branch information
Showing
12 changed files
with
221 additions
and
105 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,51 @@ | ||
""" | ||
rule module: aggregate.smk | ||
Utilize's pycytominer's aggregate module: | ||
https://github.com/cytomining/pycytominer/blob/c90438fd7c11ad8b1689c21db16dab1a5280de6c/pycytominer/aggregate.py | ||
Aggregates single-cell profiles into aggregated profiles based on a given strata | ||
For example, users can configure `Metadata_Well` as their strata in order to | ||
aggregate single-cell data into the Well level. | ||
Parameters: | ||
----------- | ||
input: | ||
sql_file: single-cell dataset | ||
barcodes: file containing unique barcodes that maps to a specific plate | ||
metadata: directory containing metadata associated with the aggregate | ||
profile | ||
output: | ||
aggregated_profile: aggregated profiles | ||
cell_counts: CSV file that contains how many cells were counted per well | ||
Returns | ||
------- | ||
aggregated profiles and cell count data stored in the `results/` directory | ||
# -------------------- | ||
""" | ||
|
||
|
||
configfile: "configs/configuration.yaml" | ||
|
||
|
||
rule aggregate: | ||
input: | ||
sql_files=PLATE_DATA, | ||
barcodes=BARCODES, | ||
metadata=METADATA_DIR, | ||
output: | ||
aggregate_profile=AGGREGATE_DATA, | ||
cell_counts=CELL_COUNTS, | ||
log: | ||
"logs/aggregate_{file_name}.log", | ||
conda: | ||
"../envs/cytominer_env.yaml" | ||
params: | ||
aggregate_config=config["config_paths"]["single_cell"], | ||
script: | ||
"../scripts/aggregate_cells.py" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
""" | ||
rule module: annotate.smk | ||
Utilizes pycytominer's annotate module: | ||
https://github.com/cytomining/pycytominer/blob/master/pycytominer/annotate.py | ||
Annotates profiles with given metadata. | ||
Parameters | ||
---------- | ||
input: | ||
aggregate_profile: aggregated profile dataset | ||
barcodes: file containing unique barcodes that maps to a specific plate | ||
metadata: directory containing metadata associated with the aggregate | ||
profile | ||
output: | ||
generates an annotated profile. | ||
Returns: | ||
-------- | ||
Generates an annotated profile stored in the `results/` directory | ||
""" | ||
|
||
|
||
configfile: "configs/configuration.yaml" | ||
|
||
|
||
rule annotate: | ||
input: | ||
aggregate_profile=AGGREGATE_DATA, | ||
barcodes=BARCODES, | ||
metadata=METADATA_DIR, | ||
output: | ||
ANNOTATED_DATA, | ||
conda: | ||
"../envs/cytominer_env.yaml" | ||
log: | ||
"logs/annotate_{file_name}.log", | ||
params: | ||
annotate_config=config["config_paths"]["annotate"], | ||
script: | ||
"../scripts/annotate.py" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
""" | ||
rule module: generate_consensus.smk | ||
Utilize's pycytominer's consensus module: | ||
https://github.com/cytomining/pycytominer/blob/master/pycytominer/consensus.py | ||
Creates consensus profiles that reflects unique signatures associated with | ||
external factors. | ||
Parameters: | ||
---------- | ||
input: | ||
Selected features profile | ||
output: | ||
Consensus profile | ||
Return: | ||
------- | ||
Consensus profile stored in the `results/` directory | ||
""" | ||
|
||
|
||
configfile: "configs/configuration.yaml" | ||
|
||
|
||
rule create_consensus: | ||
input: | ||
SELECTED_FEATURE_DATA_EXPAND, | ||
output: | ||
CONSENSUS_DATA, | ||
params: | ||
consensus_configs=config["config_paths"]["consensus_config"], | ||
log: | ||
"logs/create_consensus.log", | ||
conda: | ||
"../envs/cytominer_env.yaml" | ||
script: | ||
"../scripts/consensus.py" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
""" | ||
rule module: normalize.smk | ||
Utlizes pycytominer's normalization module: | ||
https://github.com/cytomining/pycytominer/blob/c90438fd7c11ad8b1689c21db16dab1a5280de6c/pycytominer/normalize.py | ||
Normalizing single-cell or aggregate features. Current default normalization | ||
method is `standardize` other methods include: | ||
parameters | ||
---------- | ||
input | ||
single-cell or aggregated profiles | ||
output | ||
normalized single-cell or aggregate dataset. | ||
Output | ||
------ | ||
Generates an annotated profile stored in the `results/` directory | ||
""" | ||
|
||
|
||
configfile: "configs/configuration.yaml" | ||
|
||
|
||
rule normalize: | ||
input: | ||
ANNOTATED_DATA, | ||
output: | ||
NORMALIZED_DATA, | ||
conda: | ||
"../envs/cytominer_env.yaml" | ||
log: | ||
"logs/normalized_{file_name}.log", | ||
params: | ||
normalize_config=config["config_paths"]["normalize"], | ||
script: | ||
"../scripts/normalize.py" |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters