generated from JBwdn/nextflow_template
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathmain.nf
60 lines (46 loc) · 1.37 KB
/
main.nf
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
#!/usr/bin/env nextflow
// Jake Bowden 11/21
// Default DB path:
params.db = "data/gbk_records/"
// Creates a channel with a symbolic link to gbk database:
gbk_db_ch = channel.fromPath(params.db, type: "dir")
// Create a channel containing the query fasta from the --in path parameter:
query_seq_ch = channel.fromPath(params.in)
process phmmerHomologWrapper {
// Call the phmmer wrapper python script which calls and parses results:
conda "bioconda::hmmer biopython"
input:
file query_seq from query_seq_ch
file gbk_db from gbk_db_ch
output:
file "query_homologs.fasta" into homologs_ch
"""
pip install jinfo
find_homologs.py -query_fasta $query_seq -db_path $gbk_db -out "query_homologs.fasta"
"""
}
homologs_ch = homologs_ch.view()
process MuscleAlign {
// Pass homolog channel to muscle and open alignment channel:
conda "bioconda::muscle"
input:
file homologs from homologs_ch
output:
file "alignment.fasta" into alignment_ch
"""
muscle -in $homologs -out alignment.fasta
"""
}
alignment_ch = alignment_ch.view()
process FastTreePhylo {
// Calculate tree from the alignment, open tree channel:
conda "bioconda::fasttree"
input:
file alignment from alignment_ch
output:
file "output.tree" into tree_ch
"""
FastTreeMP -out output.tree $alignment
"""
}
tree_ch.view()