def conservtion_profile_pid(region, genome_alignment,<EOL>mi_seqs=MissingSequenceHandler.TREAT_AS_ALL_GAPS,<EOL>species=None):
res = []<EOL>s = region.start if region.isPositiveStrand() else region.end - <NUM_LIT:1><EOL>e = region.end if region.isPositiveStrand() else region.start - <NUM_LIT:1><EOL>step = <NUM_LIT:1> if region.isPositiveStrand() else -<NUM_LIT:1><EOL>for i in range(s, e, step):<EOL><INDENT>try:<EOL><INDENT>col = genome_alignment.get_column(region.chrom, i, mi_seqs, species)<EOL>res.append(pid(col))<EOL><DEDENT>except NoSuchAlignmentColumnError:<EOL><INDENT>res.append(None)<EOL><DEDENT>except NoUniqueColumnError:<EOL><INDENT>res.append(None)<EOL><DEDENT><DEDENT>return res<EOL>
build a conservation profile for the given region using the genome alignment.

The scores in the profile will be the percent of bases identical to the
reference sequence.

:param miss_seqs: how to treat sequence with no actual sequence data for
                  the column.
:return: a list of the same length as the region where each entry is the
         PID at the corresponding locus.