I am working on some FASTA-like sequences (not FASTA, but something that I have determined is similar for some rejected PDBs from the PISCES server).
I have a question. I have a small number of sequences called nCatSeq for which there is a MULTIPLE nBasinSeq . I am browsing a large PDB file and I want to extract for each nCatSeq corresponding nBasinSeq without redundancy in the dictionary. Below is a snippet of code that does this.
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 an answer for one nCatSeq,
'4241': ((('VUVV', 'DDRV'), 'DDVG'), 'VUVV')
I want:
'4241': ('VUVV', 'DDRV', 'DDVG', 'VUVV')
I don't need all the extra brackets due to the following command
potBasin[nCatSeq]=potBasin[nCatSeq],nBasinSeq
(see code snippet above)
Is there any way to do this?
user1729355
source share