[Chimera-users]
Sabuj Pattanayek
sabuj.pattanayek at vanderbilt.edu
Tue Aug 9 14:01:16 PDT 2005
Hi,
Yeah, I just remembered a second ago and googled to make sure this was
the problem.
http://www.secnetix.de/~olli/Python/block_indentation.hawk
..i need to learn python..
It works perfectly now. There was only one slight cosmetic error when I
loaded the fasta file in the multi-align viewer. It showed the Consensus
and Conservation rows but in the Analysis settings under preferences
both were set to "None". Setting it to something besides "None" and
setting it back to "None" fixed it.
Thanks for your help,
..Sabuj
Eric Pettersen wrote:
> Hi Sabuj,
> It is the indentation. In Python, indentation is meaningful and
> statements at the same "level" have to have the same indentation. I've
> appended the critical part below. Note the the "self.rulerTexts..."
> and "x += ..." statements are indented one space further than the
> preceding if/else and "text = ..." statements. To Python, the extra
> space starts a new indented block of statements, which is only legal
> after 'if' statements and so forth. Take a space away from the front
> of the last two statements and I think things will work.
>
> --Eric
>
>
>
> for chunkStart in range(self.seqOffset, end, 10):
> seq1index = self.seqs[0].gapped2ungapped
> (chunkStart)
> if seq1index is None:
> dispText = "?"
> else:
> dispText = str(seq1index+1)
> text = self.mainCanvas.create_text(x, y,
> anchor='s',
> font=self.font, text="%s" % (dispText))
> self.rulerTexts.append(text)
> x += self.chunkGap + 10 * (self.fontPixels[0]
> +
> self.letterGaps[0])
>
More information about the Chimera-users
mailing list