forked from AlexanderLabWHOI/eukrhythmic
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy patheukrhythmic-analysis-spike
More file actions
56 lines (49 loc) · 2.29 KB
/
Copy patheukrhythmic-analysis-spike
File metadata and controls
56 lines (49 loc) · 2.29 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
configfile: "config.yaml"
import io
import os
from os import listdir
from os.path import isfile, join
import sys
import pandas as pd
import numpy as np
import pathlib
from snakemake.exceptions import print_exception, WorkflowError
sys.path.insert(1, 'scripts')
# Import relevant variable from config; exit if not supplied
import importworkspace
from importworkspace import *
os.system("python " + os.path.join("scripts", "importworkspace.py"))
# Contains function to check that variables are present and formatted correctly beyond provided values in config file
import checkrequirements
from checkrequirements import *
## CHECK THAT ALL REQUIREMENTS ARE SATISFIED BY EXECUTING checkrequirements() from `scripts/checkrequirements.py` ##
checkrequirementsfct()
include: "rules/busco-snake.smk"
include: "rules/salmon-snake.smk"
include: "rules/annotate-snake.smk"
include: "rules/hardclean-snake.smk"
include: "rules/spades-snake.smk"
include: "rules/spike-snake.smk"
include: "rules/eukulele-snake.smk"
ruleorder: merge_all > copies
ruleorder: salmon_rename > salmon_clustering_against_mega
ruleorder: salmon_rename > salmon_clustering
rule all:
input:
# BUSCO ASSESSMENT OF FINAL ASSEMBLY
busco = expand(os.path.join("{base}", "busco", "{database}", "{folder}", "{assembly}"), base = OUTPUTDIR,
database = "eukaryota", folder = "mega_merge", assembly = "merged"), # eukaryota, bacteria
# HMMER ALIGNMENT OF FINAL ASSEMBLY BEFORE MEGA-MERGE
hmmer = expand(os.path.join("{base}", "pfam", "{folder}", "{assembly}.tblout"), base = OUTPUTDIR,
folder = "by_assembly_group", assembly = assemblygroups),
# DIAMOND ALIGNMENT AND KEGG ANNOTATION
kegg = expand(os.path.join("{base}", "kegg", "{folder}", "{assembly}_kegg.csv"), base = OUTPUTDIR,
folder = "by_assembly_group", assembly = assemblygroups),
# QUANTIFICATION BASED ON SPIKE FILE
copies = expand(os.path.join(OUTPUTDIR, "salmon_{folder}", "copiesperL.tab"),
folder = "by_assembly_group",
base = OUTPUTDIR),
# EUKULELE
eukulele = expand(os.path.join(OUTPUTDIR, "eukulele_{folder}"),
folder = "by_assembly_group",
base = OUTPUTDIR)