-
Notifications
You must be signed in to change notification settings - Fork 1
/
exonizations_ePydoor_part3.py
99 lines (82 loc) · 4.69 KB
/
exonizations_ePydoor_part3.py
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
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
"""
@authors: Juan L. Trincado
@email: juanluis.trincado@upf.edu
exonizations_ePydoor.py: get significat exonizations
"""
from lib.Exonization.extract_exonized_junctions import *
from lib.Exonization.get_reads_exonizations import *
from lib.Exonization.overlap_with_repeats import *
from lib.Exonization.get_significant_exonizations import *
from lib.Exonization.generate_random_intronic_positions import *
from lib.Exonization.get_coverageBed import *
from lib.Exonization.get_coverageBed_adapter import *
from lib.Exonization.check_mutations_nearby import *
from lib.Exonization.select_fasta_candidates import *
from lib.Exonization.filter_exonizations import *
from lib.Exonization.filter_exonizations_CHESS import *
from lib.Exonization.get_peptide_sequence import *
from lib.Exonization.run_netMHC_classI_slurm_part1 import *
from lib.Exonization.run_netMHCpan_classI_slurm_part1 import *
from lib.Exonization.run_netMHC_classI_slurm_part2 import *
from lib.Exonization.run_netMHCpan_classI_slurm_part2 import *
from lib.Exonization.format_to_SPADA import *
# create logger
logger = logging.getLogger(__name__)
logger.setLevel(logging.INFO)
# create console handler and set level to info
ch = logging.StreamHandler()
ch.setLevel(logging.DEBUG)
# create formatter
formatter = logging.Formatter('%(asctime)s - %(name)s - %(levelname)s - %(message)s')
# add formatter to ch
ch.setFormatter(formatter)
# add ch to logger
logger.addHandler(ch)
def main():
try:
logger.info("Starting execution")
HLAclass_path = "/projects_rg/SCLC_cohorts/Smart/PHLAT/PHLAT_summary_ClassI.out"
HLAtypes_path = "/projects_rg/SCLC_cohorts/tables/NetMHC-4.0_HLA_types_accepted.tab"
HLAtypes_pan_path = "/projects_rg/SCLC_cohorts/tables/NetMHCpan-4.0_HLA_types_accepted.tab"
netMHC_path = "/projects_rg/SCLC_cohorts/soft/netMHC-4.0/netMHC"
netMHC_pan_path = "/projects_rg/SCLC_cohorts/soft/netMHCpan-4.0/netMHCpan"
output_path = "/users/genomics/juanluis/SCLC_cohorts/Smart/epydoor/exonizations"
#17. Run netMHC-4.0_part2
logger.info("Part16...")
output_path_aux19 = output_path + "/all_exonizations_filtered_peptide_change.tab"
run_netMHC_classI_slurm_part2(output_path_aux19, HLAclass_path,
HLAtypes_path,
output_path + "/exonization_fasta_files",
output_path + "/exonizations_NetMHC-4.0_files",
output_path + "/exonizations_NetMHC-4.0_neoantigens_type_3.tab",
output_path + "/exonizations_NetMHC-4.0_neoantigens_type_3_all.tab",
output_path + "/exonizations_NetMHC-4.0_neoantigens_type_2.tab",
output_path + "/exonizations_NetMHC-4.0_neoantigens_type_2_all.tab",
output_path + "/exonizations_NetMHC-4.0_junctions_ORF_neoantigens.tab",
netMHC_path)
#18. Run netMHCpan-4.0_part2
logger.info("Part17...")
run_netMHCpan_classI_slurm_part2(output_path_aux19,
HLAclass_path, HLAtypes_pan_path,
output_path + "/exonization_fasta_files",
output_path + "/exonizations_NetMHCpan-4.0_files",
output_path + "/exonizations_NetMHCpan-4.0_neoantigens_type_3.tab",
output_path + "/exonizations_NetMHCpan-4.0_neoantigens_type_3_all.tab",
output_path + "/exonizations_NetMHCpan-4.0_neoantigens_type_2.tab",
output_path + "/exonizations_NetMHCpan-4.0_neoantigens_type_2_all.tab",
output_path + "/exonizations_NetMHCpan-4.0_junctions_ORF_neoantigens.tab",
netMHC_pan_path)
# 19. Run format_to_SPADA
logger.info("Part18...")
format_to_SPADA(output_path + "/all_exonizations_ORF.tab", output_path + "/all_exonizations_ORF_sequences.tab",
output_path + "/all_exonizations_Interpro.tab",
output_path + "/all_exonizations_IUPred.tab", output_path + "/all_exonizations_SPADA.tab",
output_path + "/all_exonizations_SPADA.fasta", output_path + "/all_exonizations_SPADA_features.tab")
logger.info("Done.")
exit(0)
except Exception as error:
logger.error('ERROR: ' + repr(error))
logger.error("Aborting execution")
sys.exit(1)
if __name__ == '__main__':
main()