Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
I
ippidb-web
Manage
Activity
Members
Labels
Code
Merge requests
1
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Operate
Environments
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
iPPIDB
ippidb-web
Commits
e38fcd7a
Commit
e38fcd7a
authored
6 years ago
by
Fabien MAREUIL
Browse files
Options
Downloads
Patches
Plain Diff
method get_molecules
Former-commit-id: be15bd63263293acf0dbbe23e7ad4965ef7b4b10
parent
1e790032
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
pyScripts/get_interface_residues_ppc_dimer_IN_PROGRESS.py
+14
-17
14 additions, 17 deletions
pyScripts/get_interface_residues_ppc_dimer_IN_PROGRESS.py
with
14 additions
and
17 deletions
pyScripts/get_interface_residues_ppc_dimer_IN_PROGRESS.py
+
14
−
17
View file @
e38fcd7a
...
@@ -48,12 +48,12 @@ Return:
...
@@ -48,12 +48,12 @@ Return:
import
os
import
os
import
sys
import
sys
import
argparse
import
argparse
import
textwrap
import
logging
import
logging
import
time
import
time
from
Bio.PDB
import
Select
,
PDBIO
from
Bio.PDB
import
Select
,
PDBIO
from
Bio.PDB.PDBParser
import
PDBParser
from
Bio.PDB.PDBParser
import
PDBParser
from
argparse
import
RawTextHelpFormatter
import
itertools
import
itertools
# =============================================================================
# =============================================================================
...
@@ -140,10 +140,10 @@ def main(pdb, distance):
...
@@ -140,10 +140,10 @@ def main(pdb, distance):
# Save each chain in different file
# Save each chain in different file
for
chain
in
target_partner_chain
:
#
for chain in target_partner_chain:
io
=
PDBIO
()
io
=
PDBIO
()
io
.
set_structure
(
model
)
io
.
set_structure
(
model
)
io
.
save
(
'
{}_{}.pdb
'
.
format
(
pdb_code
,
chain
),
select
=
ChainSelection
(
chain
),
io
.
save
(
'
{}_{}.pdb
'
.
format
(
pdb_code
,
chain
),
select
=
ChainSelection
(
target_partner_
chain
),
preserve_atom_numbering
=
True
)
preserve_atom_numbering
=
True
)
...
@@ -153,11 +153,11 @@ def main(pdb, distance):
...
@@ -153,11 +153,11 @@ def main(pdb, distance):
class
ChainSelection
(
Select
):
class
ChainSelection
(
Select
):
def
__init__
(
self
,
chain
):
def
__init__
(
self
,
chain
s
):
self
.
chain
=
chain
self
.
chain
s
=
chain
s
def
accept_chain
(
self
,
chain
):
def
accept_chain
(
self
,
chain
):
if
chain
.
get_id
()
==
self
.
chain
:
if
chain
.
get_id
()
in
self
.
chain
s
:
return
1
return
1
else
:
else
:
return
0
return
0
...
@@ -297,21 +297,18 @@ def setlogger():
...
@@ -297,21 +297,18 @@ def setlogger():
# =============================================================================
# =============================================================================
if
__name__
==
'
__main__
'
:
if
__name__
==
'
__main__
'
:
parser
=
argparse
.
ArgumentParser
(
description
=
parser
=
argparse
.
ArgumentParser
(
description
=
'''
textwrap
.
dedent
(
'''
1) Format protein/protein complex PDB structure (no ligand)
1) Format protein/protein complex PDB structure (no ligand)
1.a) Number of models
1.a) Number of models
1.b) Alternative atomic locations
1.b) Alternative atomic locations
1.c) Heteroatoms
1.c) Heteroatoms
2) Identify protein/protein interface residues
2) Identify protein/protein interface residues
(for combinations of first chain of each protein)
(for combinations of first chain of each protein)
3) Save each chain in separate files
'''
))
3) Save each chain in separate files
'''
,
formatter_class
=
RawTextHelpFormatter
)
parser
.
add_argument
(
'
pdb
'
,
help
=
parser
.
add_argument
(
'
pdb
'
,
help
=
'''
Input [.pdb file]: PBD 3D structure
textwrap
.
dedent
(
'''
Input [.pdb file]: PBD 3D structure
(with HEADER included)
'''
)
(with HEADER included)
'''
))
parser
.
add_argument
(
'
-d
'
,
dest
=
'
distance
'
,
help
=
'''
Input [float or integer]: distance threshold
parser
.
add_argument
(
'
-d
'
,
dest
=
'
distance
'
,
help
=
{by default, 6 Angstroms}
'''
)
textwrap
.
dedent
(
'''
Input [float or integer]: distance threshold
{by default, 6 Angstroms}
'''
))
options
=
parser
.
parse_args
()
options
=
parser
.
parse_args
()
if
options
.
distance
is
None
:
if
options
.
distance
is
None
:
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment