<html><head><meta http-equiv="Content-Type" content="text/html charset=us-ascii"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;">Hi biopython community,<div><br></div><div>Many thanks for the help me with a previous problem. It turned to be vital and help me move forward.</div><div>Unfortunately I have got another conundrum that I can't solve easily.</div><div><br></div><div>I am trying to use clustalW command tool in biopython on following set of sequences</div><blockquote style="margin: 0 0 0 40px; border: none; padding: 0px;"><div><blockquote type="cite">{'pre-miR-344f': 'AGUCAGUCUCCUGGCUGGAGUCCAGCUCUAAGCUGGUUCCAGGCUCUAGCCAGGACCUGACUAC\n', 'pre-miR-9': 'UCUUUGGUUAUCUAGCUGUAUGAGUGGUGUGGAGUCUUCAUAAAGCUAGAUAACCGAAAGU\r\n', 'pre-miR-210': 'CCGGGGCAGUCCCUCCAGGCUCAGGACAGCCACUGCCCACCGCACACUGCGUUGCUCCGGACCCACUGUGCGUGUGACAGCGGCUGA'}</blockquote></div></blockquote><div><br></div><div>First I processed them and converted them to fasta files using and saved into TL variable</div><blockquote style="margin: 0 0 0 40px; border: none; padding: 0px;"><div><blockquote type="cite">def get_fasta_composite(self,name):</blockquote></div><div><blockquote type="cite"> self.name=name</blockquote></div><div><blockquote type="cite"> file_name=raw_input('How do you want call the file?')</blockquote></div><div><blockquote type="cite"> my_file = open(file_name + '.fasta', 'w')</blockquote></div><div><blockquote type="cite"> for key,values in self.name.items():</blockquote></div><div><blockquote type="cite"> my_file.write('>' + key + ' type ' + '\n' + self.name.get(key) + '\n')</blockquote></div><div><blockquote type="cite"> print('>' + key + ' type ' + '\n' + self.name.get(key))</blockquote></div><div><blockquote type="cite"> my_file.close()</blockquote></div><div><blockquote type="cite"> print('The file was saved as ' + file_name + '.fasta\n')</blockquote></div><div><blockquote type="cite"> depo = file_name + '.fasta'</blockquote></div><div><blockquote type="cite"> return depo</blockquote></div></blockquote><div><br></div><div><span class="Apple-tab-span" style="white-space:pre">                </span>Output:</div><div><br></div><div><div></div></div><blockquote style="margin: 0 0 0 40px; border: none; padding: 0px;"><blockquote type="cite"><div><div>Saving Terminal loops</div></div></blockquote><blockquote type="cite"><div><br></div></blockquote><blockquote type="cite"><div>How do you want call the file?loops</div></blockquote><blockquote type="cite"><div>>pre-miR-344f type </div></blockquote><blockquote type="cite"><div>CCAGCUCUAAGCUGGUUCCAGGC</div></blockquote><blockquote type="cite"><div>>pre-miR-9 type </div></blockquote><blockquote type="cite"><div>GAGUGGUGUGGAGUCUUCAUA</div></blockquote><blockquote type="cite"><div>>pre-miR-210 type </div></blockquote><blockquote type="cite"><div>CAGGACAGCCACUGCCCACCGCACACUGCGUUGCUCCGGACCCAC</div></blockquote><blockquote type="cite"><div>The file was saved as loops.fasta</div></blockquote></blockquote><div><br></div>and the I used following command to produce alignment<div><br></div><blockquote style="margin: 0 0 0 40px; border: none; padding: 0px;"><div></div><blockquote type="cite"><div><div>#aligning TL</div></div><div><div>test3=tollbox()</div></div><div><div>attempt=test3.align(TL)</div></div><div><div>alignment=AlignIO.read(attempt, "clustal")</div></div><div><div>print(alignment)</div></div><div><div>print("\n")</div></div></blockquote></blockquote><div><div><br></div></div><div>and align method was defined as follows</div><div><br></div><blockquote style="margin: 0 0 0 40px; border: none; padding: 0px;"><div><blockquote type="cite"><div>def align(self, name):</div></blockquote></div><div><blockquote type="cite"><div> self.name=name</div></blockquote></div><div><blockquote type="cite"><div> print('This is alignment of '+self.name)</div></blockquote></div><div><blockquote type="cite"><div> cline = ClustalwCommandline("/Users/s1159142/clustalw_2.1/clustalw2", infile=self.name)</div></blockquote></div><div><blockquote type="cite"><div>## cline = ClustalwCommandline("/Users/user/BioinformaticsTools/clustalw_2.1", infile=self.name)</div></blockquote></div><div><blockquote type="cite"><div> output_file = self.name.rstrip("fasta")</div></blockquote></div><div><blockquote type="cite"><div> return output_file + "aln"</div></blockquote><br></div></blockquote>TL variable is ascribed by get_fasta_composite method from above<div>but unfortunately print(alignment) limits itself to only two first sequences from the loops.fasta file</div><div><br></div><div>this is output:</div><div><br></div><blockquote style="margin: 0 0 0 40px; border: none; padding: 0px;"><div><blockquote type="cite"><div>This is alignment of loops.fasta</div></blockquote></div><div><blockquote type="cite"><div>SingleLetterAlphabet() alignment with 2 rows and 22 columns</div></blockquote></div><div><blockquote type="cite"><div>CCAGCUCUAAGCUGGUUCCAGG pre-miR-344f</div></blockquote></div><div><blockquote type="cite"><div>-GAGUGGUGUGGAGUCUUCAUA pre-miR-9</div></blockquote><br></div></blockquote><div>It is not the length of the last sequence. As I tried to substitute it for some similar and add also one more and I always got alignment of only first two sequences. </div>I would be grateful if anyone can point the origin of problem.<div><br></div><div>Thanks,</div><div><br></div><div>Jakub<br><div><div></div></div><div><div><div></div></div><div><br></div></div></div></body></html>