-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmodules.nf
More file actions
75 lines (60 loc) · 1.72 KB
/
modules.nf
File metadata and controls
75 lines (60 loc) · 1.72 KB
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
64
65
66
67
68
69
70
71
72
73
74
#!/usr/bin/env nextflow
process buildDatabase {
input:
path fastaFile // Input parameter: Path to a FASTA file
output:
path "${fastaFile}", emit:fastaFile
path "${fastaFile}_database", emit:output_dir // Output directory path
script:
"""
/opt/RepeatModeler/BuildDatabase -name repeatmodeler_db -engine ncbi "${fastaFile}"
mkdir -p ${fastaFile}_database/
mv repeatmodeler_db.* ${fastaFile}_database/
"""
}
process repeatmodeler{
input:
val databaseFile // Input parameter: Path to the database file
val fastaFile
output:
path "repeatmodeler_output", emit:output_dir
script:
"""
mkdir -p repeatmodeler_output/ && cd repeatmodeler_output/
/opt/RepeatModeler/RepeatModeler -engine ncbi -numAddlRounds 1 threads 40 -database ${databaseFile}/repeatmodeler_db
cp ${databaseFile}/repeatmodeler_db-families.fa ./
"""
}
process repeatmasker{
input:
val fastaFile
val databaseFile
val engine
script:
"""
mkdir -p repeatmasker_output/ && cd repeatmasker_output/
/opt/RepeatMasker/RepeatMasker -nolow -lib "${databaseFile}/repeatmodeler_db-families.fa" "${fastaFile}" engine "${engine}" -dir . -gff
"""
}
process dust{
input:
val fastaFile
output:
path "dust_output", emit:output_dir
script:
"""
mkdir -p dust_output/ && cd dust_output/
/opt/rmblast/bin/dustmasker -in ${fastaFile} -out dustmasker.out
"""
}
process trf{
input:
val fastaFile
output:
path "trf_output", emit:output_dir
shell:
'''
mkdir -p trf_output/ && cd trf_output/
bash -c '/opt/trf !{fastaFile} 2 5 7 80 10 40 500 -d -h' || echo "processed $? TRs"
'''
}