From 548d9a5192ddded2e64db4b96f6d3b9f926945eb Mon Sep 17 00:00:00 2001 From: Tanushree Tunstall Date: Fri, 15 May 2020 13:48:50 +0100 Subject: [PATCH] tidy up code --- scripts/pdb_chain_extract.py | 6 +----- scripts/pdb_chain_splitter.py | 7 +++---- 2 files changed, 4 insertions(+), 9 deletions(-) diff --git a/scripts/pdb_chain_extract.py b/scripts/pdb_chain_extract.py index dddbcd7..0e2a489 100755 --- a/scripts/pdb_chain_extract.py +++ b/scripts/pdb_chain_extract.py @@ -28,9 +28,8 @@ def main(): Function to call if run from command line. Example use: - pdb_chain_extract.py -f -c + pdb_chain_extract.py -f -c -p -o Extracts chain 'A' by default. - FIXME: extract all chains from the given pdb and write them out individually """ arg_parser = argparse.ArgumentParser() arg_parser.add_argument('-i', '--pdb_file', help='provide pdb file', default = 'None') @@ -64,9 +63,6 @@ def main(): pdb_chains_file = outpath + '/' + outfile + '_' + c_names + '.pdb' io = PDBIO() io.set_structure(structure) - #io.save(structure.get_id() + "_crop.structure", ChainExtract()) - #io.save("_crop.pdb", ChainExtract(my_chains)) - #io.save('{}'.format(pdb_chains_file), ChainExtract(my_chains)) io.save(pdb_chains_file, ChainExtract(my_chains)) if __name__ == "__main__": diff --git a/scripts/pdb_chain_splitter.py b/scripts/pdb_chain_splitter.py index 3c5d5b5..030971e 100755 --- a/scripts/pdb_chain_splitter.py +++ b/scripts/pdb_chain_splitter.py @@ -59,12 +59,11 @@ def main(): for chain in chains: chain = chain.upper() print ('Extracting chain:', chain) - #pdb_chain_file = 'pdb_file_chain_{}.pdb'.format(chain) - #pdb_chain_file = outpath + '/' + 'pdb_file_chain_{}.pdb'.format(chain) - pdb_chain_file = outpath + '/' + outfile + '_{}.pdb'.format(chain) + + pdb_chain_file = outpath + '/' + outfile + '_{}.pdb'.format(chain) + io = PDBIO() io.set_structure(structure) - #io.save('{}'.format(pdb_chain_file), ChainSelect(chain)) io.save('{}'.format(pdb_chain_file), ChainSelect(chain)) if __name__ == "__main__":