Skip to content

Commit

Permalink
cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
AngryMaciek committed Mar 20, 2024
1 parent 3616a87 commit 5ea4a89
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 14 deletions.
15 changes: 6 additions & 9 deletions modules/CREATE_SITECOUNT_MATRICES/Snakefile
Original file line number Diff line number Diff line change
Expand Up @@ -97,19 +97,16 @@ def CSM_get_abspath(p):
"""
return(p if p[0] == os.sep else os.path.abspath(p))





def CSM_helper(wildcards):
def CSM_region_helper(wildcards):
"""
Helper function to determine wheter a region is supposed to be
analyzed in full or over windows
"""
if wildcards.CSM_region_id in config["CSM_regions_files"]:
return config["CSM_regions_files"][wildcards.CSM_region_id]
else:
return config["CSM_additional_regions_files"][wildcards.CSM_region_id]




##############################################################################
### Target rule with final output of the pipeline
##############################################################################
Expand Down Expand Up @@ -201,7 +198,7 @@ rule CSM_extract_window_coord_and_sequence:
"{CSM_outdir}",
"CSM_outdir"
),
BED_region = lambda wildcards: CSM_helper(wildcards),
BED_region = lambda wildcards: CSM_region_helper(wildcards),
FASTA_genome = config["CSM_genomic_sequence"],
SCRIPT_ = os.path.join(
config["CSM_scripts_dir"],
Expand Down
6 changes: 2 additions & 4 deletions modules/CREATE_SITECOUNT_MATRICES/configs/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,9 +37,7 @@ CSM_regions_files:

# paths to the bed-formatted additional whole regions
CSM_additional_regions_files:
"3pUTR_minlen150_prefix": "/data/scc2/ag-gruber-ext/wsciekly.maciek/mapp-stability-analysis/singular-sites-margin25-minutrlen150/clean-sites-prefix-UTR.bed"
"3pUTR_minlen150_total": "/data/scc2/ag-gruber-ext/wsciekly.maciek/mapp-stability-analysis/singular-sites-margin25-minutrlen150/clean-sites-total-UTR.bed"
"3pUTR_minlen150_suffix": "/data/scc2/ag-gruber-ext/wsciekly.maciek/mapp-stability-analysis/singular-sites-margin25-minutrlen150/clean-sites-suffix-UTR.bed"
"3pUTR_minlen150_total": "/data/scc2/ag-gruber-ext/MAPP_paper/supplementary_package/mapp-stability-analysis-BACKUP/singular-sites-margin25-minutrlen150/clean-sites-total-UTR.bed"

# sliding window configuration: window size and slide step
CSM_window_size: "50"
Expand All @@ -51,7 +49,7 @@ CSM_matrix_type: "kmers"
# options for "kmers" sitecount matrices:
# inclusive ends specification for the range of k-mers sizes = [kmer_min,kmer_max]
CSM_kmer_min: "3"
CSM_kmer_max: "3"
CSM_kmer_max: "5"

# options for "pwms" sitecount matrices:
# path to the directory with TRANSFAC-formatted PWM files
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
snakefile: "../Snakefile"
cores: 64
cores: 1
printshellcmds: true
rerun-incomplete: true
use-conda: true
Expand Down

0 comments on commit 5ea4a89

Please sign in to comment.