Skip to content

Dev #69

Merged
merged 11 commits into from
Jan 14, 2019
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ Optional arguments:
--window_length INT This parameter sets the length of a sliding window. (Default: 200)
--step INT This parameter sets the number of positions to slide the window forward. (Default: 100)
--percentage INT Threshold in percent (Default: 0)
--max_bp_between INT If footprints are less than X bases appart the footprints will be merged (Default: 6)
--min_gap INT If footprints are less than X bases appart the footprints will be merged (Default: 6)
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

*apart


Filter motifs:
--min_size_fp INT Minimum sequence length threshold. Smaller sequences are discarded. (Default: 10)
Expand Down
15 changes: 9 additions & 6 deletions pipeline.nf
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
params.window_length = 200
params.step = 100
params.percentage = 0
params.max_bp_between = 6
params.min_gap = 6

//filter_unknown_motifs
params.min_size_fp=10
Expand Down Expand Up @@ -46,6 +46,7 @@
params.motif_min_key = 8 // Minimum number of key positions (aligned columns)
params.motif_max_key = 20 // Maximum number of key positions (aligned columns)
params.iteration = 10000 // Number of Iterations done by glam2. A high iteration number equals a more accurate result but with an higher runtime.
params.gap_penalty = 1000

//tomtom
params.tomtom_treshold = 0.01 // threshold for similarity score.
Expand All @@ -57,6 +58,7 @@

params.best_motif = 3 // Top n motifs per cluster


Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

remove this line

//creating_gtf
params.organism=""
params.tissue=""
Expand Down Expand Up @@ -86,7 +88,7 @@ Optional arguments:
--window_length INT This parameter sets the length of a sliding window. (Default: 200)
--step INT This parameter sets the number of positions to slide the window forward. (Default: 100)
--percentage INT Threshold in percent (Default: 0)
--max_bp_between INT If footprints are less than X bases appart the footprints will be merged (Default: 6)
--min_gap INT If footprints are less than X bases appart the footprints will be merged (Default: 6)
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

*apart


Filter motifs:
--min_size_fp INT Minimum sequence length threshold. Smaller sequences are discarded. (Default: 10)
Expand Down Expand Up @@ -114,6 +116,7 @@ Optional arguments:
--iteration INT Number of iterations done by GLAM2. More Iterations: better results, higher runtime. (Default: 10000)
--tomtom_treshold FLOAT Threshold for similarity score. (Default: 0.01)
--best_motif INT Get the best X motifs per cluster. (Default: 3)
--gap_penalty INT Set penalty for gaps in GLAM2 (Default: 1000)
Moitf clustering:
--cluster_motif Boolean If 1 pipeline clusters motifs. If its 0 it does not. (Defaul: 0)
--edge_weight INT Minimum weight of edges in motif-cluster-graph (Default: 5)
Expand Down Expand Up @@ -141,7 +144,7 @@ int_params = ["window_length", "step", "min_size_fp", "max_size_fp", "kmer",
"aprox_motif_len", "motif_occurence", "min_seq_length", "global",
"sequence_coverage", "memory", "throw_away_seq", "strand",
"min_seq", "motif_min_key", "motif_max_key", "iteration",
"edge_weight", "best_motif"]
"edge_weight", "best_motif", "min_gap", "gap_penalty", "edge_weight"]
req_params = ["bigwig", "bed", "genome_fasta", "motif_db", "config"]

valid_organism = ["hg38", "hg19", "mm9", "mm10"]
Expand Down Expand Up @@ -212,7 +215,7 @@ process footprint_extraction {

script:
"""
python ${path_bin}/1.1_footprint_extraction/footprints_extraction.py --bigwig ${bigWig} --bed ${bed} --output_file ${name}_called_peaks.bed --window_length ${params.window_length} --step ${params.step} --percentage ${params.percentage} --max_bp_between ${params.max_bp_between}
python ${path_bin}/1.1_footprint_extraction/footprints_extraction.py --bigwig ${bigWig} --bed ${bed} --output_file ${name}_called_peaks.bed --window_length ${params.window_length} --step ${params.step} --percentage ${params.percentage} --min_gap ${params.min_gap}
"""
}

Expand Down Expand Up @@ -375,7 +378,7 @@ process glam2 {

script:
"""
glam2 n ${fasta} -O ./${name}/ -a ${params.motif_min_key} -b ${params.motif_max_key} -z 5 -n ${params.iteration}
glam2 n ${fasta} -O ./${name}/ -E ${params.gap_penalty} -J ${params.gap_penalty} -a ${params.motif_min_key} -b ${params.motif_max_key} -z 5 -n ${params.iteration}
"""
}

Expand Down Expand Up @@ -541,7 +544,7 @@ process clustered_glam2 {
script:
name = fasta.getBaseName()
"""
glam2 n ${fasta} -O ./${name}/ -a ${params.motif_min_key} -b ${params.motif_max_key} -z 5 -n ${params.iteration}
glam2 n ${fasta} -O ./${name}/ -E ${params.gap_penalty} -J ${params.gap_penalty} -a ${params.motif_min_key} -b ${params.motif_max_key} -z 5 -n ${params.iteration}
"""
}

Expand Down