Skip to content

Commit 5250f61

Browse files
committed
logo added
1 parent 5148a14 commit 5250f61

4 files changed

Lines changed: 12 additions & 12 deletions

File tree

PMGen_logo.png

7.63 MB
Loading

run_utils.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -903,7 +903,7 @@ def protein_mpnn_wrapper(output_pdbs_dict, args, max_jobs, anchor_and_peptide=No
903903
import time
904904
def run_and_parse_netmhcpan(peptide_fasta_file, mhc_type, output_dir, mhc_seq_list=[], mhc_allele=None,
905905
dirty_mode=False, verbose=True, outfilename='netmhcpan_out', return_match_allele=False,
906-
match_with_netmhcpan=True, n_jobs=1, parallel=False):
906+
match_with_netmhcpan=True, n_jobs=1, parallel=False, length='9,10,11,12,13,14,15,16,17,18'):
907907
assert mhc_type in [1,2]
908908
if not mhc_allele and len(mhc_seq_list) == 0:
909909
raise ValueError(f'at least one of mhc_seq_list or mhc_allele should be provided')
@@ -935,9 +935,9 @@ def run_and_parse_netmhcpan(peptide_fasta_file, mhc_type, output_dir, mhc_seq_li
935935
if mhc_type == 1: break
936936
if verbose: print("Matched Alleles", matched_allele)
937937
if parallel:
938-
processing_functions.run_netmhcpan_parallel(peptide_fasta_file, matched_allele, outfile, mhc_type, n_jobs=n_jobs, verbose=verbose)
938+
processing_functions.run_netmhcpan_parallel(peptide_fasta_file, matched_allele, outfile, mhc_type, n_jobs=n_jobs, verbose=verbose, length=length)
939939
else:
940-
processing_functions.run_netmhcpan(peptide_fasta_file, matched_allele, outfile, mhc_type)
940+
processing_functions.run_netmhcpan(peptide_fasta_file, matched_allele, outfile, mhc_type, length=length)
941941
if verbose:
942942
s = time.time()
943943
print('Parsing netmhcpan output on ', outfile)

user_setting.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
##### PLEASE UPDATE #####
22
#Absolute path to NetMHCIPan executable file e.g. 'home/user/netMHCpan-4.1/netMHCpan'
3-
netmhcipan_path = '/home/amir/amir/ParseFold/PMGen/netMHCIpan-4.1/netMHCpan323'
4-
netmhciipan_path = '/home/amir/amir/ParseFold/PMGen/netMHCIIpan-4.3/netMHCIIpan323'
3+
netmhcipan_path = '/home/amir/amir/ParseFold/PMGen/netMHCIpan-4.1/netMHCpan'
4+
netmhciipan_path = '/home/amir/amir/ParseFold/PMGen/netMHCIIpan-4.3/netMHCIIpan'
55

66
##### Do not Change #######
77
import os

utils/processing_functions.py

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1037,7 +1037,7 @@ def match_inputseq_to_netmhcpan_allele(sequence, mhc_type, mhc_allele=None,
10371037

10381038

10391039
def run_netmhcpan(peptide_fasta, allele_list, output, mhc_type,
1040-
netmhcipan_path=netmhcipan_path, netmhciipan_path=netmhciipan_path):
1040+
netmhcipan_path=netmhcipan_path, netmhciipan_path=netmhciipan_path, length='9,10,11,12,13,14,15,16,17,18'):
10411041
assert mhc_type in [1, 2]
10421042

10431043
if mhc_type == 1:
@@ -1055,7 +1055,7 @@ def run_netmhcpan(peptide_fasta, allele_list, output, mhc_type,
10551055
if 'DQB' in allele or 'DPB' in allele:
10561056
final_allele += f'-{allele.replace("HLA-", "")}'
10571057
cmd = [str(netmhciipan_path), '-f', str(peptide_fasta),
1058-
'-BA', '-u', '-s', '-length', '9,10,11,12,13,14,15,16,17,18',
1058+
'-BA', '-u', '-s', '-length', length,
10591059
'-inptype', '0', '-a', str(final_allele)]
10601060
# Open the output file and redirect stdout to it
10611061
with open(output, 'w') as f:
@@ -1091,7 +1091,7 @@ def split_fasta(fasta_file, n_chunks):
10911091

10921092
def run_netmhcpan_chunk(args):
10931093
"""Run NetMHCpan on a single chunk"""
1094-
peptide_fasta, allele_list, output, mhc_type, netmhcipan_path, netmhciipan_path = args
1094+
peptide_fasta, allele_list, output, mhc_type, netmhcipan_path, netmhciipan_path, length = args
10951095

10961096
if mhc_type == 1:
10971097
cmd = [str(netmhcipan_path), '-f', str(peptide_fasta),
@@ -1107,7 +1107,7 @@ def run_netmhcpan_chunk(args):
11071107
if 'DQB' in allele or 'DPB' in allele:
11081108
final_allele += f'-{allele.replace("HLA-", "")}'
11091109
cmd = [str(netmhciipan_path), '-f', str(peptide_fasta),
1110-
'-BA', '-u', '-s', '-length', '9,10,11,12,13,14,15,16,17,18',
1110+
'-BA', '-u', '-s', '-length', length,
11111111
'-inptype', '0', '-a', str(final_allele)]
11121112

11131113
with open(output, 'w') as f:
@@ -1119,7 +1119,7 @@ def run_netmhcpan_chunk(args):
11191119
def run_netmhcpan_parallel(peptide_fasta, allele_list, output, mhc_type,
11201120
netmhcipan_path=netmhcipan_path,
11211121
netmhciipan_path=netmhciipan_path,
1122-
n_jobs=None, verbose=False):
1122+
n_jobs=None, verbose=False, length='9,10,11,12,13,14,15,16,17,18'):
11231123
"""
11241124
Run NetMHCpan in parallel by splitting the input FASTA
11251125
@@ -1130,7 +1130,7 @@ def run_netmhcpan_parallel(peptide_fasta, allele_list, output, mhc_type,
11301130

11311131
if n_jobs is None:
11321132
n_jobs = cpu_count()
1133-
1133+
print(length)
11341134
# Split FASTA into chunks
11351135
if verbose:
11361136
print(f"Splitting FASTA into {n_jobs} chunks...")
@@ -1146,7 +1146,7 @@ def run_netmhcpan_parallel(peptide_fasta, allele_list, output, mhc_type,
11461146

11471147
args_list.append((
11481148
chunk_file, allele_list, temp_output.name, mhc_type,
1149-
netmhcipan_path, netmhciipan_path
1149+
netmhcipan_path, netmhciipan_path, length
11501150
))
11511151

11521152
# Run in parallel

0 commit comments

Comments
 (0)