From 1fa595e6927520986334bbd42ade79d828a5fa73 Mon Sep 17 00:00:00 2001 From: Alan R Lowe Date: Thu, 20 Jul 2023 17:41:20 +0100 Subject: [PATCH] Update README.md for code formatting --- README.md | 36 ++++++++++++++++++++++++------------ 1 file changed, 24 insertions(+), 12 deletions(-) diff --git a/README.md b/README.md index 6402d20..87ba9c5 100644 --- a/README.md +++ b/README.md @@ -13,25 +13,35 @@ A Python 3 **pro**tein structure **fet**cher. Retrieves the cif or pdb files fr Please install the latest version of PyPDB using: -`$ pip install pypdb` +```sh +pip install pypdb +``` or -`$ pip install git+git://github.com/williamgilpin/pypdb` +```sh +pip install git+git://github.com/williamgilpin/pypdb +``` ### Installation Install `profet` using pip: -`$ pip install profet` +```sh +pip install profet +``` To install the development version, which contains the latest features and fixes, install directly from GitHub using -`$ pip install git+git://github.com/alan-turing-institute/profet` +```sh +pip install git+git://github.com/alan-turing-institute/profet +``` Test the installation, navigate to the root directory and run -`$ pytest ` +```sh +pytest +``` This code has been designed and tested for Python 3. @@ -52,15 +62,17 @@ Run `search_history()` to see the search history of the fetcher. #### Example usage: - ``` -Python3 +```python +import profet as pf +fetcher = pf.Fetcher() +fetcher.set_directory("/path/to/directory/folder") +fetcher.get_file(uniprot_id = "P61316", filetype = "pdb", filesave = True, db = "alphafold") -$ import profet as pf -$ fetcher = pf.Fetcher() -$ fetcher.set_directory("/path/to/directory/folder") -$ fetcher.get_file(uniprot_id = "P61316", filetype = "pdb", filesave = True, db = "alphafold") +fetcher.search_history() +``` -$ fetcher.search_history() +returns: +``` {'P61316': ['pdb', 'alphafold']} ```