[Biopython] not technically a biopython question
George Devaniranjan
devaniranjan at gmail.com
Mon Oct 8 12:06:52 EDT 2012
Thank you Frederic but I have tried that and what it gives is :
VUVVDDRVDDVGVUVV
It basically joins all the tetramers together and I want them separately.
On Mon, Oct 8, 2012 at 12:02 PM, Frédéric Sohm <sohm at inaf.cnrs-gif.fr>wrote:
> Hi,
>
>
> if nBasinSeq not in potBasin[nCatSeq] :
> potBasin[nCatSeq] = potBasin[nCatSeq] + (nBasinSeq,)
>
> or shorter
>
> if nBasinSeq not in potBasin[nCatSeq] :
> potBasin[nCatSeq] += (nBasinSeq,)
>
> Regards,
>
> Fred
>
>
> On 08/10/12 17:29, George Devaniranjan wrote:
>
>> Hi guys,
>>
>> I am working on some FASTA like sequences (not FASTA but something I have
>> defined thats similar for some culled PDB from the PISCES server)
>>
>> I have a question:
>>
>> I have a small no of sequences called nCatSeq, for which there are
>> MULTIPLE
>> nBasinSeq, I go through a a large PDB file and I want to extract for for
>> each nCatSeq the corresponding nBasinSeq without redundancies in a
>> dictionary. The code snippet that does this is given below.
>>
>> nCatSeq=item[1][n]+item[1][n+**1]+item[1][n+2]+item[1][n+3]
>> nBasinSeq=item[2][n]+item[2][**n+1]+item[2][n+2]+item[2][n+3]
>>
>>
>> if nCatSeq not in potBasin:
>> potBasin[nCatSeq]=nBasinSeq
>> else:
>> if nBasinSeq not in potBasin[nCatSeq]:
>> potBasin[nCatSeq]=potBasin[**nCatSeq],nBasinSeq
>> else:
>>
>> pass
>>
>>
>>
>>
>> I get the following as the answer for one nCatSeq,
>> '4241': ((('VUVV', 'DDRV'), 'DDVG'), 'VUVV')
>>
>>
>> what I want however is :
>>
>> '4241': ('VUVV', 'DDRV', 'DDVG', 'VUVV')
>>
>> I don't want all the extra brackets due to the following command
>> potBasin[nCatSeq]=potBasin[**nCatSeq],nBasinSeq
>> (see above code snippet)
>>
>> Is there a way to do this ?
>>
>> Thank you,
>> George
>> ______________________________**_________________
>> Biopython mailing list - Biopython at lists.open-bio.org
>> http://lists.open-bio.org/**mailman/listinfo/biopython<http://lists.open-bio.org/mailman/listinfo/biopython>
>>
>>
> --
> Frédéric Sohm
> GIS AMAGEN CNRS INRA
> Equipe INRA U1126 "Morphogenèse du système nerveux des Chordés"
> UPR 3294 NED, CNRS
> Institut de Neurobiologie A. Fessard
> 1 Avenue de la Terrasse
> 91 198 GIF-SUR -YVETTE
> FRANCE
> Phone: 33 1 69 82 34 12
> Fax: 33 1 69 82 41 67
> email: sohm at inaf.cnrs-gif.fr
>
More information about the Biopython
mailing list