Newer
Older
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
/*
* Ribowave :
* Inputs : fastq files
* Inputs : fasta files
* Output : bam files
*/
params.gtf = "/media/manu/ManuDisque/gencode/gencode.v28.annotation.gtf"
params.genome = "/media/manu/ManuDisque/gencode/GRCh38.p12.genome.fa"
params.bam = ""
params.jobname = ""
log.info "gtf file : ${params.gtf}"
log.info "genome fasta file : ${params.genome}"
log.info "bam file(s) : ${params.bam}"
log.info "job name : ${params.jobname}"
Channel
.fromPath( params.gtf )
.ifEmpty { error "Cannot find any fasta files matching: ${params.gtf}" }
.set { gtf_file }
Channel
.fromPath( params.genome )
.ifEmpty { error "Cannot find any fasta files matching: ${params.genome}" }
.set { genome_file }
Channel
.fromPath( params.bam )
.ifEmpty { error "Cannot find any fastq files matching: ${params.bam}" }
.set { bam_files }
process create_annot {
publishDir "results/ribowave/gtf27/annot", mode: 'copy'
input:
file gtf from gtf_file
file genome from genome_file
output:
file "*" into annot_file_save
file "start_codon.bed" into annot_file
script:
"""
/Ribowave/scripts/create_annotation.sh -G ${gtf} -f ${genome} -o ./ -s /Ribowave/scripts
"""
}
process determination_P_site {
publishDir "results/ribowave/gtf27/deter_P_site", mode: 'copy'
input:
file bam from bam_files
file start from annot_file
output:
file "*" into p_site_channel
script:
"""
/Ribowave/scripts/P-site_determination.sh -i ${bam} -S ${start} -o ./ -n ${params.jobname} -s /Ribowave/scripts
"""
}