def get_output_filepaths(output_dir, fasta_fp):
 fasta_extensions = ['.fa', '.fasta', '.fna']
 curr_fasta_out = basename(fasta_fp)
 for fasta_extension in fasta_extensions:
  curr_fasta_out = curr_fasta_out.replace(fasta_extension, '')
 curr_fasta_out += '_rev_primer_truncated.fna'
 output_fp = join(output_dir, curr_fasta_out)
 log_fp = join(output_dir, 'rev_primer_truncation.log')
 return (output_fp, log_fp)

def get_output_filepaths ( output_dir , fasta_fp ) : fasta_extensions = [ '.fa' , '.fasta' , '.fna' ] curr_fasta_out = basename ( fasta_fp ) for fasta_extension in fasta_extensions : curr_fasta_out = curr_fasta_out . replace ( fasta_extension , '' ) curr_fasta_out += '_rev_primer_truncated.fna' output_fp = join ( output_dir , curr_fasta_out ) log_fp = join ( output_dir , 'rev_primer_truncation.log' ) return ( output_fp , log_fp )
returns output fasta filepath and log filepath fasta_fp: fasta filepath output_dir: output directory .