13 |
14 |

15 |
16 |
nf-core/meripseqpipe v${version}
17 |
Run Name: $runName
18 |
19 | <% if (!success){
20 | out << """
21 |
22 |
nf-core/meripseqpipe execution completed unsuccessfully!
23 |
The exit status of the task that caused the workflow execution to fail was: $exitStatus.
24 |
The full error message was:
25 |
${errorReport}
26 |
27 | """
28 | } else {
29 | out << """
30 |
31 | nf-core/meripseqpipe execution completed successfully!
32 |
33 | """
34 | }
35 | %>
36 |
37 |
The workflow was completed at $dateComplete (duration: $duration)
38 |
The command used to launch the workflow was as follows:
39 |
$commandLine
40 |
41 |
Pipeline Configuration:
42 |
43 |
44 | <% out << summary.collect{ k,v -> "| $k | $v |
" }.join("\n") %>
45 |
46 |
47 |
48 |
nf-core/meripseqpipe
49 |
https://github.com/nf-core/meripseqpipe
50 |
51 |
52 |
53 |
54 |
55 |
--------------------------------------------------------------------------------
/bin/create_IGV_js.sh:
--------------------------------------------------------------------------------
1 | #! /bin/bash
2 | fasta=$1
3 | gtf=$2
4 | merged_peak_file=$3
5 | designfile=$4
6 | echo "Start to generate IGV.js"
7 |
8 | ## setting tmp files' name
9 | bedgraph_tracks_file=tmp.bedgraph.tracks
10 | peaks_tracks_file=tmp.peaks.tracks
11 |
12 | ## combined tracks of bedgraph
13 | sampleinfo_list=$(awk 'BEGIN{FS=","}NR>1{print $1","$4}' $designfile |sort|uniq|awk 'BEGIN{ORS=" "}{print $0}')
14 | for sample_group_id in ${sampleinfo_list}
15 | do
16 | {
17 | sample_id=$(echo ${sample_group_id} | awk 'BEGIN{FS=","}{print $1}')
18 | group_id=$(echo ${sample_group_id} | awk 'BEGIN{FS=","}{print $2}')
19 | bedgraph_input_file=$(ls ${sample_id}.input_*.igv.bedgraph)
20 | bedgraph_ip_file=$(ls ${sample_id}.ip_*.igv.bedgraph)
21 | cat >> ${bedgraph_tracks_file} << EOF
22 | {
23 | url: '${bedgraph_input_file}',
24 | name: '${sample_id}.input',
25 | color: 'rgb(200,0,0)',
26 | type: "wig",
27 | sourceType: "file",
28 | autoscaleGroup: 'group_${group_id}.${sample_id}'
29 | },
30 | {
31 | url: '${bedgraph_ip_file}',
32 | name: '${sample_id}.ip',
33 | type: "wig",
34 | sourceType: "file",
35 | color: 'rgb(200,0,0)',
36 | autoscaleGroup: 'group_${group_id}.${sample_id}'
37 | },
38 | EOF
39 | }
40 | done
41 |
42 | ## combined tracks of merged group peaks
43 | groups_peak_file=$(ls *_merged_group_*igv.bed)
44 | for peak_file in ${groups_peak_file}
45 | do
46 | {
47 | cat >> ${peaks_tracks_file} << EOF
48 | {
49 | type: "annotation",
50 | format: "bed",
51 | url: '${peak_file}',
52 | name: "${peak_file}"
53 | },
54 | EOF
55 | }
56 | done
57 |
58 | ## combined tracks and allpeaks track
59 | cat ${bedgraph_tracks_file} ${peaks_tracks_file} > tmp.tracks
60 | cat >> tmp.tracks << EOF
61 | {
62 | type: "annotation",
63 | format: "bed",
64 | url: '${merged_peak_file}',
65 | name: "${merged_peak_file}"
66 | }
67 | EOF
68 | tracks_js=$(cat tmp.tracks)
69 |
70 | ## combined all info
71 | cat>igv.js<