def sspro_summary(self):
        """Parse the SSpro output file and return a summary of secondary structure composition.

        The output file is just a FASTA formatted file, so you can get residue level
            information by parsing it like a normal sequence file.

        Returns:
            dict: Percentage of:
                H: helix
                E: strand
                C: the rest

        """
        summary = {}

        records = ssbio.protein.sequence.utils.fasta.load_fasta_file(self.out_sspro)
        for r in records:
            seq_summary = {}
            seq_summary['percent_H-sspro'] = r.seq.count('H')/float(len(r))
            seq_summary['percent_E-sspro'] = r.seq.count('E')/float(len(r))
            seq_summary['percent_C-sspro'] = r.seq.count('C')/float(len(r))

            summary[r.id] = seq_summary

        return summary
def sspro_summary ( self ) : summary = { } records = ssbio . protein . sequence . utils . fasta . load_fasta_file ( self . out_sspro ) for r in records : seq_summary = { } seq_summary [ 'percent_H-sspro' ] = r . seq . count ( 'H' ) / float ( len ( r ) ) seq_summary [ 'percent_E-sspro' ] = r . seq . count ( 'E' ) / float ( len ( r ) ) seq_summary [ 'percent_C-sspro' ] = r . seq . count ( 'C' ) / float ( len ( r ) ) summary [ r . id ] = seq_summary return summary
Parse the SSpro output file and return a summary of secondary structure composition.

        The output file is just a FASTA formatted file, so you can get residue level
            information by parsing it like a normal sequence file.

        Returns:
            dict: Percentage of:
                H: helix
                E: strand
                C: the rest