Rappsilber-Laboratory / build-xiview

GNU General Public License v3.0
2 stars 0 forks source link

AlphaLink2 export #106

Closed colin-combe closed 3 months ago

colin-combe commented 3 months ago

grandrea commented on Oct 3, 2023 alphalink2 takes crosslink restraints with the space separated format

chain residue chain residue fdr

where "fdr" is the local fdr of the restraint, but could also be left as a default 0.05.

from the 3d window, chain could be the pdb chain. But normally, alphalink is run from sequence alone, to predict structure. Chains are then the 1st, 2nd etc proteins that appear in the sequence file.

I wish there was a way to select proteins and export a fasta file with sequences in an order, and an alphalink2 restraint file with A as the first sequence, B as the second, etc. If not possible to export two files, at least the restraint file with in the name the order of the proteins.

@grandrea grandrea changed the title feature request - xiview alphalink2 export from 3d window or from selection xiview feature request - xiview alphalink2 export from 3d window or from selection on Oct 3, 2023 @colin-combe colin-combe commented on Oct 3, 2023 is the 3d window the right place to have this? i'm thinking not since that would make the alphalink2 export dependent on having a 3d structure? I guess from selection makes more sense. I think exporting two files is possible.

@grandrea Author grandrea commented on Oct 3, 2023 no, the best would be from selection. I just thought 3d window would be easier to implement (one runs AF, gets a model, uploads, downloads, runs alphalink - so... bit of a shitty workflow). Selection is ideal

colin-combe commented 3 months ago

@lhatsk @grandrea - there's a first pass at AlphaLink2 export deployed on xiview.org, e.g. https://xiview.org/network.php?upload=25971-27666-45483-16084-29744

The export option is in the top 'EXPORT' menu, you need to have proteins selected to get anything (you can select multiple proteins by CTRL-click)

an issue came up to do with stoichiometry -

[should be] repeated as two different chains in the CSV and the crosslinks should also be repeated so if you have homodimer A, there should be two sequences A and B and crosslinks from A to A and from A to B because of the ambiguity

so, to set the stoichiometry of proteins in alphalink export there is an option in the protein's right click context menu, let me know if you can't find that or don't think the way this works make sense.

the code that is dealing with this is here: https://github.com/Rappsilber-Laboratory/xiview/blob/main/js/downloads.js#L497-L552 you may be able to follow the logic of that, or perhaps spot a mistake. It's a first pass at it... currently i think it's right...

where "fdr" is the local fdr of the restraint, but could also be left as a default 0.05.

ah, i set it to 0.1 for time being, i can change that

colin-combe commented 3 months ago

regarding the 26 character limit for chains, Uni-Fold internally allows 62 with this: “ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789”

OK, changed that (@lhatsk)

Also, it is now always writing out 0.05 as FDR (as opposed to 0.1)