-
Notifications
You must be signed in to change notification settings - Fork 1
/
Snakefile
77 lines (73 loc) · 2.15 KB
/
Snakefile
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
75
76
rule all:
input:
"output/tRNA_scan_result.txt",
"output/G_intestinalis.tRNA",
"output/G_intestinalis.stats",
"output/tRNAscan/G_intestinalis.tRNA",
expand("output/tRNAscan/{sp}.tRNA", sp=["G_muris", "G_intestinalis"]),
expand("output/blastn/G_intestinalis/{sp}.blastn", sp=["G_muris", "S_salmonicida"]),
#expand("output/plot/tRNAscan/{sp}.svg", sp=["G_muris", "S_salmonicida", "G_intestinalis"])
rule tRNAscan:
input: "resource/Genome/G_intestinalis.fasta"
output:"output/tRNA_scan_result.txt"
conda:
"env/env.yaml"
shell: """tRNAscan-SE {input} -o {output}"""
rule tRNAscan_stats:
input:
genome= "resource/Genome/G_intestinalis.fasta"
output:
tRNA = "output/G_intestinalis.tRNA",
stats = "output/G_intestinalis.stats"
params:
threads= 2
conda:
"env/env.yaml"
script:
"scripts/tRNAscan_stats.py"
#rule tRNAscan_stats_wildcard:
# input:
# genome="resource/Genome/{Genome}.fasta"
# output:
# tRNA = "output/tRNAscan/{Genome}.tRNA",
# stats = "output/tRNAscan/{Genome}.stats"
# params:
# threads=2
# conda:
# "env/env.yaml"
# script:
# "scripts/tRNAscan_stats.py"
rule makeblastdb:
input:
"resource/{type}/db/{db}.fasta"
output:
"output/{type}/db/{db}.ndb",
"output/{type}/db/{db}.nhr",
"output/{type}/db/{db}.nin",
"output/{type}/db/{db}.not",
"output/{type}/db/{db}.nsq",
"output/{type}/db/{db}.ntf",
"output/{type}/db/{db}.nto"
params:
outname="output/{type}/db/{db}"
conda:
"env/env.yaml"
shell:
'makeblastdb -dbtype nucl -in {input} -out {params.outname}'
rule blastn:
input:
query="resource/{type}/query/{query}.fasta",
db="output/{type}/db/{db}.ndb"
output:
'output/{type}/{db}/{query}.blastn'
params:
perc_identity=95,
outfmt=6,
num_threads=2,
max_target_seqs=1,
max_hsps=1,
db_prefix="output/{type}/db/{db}"
conda:
"env/env.yaml"
script:
"scripts/blastn.py"