Skip to content

Commit

Permalink
Eliminate unnecessary conditionals
Browse files Browse the repository at this point in the history
  • Loading branch information
susannasiebert committed Dec 1, 2016
1 parent 2d9daef commit 781db86
Showing 1 changed file with 12 additions and 18 deletions.
30 changes: 12 additions & 18 deletions pvacseq/lib/pipeline.py
Original file line number Diff line number Diff line change
Expand Up @@ -317,16 +317,13 @@ def generate_fasta(self, chunks):
split_fasta_key_file_path = split_fasta_file_path + '.key'
status_message("Generating Variant Peptide FASTA and Key Files - Entries %s" % (fasta_chunk))
generate_fasta_params = {
'input_file' : split_tsv_file_path,
'peptide_sequence_length': self.peptide_sequence_length,
'epitope_length' : min(self.epitope_lengths),
'output_file' : split_fasta_file_path,
'output_key_file' : split_fasta_key_file_path,
'input_file' : split_tsv_file_path,
'peptide_sequence_length' : self.peptide_sequence_length,
'epitope_length' : min(self.epitope_lengths),
'output_file' : split_fasta_file_path,
'output_key_file' : split_fasta_key_file_path,
'downstream_sequence_length': self.downstream_sequence_length,
}
if self.downstream_sequence_length:
generate_fasta_params['downstream_sequence_length'] = self.downstream_sequence_length
else:
generate_fasta_params['downstream_sequence_length'] = None
fasta_generator = FastaGenerator(**generate_fasta_params)
fasta_generator.execute()
status_message("Completed")
Expand Down Expand Up @@ -414,16 +411,13 @@ def generate_fasta(self, chunks):
split_fasta_key_file_path = split_fasta_file_path + '.key'
status_message("Generating Variant Peptide FASTA and Key Files - Entries %s" % (fasta_chunk))
generate_fasta_params = {
'input_file' : split_tsv_file_path,
'peptide_sequence_length': self.peptide_sequence_length,
'epitope_length' : 9,
'output_file' : split_fasta_file_path,
'output_key_file' : split_fasta_key_file_path,
'input_file' : split_tsv_file_path,
'peptide_sequence_length' : self.peptide_sequence_length,
'epitope_length' : 9,
'output_file' : split_fasta_file_path,
'output_key_file' : split_fasta_key_file_path,
'downstream_sequence_length': self.downstream_sequence_length,
}
if self.downstream_sequence_length:
generate_fasta_params['downstream_sequence_length'] = self.downstream_sequence_length
else:
generate_fasta_params['downstream_sequence_length'] = None
fasta_generator = FastaGenerator(**generate_fasta_params)
fasta_generator.execute()
status_message("Completed")
Expand Down

0 comments on commit 781db86

Please sign in to comment.