def clean_consensus_outputs( dir_path, output_file ): for filename in os.listdir( dir_path ): file_path = os.path.join( dir_path, filename ) if file_path.endswith('_input.fa'): os.remove( file_path ) elif file_path.endswith('_input.fa.aln'): os.remove( file_path ) elif file_path.endswith('_input.fa.aln_unsorted'): os.remove( file_path ) write_dummy_file( output_file )
def clean_consensus_outputs(dir_path, output_file): for filename in os.listdir(dir_path): file_path = os.path.join(dir_path, filename) if file_path.endswith('_input.fa'): os.remove(file_path) elif file_path.endswith('_input.fa.aln'): os.remove(file_path) elif file_path.endswith('_input.fa.aln_unsorted'): os.remove(file_path) write_dummy_file(output_file)
def cleanup_uchime_output(self, screenedFile): outputFile = self.process_setup(screenedFile, 'UchimeCleanup', suffix='uchime.cleanup') uchimePath = os.getcwd() for filename in os.listdir(uchimePath): if filename.endswith('_formatted'): file_path = os.path.join(uchimePath, filename) os.remove(file_path) write_dummy_file(outputFile) self.process_cleanup(output_file=outputFile) return outputFile
def cleanup_uchime_output( self, screenedFile ): outputFile = self.process_setup( screenedFile, 'UchimeCleanup', suffix='uchime.cleanup' ) uchimePath = os.getcwd() for filename in os.listdir( uchimePath ): if filename.endswith('_formatted'): file_path = os.path.join( uchimePath, filename ) os.remove( file_path ) write_dummy_file( outputFile ) self.process_cleanup(output_file=outputFile) return outputFile