Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
JU28_59vs17_SNP
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
LBMC
Delattre
JU28_59vs17_SNP
Commits
29267096
Unverified
Commit
29267096
authored
6 years ago
by
Laurent Modolo
Browse files
Options
Downloads
Patches
Plain Diff
MUSIC: nf files for single-end data
parent
5f461c3d
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
src/nf_modules/MUSIC/peak_calling_single.config
+42
-0
42 additions, 0 deletions
src/nf_modules/MUSIC/peak_calling_single.config
src/nf_modules/MUSIC/peak_calling_single.nf
+105
-0
105 additions, 0 deletions
src/nf_modules/MUSIC/peak_calling_single.nf
with
147 additions
and
0 deletions
src/nf_modules/MUSIC/peak_calling_single.config
0 → 100644
+
42
−
0
View file @
29267096
profiles
{
docker
{
docker
.
temp
=
'auto'
docker
.
enabled
=
true
process
{
$
compute_mappability
{
container
=
"music:6613c53"
}
$
music_preprocessing
{
container
=
"music:6613c53"
}
$
music_sort
{
container
=
"music:6613c53"
}
$
music_dedup
{
container
=
"music:6613c53"
}
$
music_computation
{
container
=
"music:6613c53"
}
}
}
sge
{
process
{
$
compute_mappability
{
beforeScript
=
"module purge; module load MUSIC/6613c53"
}
$
music_preprocessing
{
beforeScript
=
"module purge; module load MUSIC/6613c53"
}
$
music_sort
{
beforeScript
=
"module purge; module load MUSIC/6613c53"
}
$
music_dedup
{
beforeScript
=
"module purge; module load MUSIC/6613c53"
}
$
music_computation
{
beforeScript
=
"module purge; module load MUSIC/6613c53"
}
}
}
}
This diff is collapsed.
Click to expand it.
src/nf_modules/MUSIC/peak_calling_single.nf
0 → 100644
+
105
−
0
View file @
29267096
params.reads_size = 100
params.frag_size = 200
params.begin_l = 50
params.end_l = 500
log.info "bam files : ${params.bam}"
log.info "index files : ${params.index}"
log.info "fasta files : ${params.fasta}"
Channel
.fromPath( params.fasta )
.ifEmpty { error "Cannot find any bam files matching: ${params.fasta}" }
.set { fasta_files }
Channel
.fromPath( params.bam )
.ifEmpty { error "Cannot find any bam files matching: ${params.bam}" }
.map { it -> [(it.baseName =~ /([^\.]*)/)[0][1], it]}
.set { bam_files }
Channel
.fromPath( params.index )
.ifEmpty { error "Cannot find any index files matching: ${params.index}" }
.set { index_files }
process compute_mappability {
tag "${fasta.baseName}"
input:
file index from index_files.collect()
file fasta from fasta_files
output:
file "*.bin" into mappability
file "temp/chr_ids.txt" into chr_ids
script:
"""
generate_multimappability_signal.csh ${fasta} ${params.reads_size} ./
bash temp_map_reads.csh
bash temp_process_mapping.csh
"""
}
process music_preprocessing {
tag "${file_id}"
input:
set file_id, file(bam) from bam_files
file chr_ids from chr_ids.collect()
output:
set file_id, "preprocessed/*.tar" into preprocessed_bam_files
script:
"""
mkdir preprocessed
samtools view *.bam | \
MUSIC -preprocess SAM stdin preprocessed/
mkdir preprocessed/sorted
MUSIC -sort_reads preprocessed/ preprocessed/sorted/
mkdir preprocessed/dedup
MUSIC -remove_duplicates ./preprocessed/sorted 2 preprocessed/dedup/
cd preprocessed
tar -c -f ${file_id}.tar *
"""
}
preprocessed_bam_files_control = Channel.create()
preprocessed_bam_files_chip = Channel.create()
preprocessed_bam_files.choice(
preprocessed_bam_files_control,
preprocessed_bam_files_chip ) { a -> a[0] =~ /.*control.*/ ? 0 : 1 }
process music_computation {
tag "${file_id}"
publishDir "results/peak_calling/${file_id}", mode: 'copy'
input:
set file_id, file(control) from preprocessed_bam_files_chip
set file_id_control, file(chip) from preprocessed_bam_files_control.collect()
file mapp from mappability.collect()
output:
file "*" into music_output_forward
file "*.bed" into peaks_forward
script:
"""
mkdir mappability control chip
mv ${mapp} mappability/
tar -xf ${control} -C control/
tar -xf ${chip} -C chip/
MUSIC -get_per_win_p_vals_vs_FC -chip chip/ -control control/ \
-l_win_step ${params.end_l} \
-l_win_min ${params.end_l} -l_win_max ${params.end_l * 10}
MUSIC -get_multiscale_punctate_ERs \
-chip chip/ -control control/ -mapp mappability/ \
-begin_l ${params.begin_l} -end_l ${params.end_l} -step 1.1 \
-l_mapp ${params.reads_size} -l_frag ${params.frag_size} -q_val 1 -l_p 0
ls -l
"""
}
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment