Skip to content

Commit

Permalink
Update readme to reflect the updates. Fix flake8 issues on wrapper
Browse files Browse the repository at this point in the history
  • Loading branch information
shreyas-arvindekar committed May 16, 2024
1 parent 1571d8e commit d8403e5
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 7 deletions.
10 changes: 8 additions & 2 deletions examples/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,15 @@ The `examples/input` comprises of the fasta sequences (`examples/input/fasta`),

In addition it also comprises the `topology{x}.txt` files that define the representation to be used for running the `nude_modeling.py` modeling script. The `{x}` in the topology file's name corresponds to the number of amino acid residues to be coarse-grained to a single flexible bead for regions that lack a previously characterized structure. In this example, we are comparing the 1, 5, 10, 20, 30 and 50 residues per bead coarse-grained representations of the regions with unknown structure of NuDe sub-complex. It is to be noted that the regions with known structure will be modeled as 1 and 10 residues per bead representation. Importantly, note that *any* representation can be compared as long there is a valid modeling file associated with it (representation can be mentioned via a topology file or manually).

The `nude_modeling.py` script is also adapted from the [Integrative model of the NuRD subcomplexes](https://github.com/isblab/nurd) repository for use with NestOR.
It also contains the `nestor_params_optrep.yaml` file which defines the NestOR parameters. Each parameter is described in the file itself.

The `nestor_params_optrep.yaml` defines the NestOR parameters. Each parameter is described in the file itself.
The `nude_modeling.py` script is also adapted from the [Integrative model of the NuRD subcomplexes](https://github.com/isblab/nurd) repository for use with NestOR.

The `nestor_output.yaml` contains an example output for the given setup. In addition to this file, NestOR also saves a model from each iteration. These models are not included here due to space constraints. It also generates plots visualizing the log(evidence) (mean and standard error on the mean) (`examples/trial_optrep_params_evidence_errorbarplot.png`), MCMC per step sampling time (`examples/trial_optrep_params_persteptime.png`), NestOR total process time (`examples/trial_optrep_params_proctime.png`) and per step MCMC sampling time and log(evidence) together for all candidate representations (`examples/sterr_evi_and_proctime.png`).

## Running nested sampling on this example
For this example, the user only needs to run
```
{path_to_IMP_installation} python nude_modeling.py
```
This command will run one nested sampling run. However, for use with the `wrapper_v{x}.py` the user will need to use modify this `nude_modeling.py` a bit to use command-line arguments. In the current form, the command line arguments have been hard coded in `nude_modeling.py`. The user will need to make these `sys.argv` in the correct order for the wrapper to work. Please see the comments in the `nude_modeling.py` for more details.
8 changes: 4 additions & 4 deletions examples/nude_modeling.py
Original file line number Diff line number Diff line change
Expand Up @@ -40,10 +40,10 @@
# --- remove this section


dat_dir = IMP.nestor.get_example_path("input")
run_output_dir = "run_" + "0"
topology_file = os.path.join(dat_dir, "topology50.txt")
h_param_file = os.path.join(dat_dir, "nestor_params_optrep.yaml")
dat_dir = IMP.nestor.get_example_path("input")
run_output_dir = "run_" + "0" # sys.argv[1]
topology_file = os.path.join(dat_dir, "topology50.txt") # sys.argv[2]
h_param_file = os.path.join(dat_dir, "nestor_params_optrep.yaml") # sys.argv[3]

max_shuffle_core = 5
max_shuffle_set2 = 50
Expand Down
3 changes: 2 additions & 1 deletion pyext/src/wrapper_v6.py
Original file line number Diff line number Diff line change
Expand Up @@ -384,9 +384,10 @@ def main():
print("\nNone of the runs was successful...!")
print("Done...!\n\n")


###################################################
# Main
###################################################

if __name__ == "__main__":
main()
main()

0 comments on commit d8403e5

Please sign in to comment.