clean-up and minor additions

* cleaning up R files for publication
* added artificial output patterns notebook
* added new rank attribute in analysis