wlsong / PyLipID

A python toolkit for analysing membrane protein-lipid interactions.
https://pylipid.readthedocs.io
MIT License
60 stars 28 forks source link

LogomakerError #5

Closed poojari1 closed 4 years ago

poojari1 commented 4 years ago

Dear Wanling,

I am trying to analyze my coarse grained simulations using PyLipID tool. I get below logomaker error. Please can I know what may be going wrong. I have also included the command I am running.

########################################################################################### Traceback (most recent call last): File "pylipid.py", line 1333, in li.plot_interactions(item="Duration", letter_map=letter_map) File "pylipid.py", line 1214, in plot_interactions logomaker.Logo(matrix[(idx-1)100+length:idx100+length], color_scheme="chemistry", ax=ax) File "/home/users/chetan/anaconda3/envs/PyLipID/lib/python3.7/site-packages/logomaker/src/error_handling.py", line 134, in wrapped_func raise e File "/home/users/chetan/anaconda3/envs/PyLipID/lib/python3.7/site-packages/logomaker/src/error_handling.py", line 102, in wrapped_func result = func(*args, *kwargs) File "/home/users/chetan/anaconda3/envs/PyLipID/lib/python3.7/site-packages/logomaker/src/Logo.py", line 172, in init self._input_checks() File "/home/users/chetan/anaconda3/envs/PyLipID/lib/python3.7/site-packages/logomaker/src/Logo.py", line 224, in _input_checks self.df = validate_matrix(self.df) File "/home/users/chetan/anaconda3/envs/PyLipID/lib/python3.7/site-packages/logomaker/src/error_handling.py", line 134, in wrapped_func raise e File "/home/users/chetan/anaconda3/envs/PyLipID/lib/python3.7/site-packages/logomaker/src/error_handling.py", line 102, in wrapped_func result = func(args, **kwargs) File "/home/users/chetan/anaconda3/envs/PyLipID/lib/python3.7/site-packages/logomaker/src/validate.py", line 58, in validate_matrix check(out_df.shape[0] >= 1, 'df has zero rows. Needs multiple rows.') File "/home/users/chetan/anaconda3/envs/PyLipID/lib/python3.7/site-packages/logomaker/src/error_handling.py", line 56, in check raise LogomakerError(message) logomaker.src.error_handling.LogomakerError: df has zero rows. Needs multiple rows. ###########################################################################################

python pylipid.py -f traj.xtc -c nowat.pdb -cutoffs 0.55 1.0 -lipids PIPC -nprot 1 -save_dataset -pdb nowat.pdb -pymol_gui False -lipid_atoms PO4 -radii BB:0.26 SC1:0.23 -gen_binding_poses 10 -save_pose_format pdb -score_weights PO4:10 -tu ns -resi_list 65-170 588-600 663-770 1187-1200 1263-1370 1786-1800 -stride 50

Kind Regards, Chetan

poojari1 commented 4 years ago

Dear Wanling,

I did some additional tests with the command and I realized that I get logomaker error only when i use the flag -resi_list 65-170 588-600 663-770 1187-1200 1263-1370 1786-1800. Without -resi_list flag the command runs ok.

With -resi_list flag it prints on terminal: 10 residues that showed longest interaction (and their raw interaction durations): . . 10 residues that showed highest lipid occupancy: . . 10 residues that have the largest number of surrounding lipids: . . Creating new director: /data/users/CHETAN/HEXAGONAL/PrV/Interaction_PIPC/Koffs_PIPC

NOTE: Occupancy: percentage of frames where lipid is in contact with the given residue (0-100%); Duration: Average length of a continuous interaction of lipid with the given residue (in unit of ns); LipidCount: Average number of lipid surrounding the given residue within the longer cutoff; Koff: Koff of lipid with the given residue (in unit of (ns)^(-1));

Creating new director: /data/users/CHETAN/Interaction_PIPC/Dataset Creating new director: /data/users/CHETAN/Interaction_PIPC/Figures_PIPC Traceback (most recent call last):

fails with the above logomaker error message

Kind Regards, Chetan

wlsong commented 4 years ago

Hi Chetan, Thanks for your interests in PyLipID. The error seems to suggest that no interaction was detected, which could result from many causes. Could you check if your lipid residue name is PIPC? If so, if you see any lipid interactions from your trajectory?

poojari1 commented 4 years ago

Dear Wanling,

Thanks for your reply.

I do have PIPC lipid residue name. Before using pylipid, i did 2D density map analysis and there are contacts present between protein and PIPC lipids. Hence, wanted to use pylipid to get details in on amino acids interacting with the lipid.

I have attached BindingSites_Info_PIPC.txt file which I get without using -resi_list flag.

BindingSites_Info_PIPC.txt

I have also tested with other membrane with different lipid compositions and again when i used -resi_list, the code doesnt work.

Kind Regards, Chetan

wlsong commented 4 years ago

Hi,

Thanks. It's a bit odd, as -resi_list worked well when we tested on our systems. I wonder if your system has residue index duplicates, that is different residues with the same indices.

poojari1 commented 4 years ago

Dear Wanling,

Thanks for the lead. After trying out different things the code works when i provide '-resi_list' flag the residues separated by comma: -resi_list 65-175,240-260,585-600,663-775,1180-1200,1260-1375,1440-1460,1780-1800

Kind Regards, Chetan

wlsong commented 4 years ago

Thanks for pointing it out. I will sort out that error soon :)

wlsong commented 4 years ago

Issue has been resolved.