Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Tertiary structure preprocessing #32

Open
chris-clem opened this issue Jul 3, 2019 · 4 comments
Open

Tertiary structure preprocessing #32

chris-clem opened this issue Jul 3, 2019 · 4 comments

Comments

@chris-clem
Copy link

chris-clem commented Jul 3, 2019

Hi,

thanks for putting this online, it is really nice to work with!

I have a question regarding the preprocessing step of the tertiary structure that you mentioned here.
The coordinates before and after converting don't seem be the same. If I run preproccessing with some debug comments, I get the following output:

Starting pre-processing of raw data...
['openprotein/data/raw/validation']
Preprocessed file for validation already exists.
force_pre_processing_overwrite flag set to True, overwriting old file...
Processing raw data file validation
2WXZ_2_C
	Dropping protein as number of sequences too high: 35243
3U88_2_M
	tertiary_masked.shape: torch.Size([56, 9])
	tertiary_masked[0,:]: tensor([-6941.7002,  5551.7002,  2541.6001, -7005.3999,  5538.0000,  2410.3000, -6965.1001,  5409.6001,  2334.6001])
	tertiary_masked[1,:]: tensor([-6835.1001,  5380.7002,  2325.8000, -6792.2998,  5252.7002,  2270.3000, -6812.8999,  5146.2002,  2374.8999])
	tertiary_masked[2,:]: tensor([-6875.3999,  5036.0000,  2335.2000, -6907.0000,  4930.5000,  2430.2000, -6864.2998,  4792.3999,  2382.1001])

	tertiary.shape: torch.Size([56, 9])
	tertiary[0,:]: tensor([ 0.0000,  0.0000,  0.0000,  0.7661,  1.2405,  0.0000, -0.1526,  2.4556, 0.0000])
	tertiary[1,:]: tensor([-1.1318,  2.4505, -0.8981, -2.1765,  3.4677, -0.8982, -3.2035,  3.2030, 0.1952])
	tertiary[2,:]: tensor([-3.5200,  4.2382,  0.9657, -4.4314,  4.1019,  2.0955, -5.5110,  5.1761, 2.0654])

Shouldn't tertiary_reshaped and tertiary give the same coordinates? Or am I on a completely wrong path?

Best
Christoph

@lucidrains
Copy link

Any news on this? I'd like to build on top of this repo, but I don't know if I should seeing these issues

@jeppe-dev
Copy link
Collaborator

Hi @lucidrains , we are pushing an update next week that uses continues integration to test various parts of the code base and I’ll try to include the above too. Thanks!

@kuangluvasuka
Copy link

kuangluvasuka commented Feb 7, 2020

Hi @jeppe-biolib , I observed the same problem. Also, another potential problem is that in ProteinNet some protein sequences have missing tertiary coordinates, which are indicated in the MASK entry, and these missing values can be ANYWHERE in the sequence, like the sample file shows missing values in the beginning and middle. But In the coord->angle->coord conversion it seems that you mask out these missing values using torch.masked_select here,
pos = torch.masked_select(torch.Tensor(tertiary_padded), mask).view(9, -1).transpose(0, 1).unsqueeze(1) / 100
resulting a shorter sequence, then use it to compute angle and convert it back. The converted tertiary coordinates are in fact shorter than the original in the sequence dimension, though the final padding step can guarantee a uniform length with zeros only at the END. So I guess the conversion changes the coordinate arrangement?

Also, the above code 'pos' is divided by 100, is there any reason for that?

@amanda-biolib
Copy link

Hey all of you,
thanks for making us aware of these issues. We are working on finding out what happens with the reshaped tertiary, and we are changing the algorithm to discard proteins with internal missing coordinates while allowing for N-terminal missing coordinates by truncating the protein.
@kuangluvasuka, the reason for dividing by 100 is for converting to Ångstrøm.
Best,
Amanda

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants