dancsi / OrthoCCTools

Computational coiled-coil peptide design toolkit, written in modern C++
https://www.dancsi.net/icipa
MIT License
3 stars 2 forks source link

Implement another scoring function (qCIPA) #18

Open ajasja opened 6 years ago

ajasja commented 6 years ago

The scoring function is given in image

Crooks Mason Biochemistry -2017- Computational Prediction and Design for Creating Iteratively Larger Heterospecific Coiled Coil Sets.pdf

It's very similar to bCIPA, so this should be relatively easy.

dancsi commented 6 years ago

Am I right that in this case, II, IN and NN are just the numbers of such residue pairs found at positions a and a', and EE, EK, KK the same, but for positions g and e'(in the next heptad, so position i in chain 1, and i+5 in chain 2)? Why do they even mention that they allow L at position d when they don't use it later (except for helical propensity)?

dancsi commented 6 years ago

I implemented it, scores for #16 look OK, but scores for PNIC do not (the set does not seem to be orthogonal). Is this reasonable?

ajasja commented 6 years ago

@dancsi The pairs are counted a-a' and e-g' and g-e'. So these are the nonpolar ones (a-a' and d-d'). The d sites are all L in their case, so for the scoring function it does not matter what the value of the d-d term is. image

And the charged interactions are e-g' and g-e' image

So assuming that f is the first register (and using 0-indexing), the a-a' pairs (chain 1, chain 2) would be 2-2, 9-9, etc... the g-e' would be 1-6, 8-14 etc.. and the e-g' 6-1, 14-8 etc...

So in short I think you forgot the other half of the electrostatic interactions:) All the other pairs are ignored. @andy-brodnik this is also relevant to predicting a better scoring function:)

dancsi commented 6 years ago

I think I have implemented the thing correctly, since I am adding the interactions between both (chain1[i] and chain2[i+5]) and (chain2[i] and chain1[i+5]) for all i's that correspond to g positions

ajasja commented 6 years ago

Yup, I agree, it's fine. Do you have an image for the PNIC set?

dancsi commented 6 years ago

I am making them.

dancsi commented 6 years ago

Truncated: pnic-qcipa-truncated Not truncated: pnic-qcipa

ajasja commented 6 years ago

Nope that can't be right, something is wrong with this qCIPA (not necessarily with your implementation, might also be a mistake in the paper).

dancsi commented 6 years ago

Yep, it seems strange to me as well. Our coefficients for bCIPA are slightly different, as somebody converted its output to degrees Celsius, and the b coefficient is different as well.

dancsi commented 6 years ago

Have we found out something? I have corrected an uninitialized variable bug in qCIPA, but the results still look off. Here is the new graph: qcipa

dancsi commented 6 years ago

If I run fastscore.exe ..\data\PNIC.fasta --score-func=qcipa --orientation=both --max-heptad-displacement=2 --truncate=0, at least the range is OK, but it still does not seem orthogonal enough: qcipa

ajasja commented 6 years ago

Can you try just

fastscore.exe ..\data\PNIC.fasta --score-func=qcipa --orientation=P --max-heptad-displacement=0

This still looks off, although as you have correctly observed, the range is OK:)

On 21 January 2018 at 21:17, Daniel Siladji notifications@github.com wrote:

If I run fastscore.exe ..\data\PNIC.fasta --score-func=qcipa --orientation=both --max-heptad-displacement=2 --truncate=0, at least the range is OK, but it still does not seem orthogonal enough: [image: qcipa] https://user-images.githubusercontent.com/405156/35198530-7f56da44-fef0-11e7-843d-5e15accbaf7f.png

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/dancsi/DiplomaThesis/issues/18#issuecomment-359277232, or mute the thread https://github.com/notifications/unsubscribe-auth/AABN1sDeGl3Atawp6By8QJZZ4lmYuY7Gks5tM5tlgaJpZM4RB0Sm .

dancsi commented 6 years ago

Garbage :( qcipa Keep in mind that the temperature scale is reversed, so P1, P1 melts at -500C xD

ajasja commented 6 years ago

Can you perhaps rewrite qcipa with the same machinery that BCIPA is using? (Basically just counting the interactions and looking up values in a dictionary? I saw you wanted to make it as fast as possible, but at this point reliable and easy to implement new terms is probably more important:)

On 21 January 2018 at 21:39, Daniel Siladji notifications@github.com wrote:

Garbage :( [image: qcipa] https://user-images.githubusercontent.com/405156/35198733-9077a896-fef3-11e7-882c-0310eccc9622.png

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/dancsi/DiplomaThesis/issues/18#issuecomment-359278936, or mute the thread https://github.com/notifications/unsubscribe-auth/AABN1surqhT7W2MvMW2z4GWZvQZMJ4pfks5tM6CFgaJpZM4RB0Sm .

ajasja commented 6 years ago

(QCIPA is basically a simplified BCIPA)

On 21 January 2018 at 22:04, Ajasja Ljubetič ajasja.ljubetic@gmail.com wrote:

Can you perhaps rewrite qcipa with the same machinery that BCIPA is using? (Basically just counting the interactions and looking up values in a dictionary? I saw you wanted to make it as fast as possible, but at this point reliable and easy to implement new terms is probably more important:)

On 21 January 2018 at 21:39, Daniel Siladji notifications@github.com wrote:

Garbage :( [image: qcipa] https://user-images.githubusercontent.com/405156/35198733-9077a896-fef3-11e7-882c-0310eccc9622.png

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/dancsi/DiplomaThesis/issues/18#issuecomment-359278936, or mute the thread https://github.com/notifications/unsubscribe-auth/AABN1surqhT7W2MvMW2z4GWZvQZMJ4pfks5tM6CFgaJpZM4RB0Sm .

dancsi commented 6 years ago

Sure, I can certainly try.

dancsi commented 6 years ago

I pushed those changes to a new branch (commit 5de1a8da937dfc2d6fea84f74ca0498785f48568), but the results are still the same: qcipa

dancsi commented 6 years ago

What if we asked the qCIPA people directly for their code? In the supplementary material, they say that the code is freely available upon request.

ajasja commented 6 years ago

Sure, I'll write them.

PS: I think you can merge this into the master?

Best, Ajasja

On 22 January 2018 at 10:41, Daniel Siladji notifications@github.com wrote:

What if we asked the qCIPA people directly for their code? In the supplementary material, they say that the code is freely available upon request.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/dancsi/DiplomaThesis/issues/18#issuecomment-359371265, or mute the thread https://github.com/notifications/unsubscribe-auth/AABN1ptRBU82v6KSxyZJ_8c1EwJVocXAks5tNFfJgaJpZM4RB0Sm .

dancsi commented 6 years ago

Great! I have factored out the common parts, and merged the changes into master.