Skip to content

Commit

Permalink
Merge c3c29f0 into 1b3fa5f
Browse files Browse the repository at this point in the history
  • Loading branch information
susannasiebert committed Oct 13, 2020
2 parents 1b3fa5f + c3c29f0 commit ed0c8fb
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 14 deletions.
9 changes: 6 additions & 3 deletions lib/pipeline.py
Original file line number Diff line number Diff line change
Expand Up @@ -460,12 +460,15 @@ def execute(self):
total_row_count = self.tsv_entry_count()
if total_row_count == 0:
if self.input_file_type == 'vcf':
sys.exit("The TSV file is empty. Please check that the input VCF contains missense, inframe indel, or frameshift mutations.")
print("The TSV file is empty. Please check that the input VCF contains missense, inframe indel, or frameshift mutations.")
return
elif self.input_file_type == 'bedpe':
if os.path.isfile(self.input_file):
sys.exit("The TSV file is empty. Please check that the input bedpe file contains fusion entries.")
print("The TSV file is empty. Please check that the input bedpe file contains fusion entries.")
return
elif os.path.isdir(self.input_file):
sys.exit("The TSV file is empty. Please check that the input AGfusion directory contains fusion entries with `*_protein.fa` files. Fusion entries without this file cannot be processed by pVACfuse.")
print("The TSV file is empty. Please check that the input AGfusion directory contains fusion entries with `*_protein.fa` files. Fusion entries without this file cannot be processed by pVACfuse.")
return
chunks = self.split_tsv_file(total_row_count)

self.generate_fasta(chunks)
Expand Down
22 changes: 11 additions & 11 deletions tools/pvacvector/run.py
Original file line number Diff line number Diff line change
Expand Up @@ -493,24 +493,24 @@ def main(args_input=sys.argv[1:]):
tries += 1

if results_file is None:
raise Exception(
print(
'Unable to find path. ' +
'A vaccine design using the parameters specified could not be found. Some options that you may want to consider:\n' +
'1) increasing the acceptable junction binding score to allow more possible connections (-b parameter)\n' +
'2) using the "median" binding score instead of the "best" binding score for each junction, (best may be too conservative, -m parameter)'
)
else:
if 'DISPLAY' in os.environ.keys():
VectorVisualization(results_file, base_output_dir, args.spacers).draw()

if 'DISPLAY' in os.environ.keys():
VectorVisualization(results_file, base_output_dir, args.spacers).draw()

dna_results_file = os.path.join(base_output_dir, args.sample_name + '_results.dna.fa')
create_dna_backtranslation(results_file, dna_results_file)
dna_results_file = os.path.join(base_output_dir, args.sample_name + '_results.dna.fa')
create_dna_backtranslation(results_file, dna_results_file)

if not args.keep_tmp_files:
for subdirectory in range(tries):
for spacer in processed_spacers:
shutil.rmtree(os.path.join(base_output_dir, str(subdirectory), spacer, 'MHC_Class_I'), ignore_errors=True)
shutil.rmtree(os.path.join(base_output_dir, str(subdirectory), spacer, 'MHC_Class_II'), ignore_errors=True)
if not args.keep_tmp_files:
for subdirectory in range(tries):
for spacer in processed_spacers:
shutil.rmtree(os.path.join(base_output_dir, str(subdirectory), spacer, 'MHC_Class_I'), ignore_errors=True)
shutil.rmtree(os.path.join(base_output_dir, str(subdirectory), spacer, 'MHC_Class_II'), ignore_errors=True)

change_permissions_recursive(base_output_dir, 0o755, 0o644)

Expand Down

0 comments on commit ed0c8fb

Please sign in to comment.