Skip to content

Commit

Permalink
README file updated, Git repository restructured, Sequence_handler fo…
Browse files Browse the repository at this point in the history
…lder added with sequence analysis tools
  • Loading branch information
Sergi committed Nov 28, 2019
1 parent b6dcf17 commit 6764d17
Show file tree
Hide file tree
Showing 48 changed files with 766 additions and 36 deletions.
Binary file removed Esterases/__pycache__/ActiveSitepKa.cpython-37.pyc
Binary file not shown.
File renamed without changes.
Binary file not shown.
File renamed without changes.
Binary file added PELEAnalysis-Processing/Esterases/Esterase.pyc
Binary file not shown.
File renamed without changes.
File renamed without changes.
File renamed without changes.
70 changes: 70 additions & 0 deletions PELEAnalysis-Processing/Esterases/PDBOpener.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,70 @@
# -*- coding: utf-8 -*-

# Global imports
import glob
import argparse as ap
import pandas as pd

# Script information
__author__ = "Sergi Rodà Llordés"
__version__ ="1.0"
__maintainer__="Sergi Rodà Llordés"
__email__="[email protected]"

def storePDBfilenames(PDBs_to_parse,parser):
"""
It identifies the reports to add to the protein preparation system
PARAMETERS
----------
PDBs_to_parse : list of strings
all the PDB files that want to be added to the analysis
RETURNS
-------
parsed_data : list of PDB filenames (strings)
"""

PDBs = []

for PDBs_list in PDBs_to_parse:
PDB_found = glob.glob(PDBs_list)
if len(PDB_found) == 0:
print("Warning: path to report file \'" +
"{}".format(PDBs_list) + "\' not found.")
for PDB in PDB_found:
PDBs.append(PDB)

if len(PDBs) == 0:
print("Error: list of report files is empty.")
parser.print_help()
exit(1)

return PDBs

def parseArgs():
"""
Parse arguments from command-line
RETURNS
-------
PDBfiles : list
list of PDB files
"""

parser = ap.ArgumentParser()
required = parser.add_argument_group('required arguments')
optional = parser._action_groups.pop()
required.add_argument("-i", "--input", required=True, metavar="FILE",
type=str, nargs='*', help="path to PDB files")
required.add_argument("-c","--csv", required=True, metavar="FILE",
type=str,help="path of csv file with the other protein features")
optional.add_argument("-CP","--computeprops"
,help = "Compute the SiteMap descriptors", action = "store_true")
args = parser.parse_args()

PDBfiles = storePDBfilenames(args.input,parser)
csv = args.csv
computeprops = args.computeprops

return PDBfiles, csv, computeprops
Binary file added PELEAnalysis-Processing/Esterases/PDBOpener.pyc
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Binary file not shown.
Binary file added PELEAnalysis-Processing/PELE_scripts/PELEPlot.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
File renamed without changes.
File renamed without changes.
Binary file not shown.
Binary file not shown.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Binary file not shown.
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# -*- coding: utf-8 -*-


# Imports
# Global imports
import os,sys
import glob
import argparse as ap
Expand Down Expand Up @@ -29,46 +29,47 @@ def filename(self):
return self.__filename

def storePDBfilenames(PDBs_to_parse, parser):
"""It identifies the PDB files to add to the ProteinPreparationSystem tool
"""
It identifies the PDB files to add to the ProteinPreparationSystem tool
PARAMETERS
----------
PDBs_to_parse : list of strings
all the PDB files that want to be added to the analysis
PARAMETERS
----------
PDBs_to_parse : list of strings
all the PDB files that want to be added to the analysis
RETURNS
-------
parsed_data : list of PDB filenames (strings)
"""
RETURNS
-------
parsed_data : list of PDB filenames (strings)
"""

PDBs = []
PDBs = []

for PDB_list in PDBs_to_parse:
PDB_found = glob.glob(PDB_list)
if len(PDB_found) == 0:
print("Warning: path to PDB file \'" +
"{}".format(PDB_list) + "\' not found.")
for PDB in PDB_found:
PDBs.append(PDB)
for PDB_list in PDBs_to_parse:
PDB_found = glob.glob(PDB_list)
if len(PDB_found) == 0:
print("Warning: path to PDB file \'" +
"{}".format(PDB_list) + "\' not found.")
for PDB in PDB_found:
PDBs.append(PDB)

if len(PDBs) == 0:
print("Error: list of PDB files is empty.")
parser.print_help()
exit(1)
if len(PDBs) == 0:
print("Error: list of PDB files is empty.")
parser.print_help()
exit(1)

return PDBs
return PDBs

def parseArgs(self):

"""Parse arguments from command-line
"""
Parse arguments from command-line
RETURNS
-------
PDBfiles : list
list of PDB files
pH : float
specific value of the pH of the system
JP : int (0,1)
JP : int (0,1)
Binary value to indicate if HETATM wants to be erased
"""

Expand All @@ -89,8 +90,8 @@ def parseArgs(self):
return self.__filename,float(self.__pH),self.__JP

def ProteinPreparationSystem(self, file = None):

""" Take a PDB file and preparate the protein system using prepwizard of Schrodinger utilities.
"""
Take a PDB file and preparate the protein system using prepwizard of Schrodinger utilities.
RETURNS
-------
Expand Down Expand Up @@ -119,8 +120,8 @@ def ProteinPreparationSystem(self, file = None):
os.system("mv %s_modified.pdb %s" % (file[:-4], file))

def preparesystem(self):

"""Main function
"""
Main function
It is called when this script is the main program called by the interpreter
"""
Expand All @@ -132,7 +133,7 @@ def preparesystem(self):

if __name__ == "__main__":
"""Call the main function"""
PDB_file = Protein()
PDB_file.parseArgs()
PDB_file.preparesystem()
PDB_file = Protein()
PDB_file.parseArgs()
PDB_file.preparesystem()

Binary file not shown.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Loading

0 comments on commit 6764d17

Please sign in to comment.