def seq(self):
        """Seq: Get the Seq object from the sequence file, metadata file, or in memory"""

        if self.sequence_file:
            log.debug('{}: reading sequence from sequence file {}'.format(self.id, self.sequence_path))
            tmp_sr = SeqIO.read(self.sequence_path, 'fasta')
            return tmp_sr.seq

        elif self.metadata_file:
            log.debug('{}: reading sequence from metadata file {}'.format(self.id, self.metadata_path))
            tmp_sr = SeqIO.read(self.metadata_path, 'uniprot-xml')
            return tmp_sr.seq

        else:
            if not self._seq:
                log.debug('{}: no sequence stored in memory'.format(self.id))
            else:
                log.debug('{}: reading sequence from memory'.format(self.id))

            return self._seq
def seq ( self ) : if self . sequence_file : log . debug ( '{}: reading sequence from sequence file {}' . format ( self . id , self . sequence_path ) ) tmp_sr = SeqIO . read ( self . sequence_path , 'fasta' ) return tmp_sr . seq elif self . metadata_file : log . debug ( '{}: reading sequence from metadata file {}' . format ( self . id , self . metadata_path ) ) tmp_sr = SeqIO . read ( self . metadata_path , 'uniprot-xml' ) return tmp_sr . seq else : if not self . _seq : log . debug ( '{}: no sequence stored in memory' . format ( self . id ) ) else : log . debug ( '{}: reading sequence from memory' . format ( self . id ) ) return self . _seq
Seq: Get the Seq object from the sequence file, metadata file, or in memory