[Tutor] List of Lists for three Frames

Wolfgang Maier wolfgang.maier at biologie.uni-freiburg.de
Mon May 19 11:42:17 CEST 2014


On 17.05.2014 15:26, Alan Gauld wrote:
> On 17/05/14 08:01, ani wrote:
>> So I thought it would be cool to read a sequence at three different
>> frames,
>
> A sequence of what?
> And whats a frame in this context?
>
>> ...I've come across a conundrum: how to make a list of lists.
>
> outerlist = []
> innerlist = [1,2,3]
> outerlist.append(innerlist)
> outerlist.append([4,5,6])
>
>
> print (outerlist[1][1])  # prints 5
>
>> type of frame with a + or a - to signify the direction of the read
>> (+1,+2,
>> +3, -1, -2, -3),
>
> What does 'direction of the read mean'?
>
>> the numerical position of each start codon a
>
> Whats a codon?
>
> This is a list for programmers learning python.
> Do not assume any specialized domain knowledge.
> If you can explain the problem in terms of
> plain English and basic math then we can probably help.
> If you use terms that are either ambiguous or too
> specialized we will be lost and unable to assist.
>
>

The OP is asking about a representation of DNA sequences in Python.
More specifically, his question is about protein coding segments of DNA
that are transcribed into messenger RNA, then translated into protein
using the so-called triplet code (three RNA nucleotides are encoding one
amino acid of the protein). So the question involves a lot of basic
biology (Alan's questions: since three nucleotides stand for one amino
acid there are three different reading frames for any messenger RNA
starting with the first, second and third nucleotide, respectively; the
orignal DNA is an anti-parallel double strand and either strand may be
transcribed, so 'direction' refers to this; a codon is a specific
triplet of nucleotides).

Ani: While I could help you with your question, I agree with Peter that
you need to define much more clearly what you are trying to do before we
can discuss any code here. In principle, he's also right that you should
look into biopython because that package might well be the right thing
for you, but that, again, is hard to tell without knowing the details of
what you are trying to do.

Best wishes,
Wolfgang



More information about the Tutor mailing list