Logo Search packages:      
Sourcecode: python-biopython version File versions

def Bio::GenBank::Record::Record::_locus_line (   self  )  [private]

Provide the output string for the LOCUS line.

Definition at line 212 of file Record.py.

00212                          :
        """Provide the output string for the LOCUS line.
        """
        output = "LOCUS"
        output += " " * 7 # 6-12 spaces
        output += "%-9s" % self.locus
        output += " " # 22 space
        output += "%7s" % self.size
        if self.residue_type.find("PROTEIN") >= 0:
            output += " aa"
        else:
            output += " bp "

        # treat circular types differently, since they'll have long residue
        # types
        if self.residue_type.find("circular") >= 0:
             output += "%17s" % self.residue_type
        # second case: ss-DNA types of records
        elif self.residue_type.find("-") >= 0:
            output += "%7s" % self.residue_type
            output += " " * 10 # spaces for circular
        else:
            output += " " * 3 # spaces for stuff like ss-
            output += "%-4s" % self.residue_type
            output += " " * 10 # spaces for circular

        output += " " * 2
        output += "%3s" % self.data_file_division
        output += " " * 7 # spaces for 56-63
        output += "%11s" % self.date
        output += "\n"
        return output

    def _definition_line(self):


Generated by  Doxygen 1.6.0   Back to index