def _check_nuclotide_seqs(self, seq_files): """Check if files contain sequences in nucleotide space. Parameters ---------- seq_files : iterable Sequence files to check. Returns ------- boolean True if files can be treated as containing nucleotide sequences. """ for seq_file in seq_files: if os.stat(seq_file).st_size == 0: continue if not seq_io.is_nucleotide(seq_file): print( 'Expected all files to contain sequences in nucleotide space.' ) print( 'File %s appears like it may contain amino acids sequences.' % seq_file) yes_response = query_yes_no( 'Do all files contain only nucleotide sequences?', default='no') if not yes_response: return False return True
def _check_nuclotide_seqs(self, seq_files): """Check if files contain sequences in nucleotide space. Parameters ---------- seq_files : iterable Sequence files to check. Returns ------- boolean True if files can be treated as containing nucleotide sequences. """ for seq_file in seq_files: if not seq_io.is_nucleotide(seq_file): print('Expected all files to contain sequences in nucleotide space.') print('File %s appears like it may contain amino acids sequences.' % seq_file) yes_response = query_yes_no('Do all files contain only nucleotide sequences?', default='no') if not yes_response: return False return True