Skip to content

Commit 5973c23

Browse files
committed
add info about params to scripts, potential fix for forgebsgenome input
1 parent ebade9a commit 5973c23

6 files changed

Lines changed: 55 additions & 1 deletion

File tree

modules/local/cagefightr/enhancercalling/templates/cagefightr_enhancer_calling.R

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,12 +20,23 @@ source("${projectDir}/bin/qc_plots.R")
2020
source("${projectDir}/bin/plot_saving.R")
2121

2222
# Variables injected by Nextflow
23+
# Path to the CAGEexp object with normalized tags and consensus clusters
24+
# (character)
2325
ce_path <- "${cager_obj}"
26+
# SQLite file with a TxDb genome annotation package (character)
2427
tx_annotation <- "${txdb}"
28+
# Threshold for the cagefightr balance score (double)
2529
cfBalanceThreshold <- ${params.cfBalanceThreshold}
30+
# Threshold above which normalized CTSS are considered expressed (double)
2631
unexpressed <- ${params.unexpressed}
32+
# Non inlcusive lower threshold for number of samples supporting enhancers
33+
# (i.e. where there is bidirectionality) (integer)
2734
minSamples <- as.integer(${params.minSamples})
35+
# Upstream distance to consider into TSS region for ChIPseeker annotation.
36+
# Should be negative (integer)
2837
tssregion_up <- as.integer(${params.tssregion_up})
38+
# Downstream distance to consider into TSS region for ChIPseeker annotation.
39+
# Should be positive (integer)
2940
tssregion_down <- as.integer(${params.tssregion_down})
3041

3142
# Create output folders

modules/local/cager/processing/templates/cager_processing.R

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,25 +19,45 @@ suppressPackageStartupMessages({
1919
})
2020

2121
# Variables injected by Nextflow
22+
# Path to the CAGEexp object with tags (character)
2223
ce_path <- "${cager_obj}"
24+
# Name of the BSgenome version to be used (takes precedent over file if exists, character)
2325
bsgenome_name <- "${bsgenome_name}"
26+
# File of the BSgenome version to be used (character)
2427
bsgenome_file <- "${bsgenome_file}"
28+
# SQLite file with a TxDb genome annotation package (character)
2529
tx_annotation <- "${txdb}"
30+
# CAGE tag range minimum for normalization calculation (integer)
2631
range_min <- as.integer(${params.norm_range_min})
32+
# CAGE tag range maximum for normalization calculation (integer)
2733
range_max <- as.integer(${params.norm_range_max})
34+
# Method for normalization (character: powerLaw, simpleTpm, or none)
2835
method <- "${params.norm_method}"
36+
# Total number of tags. Setting it to 1 million results
37+
# in normalized tags per million (tpm) values (integer)
2938
t_norm <- as.integer(${params.t_norm})
39+
# Alpha values from the reverse cumulative distribution fitting (Optional, double)
3040
alpha_str <- "${params.alpha}"
3141
alpha <- if (alpha_str == "null") NULL else as.double(alpha_str)
42+
# Number of samples in which the CTSS Tpm threshold (ctss_thr) should be passed (integer)
3243
sample_num_thr <- as.integer(${params.sample_num_thr})
44+
# CTSS Tpm threshold which should be passed in sample_num_thr number of samples (integer)
3345
ctss_thr <- as.integer(${params.ctss_thr})
46+
# Maximum distance parameter for distclu CAGEr function (integer)
3447
distclu_maxDist <- as.integer(${params.distclu_maxDist})
48+
# Threshold above which to keep the singletons during tag clustering (integer)
3549
keepSingletonsAbove <- as.integer(${params.keepSingletonsAbove})
50+
# Lower boundary of interquartile range (double)
3651
iqlow <- as.double(${params.iq_low})
52+
# Higher boundary of interquartile range (double)
3753
iqhigh <- as.double(${params.iq_high})
54+
# Tpm threshold for plotting tagcluster IQwidth (integer)
3855
iqw_tpm_threshold <- as.integer(${params.iqw_tpm_threshold})
56+
# CTSS Tpm threshold for consensus clustering (integer)
3957
consensus_thr <- as.integer(${params.consensus_thr})
58+
# Distance threshold for consensus clustering (integer)
4059
consensus_dist <- as.integer(${params.consensus_dist})
60+
# Number of cores to use, (0 = no parallelization, integer)
4161
num_core <- as.integer(${task.cpus})
4262

4363
bsgenome <- if (nchar(trimws(bsgenome_name)) > 0) bsgenome_name else bsgenome_file

modules/local/cager/readin/templates/cager_readin.R

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,10 +15,16 @@ suppressPackageStartupMessages({
1515
})
1616

1717
# Variables injected by Nextflow
18+
# Whether BAM or BigWig is provided (character: bam or bigwig)
1819
data_type <- "${data_type}"
20+
# Csv with information from the input channel with columns
21+
# [id, pairedness, bigwig or bam path, new name]
1922
sample_table_list <- "${sample_table}"
23+
# Name of the BSgenome version to be used (takes precedent over file if exists, character)
2024
bsgenome_name <- "${bsgenome_name}"
25+
# File of the BSgenome version to be used (character)
2126
bsgenome_file <- "${bsgenome_file}"
27+
# Number of cores to use, (0 = no parallelization, integer)
2228
num_core <- as.integer(${task.cpus})
2329

2430
bsgenome <- if (nchar(trimws(bsgenome_name)) > 0) bsgenome_name else bsgenome_file

modules/local/cager/tag_qc/templates/cager_tag_qc.R

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,10 +13,15 @@ suppressPackageStartupMessages({
1313
})
1414

1515
# Variables injected by Nextflow
16+
# Path to the CAGEexp object with tags (character)
1617
ce_path <- "${cager_obj}"
18+
# SQLite file with a TxDb genome annotation package (character)
1719
tx_annotation <- "${txdb}"
20+
# Name of the BSgenome version to be used (takes precedent over file if exists, character)
1821
bsgenome_name <- "${bsgenome_name}"
22+
# File of the BSgenome version to be used (character)
1923
bsgenome_file <- "${bsgenome_file}"
24+
# Threshold for considering tags when calculating correlations (integer)
2025
corrplot_tagCountThreshold <- as.integer(${params.corrplot_tagCountThreshold})
2126

2227
bsgenome <- if (nchar(trimws(bsgenome_name)) > 0) bsgenome_name else bsgenome_file

modules/local/cager/tagcluster_qc/templates/cager_tagcluster_qc.R

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,15 +18,27 @@ suppressPackageStartupMessages({
1818
})
1919

2020
# Variables injected by Nextflow
21+
# Path to the CAGEexp object with tag clusters (character)
2122
ce_path <- "${cager_obj}"
23+
# SQLite file with a TxDb genome annotation package (character)
2224
tx_annotation <- "${txdb}"
25+
# Name of the BSgenome version to be used (takes precedent over file if exists, character)
2326
bsgenome_name <- "${bsgenome_name}"
27+
# File of the BSgenome version to be used (character)
2428
bsgenome_file <- "${bsgenome_file}"
29+
# Lower boundary of interquartile range (double)
2530
iqlow <- as.double(${params.iq_low})
31+
# Higher boundary of interquartile range (double)
2632
iqhigh <- as.double(${params.iq_high})
33+
# Upstream distance to consider into TSS region for ChIPseeker annotation.
34+
# Should be negative (integer)
2735
tssregion_up <- as.integer(${params.tssregion_up})
36+
# Downstream distance to consider into TSS region for ChIPseeker annotation.
37+
# Should be positive (integer)
2838
tssregion_down <- as.integer(${params.tssregion_down})
39+
# Upstream nucleotides to consider fot the TSS logo plot (integer)
2940
tsslogo_upstream <- as.integer(${params.tsslogo_upstream})
41+
# Threshold for considering tags when calculating correlations of normalized CTSS (integer)
3042
corrplot_tagCountThreshold <- as.integer(${params.corrplot_tagCountThreshold})
3143

3244
bsgenome <- if (nchar(trimws(bsgenome_name)) > 0) bsgenome_name else bsgenome_file

modules/local/forgebsgenome/templates/forge_bsgenome.R

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ library(BSgenome)
44

55
forgeBSgenomeDataPkg(
66
"${forge_seed}",
7-
".")
7+
"${seqs_fasta}")
88

99
pkg_name <- strsplit(readLines("${forge_seed}")[1], " ")[[1]][2]
1010
system(paste("R CMD build", pkg_name))

0 commit comments

Comments
 (0)