I have not checked the rest of your code, but:
> for line in seqalign:
> for i in len(finalmotif_seqs): # for item in finalmotif_seqs:
> for i in len(finalmotif_annot): # for item in finalmotif_annot:
I see two problems here:
1. You are using the same loop variable in both lo
CC'd to list
> Thanks for your suggestions. I now see I was using far too much unnecessary
> code plus data structures (lists) that were useless. I modified the entire
> program to the following lines based on suggestions from yourself and
> other people on the mailing list:
> import os, st
"Spyros Charonis" wrote
motif_file = open('myfolder/pythonfiles/final motifs_11SGLOBULIN',
'r')
align_file = open('myfolder/pythonfiles/11sglobulin.seqs', 'a+')
finalmotif_seqs = []
finalmotif_length = [] # store length of each motif
finalmotif_annot = []
finalmotifs = motif_file.readlin
On 5/4/2011 2:31 PM, Spyros Charonis wrote:
Hello everyone,
I have written a program, as part of a bioinformatics project, that
extracts motif sequences (programmatically just strings of letters)
from a database and writes them to a file.
I have written another script to annotate the database
ad=jpmchase....@python.org] On Behalf Of Spyros
Charonis
Sent: Wednesday, May 04, 2011 1:31 PM
To: tutor
Subject: [Tutor] triple-nested for loop not working
Hello everyone,
I have written a program, as part of a bioinformatics project, that extracts
motif sequences (programmatically just strings
On Wed, May 4, 2011 at 13:31, Spyros Charonis wrote:
> Hello everyone,
>
> I have written a program, as part of a bioinformatics project, that
> extracts motif sequences (programmatically just strings of letters) from a
> database and writes them to a file.
> I have written another script to anno
Hello everyone,
I have written a program, as part of a bioinformatics project, that extracts
motif sequences (programmatically just strings of letters) from a database
and writes them to a file.
I have written another script to annotate the database file (in plaintext
ASCII format) by replacing ev