User Guide for Standard Script Repository GC

From PHUSE Wiki
Jump to: navigation, search


This page mainly describes the old Google Code repository. We now use Github.


Welcome to the phuse-scripts repository. This site hosts standard scripts for data transformations and analyses across and/or within a therapeutic area and exploratory analysis. Our goal is to standardize analyses across the industry, but also include examples of what can be done with a standardized data set. We aim to establish this repository as the place to collaborate and share between industry and regulators.

How to get involved

Repository Maintainer
Hanming Tu and Kevin Kane : contact on
Current members
Steps to join
  1. Join the Free PhUSE mailing list to receive updates
  2. Sign up for the PhUSE working group mailings
    1. Go to
    2. Join this group: "CSS WG5: Developing Standard Scripts" (
  3. Sign up to be a contributor or committer in the script repository (GitHub account required)
    1. Send an email to one of the repository maintainers to request to join the PhUSE repository
    2. Go to repository at and start interacting

What role you want to play?

In Google code, there are two roles that a person can play:

In the FDA/PhUSE repository, someone is able to take on responsibilities for editing, adding and maintaining scripts in the repository. Committers should be prepared to contribute his or her time to share or develop a script and/or commit to work on others’ scripts. Committers should feel that they have the necessary skills and experience to enhance the set of existing scripts in the repository. Committers may recruit additional help from other committers and contributors to develop the script and document milestones of the script advancements.

Phuse google code committer permissions.JPG

This role is designed more for script users, who may occassionally want to participate in editing and enhancing scripts. Do not have write access to the complete library of scripts, but can be given access to individual scripts to work on specific issues. A contributor shall take specific duties in the repository and may participate in the development of specific scripts.

Phuse google code contributor permissions.JPG

Usually, only Committers may add new scripts. If you are a contributor, you can request to have edit privileges by emailing to one of the repository maintainers.

How to add a new script

You have two methods to add a script:

  1. using browser or
  2. using subversion client tool such as TortoiseSVN.

In the repository, go to the sources tab and navigate to the appropriate directory. The directories are organised by scripting language (e.g. R/SAS) and then into analytical or functional areas. Inside each functional area (e.g. the DM directory for demographic scripts), there are 6 directories:

  • baks: backup and old versions
  • data: example or test data files
  • docs: documentation
  • result: any outputs files
  • src: source code
  • valid: validation files

For more information about the folder structure, please review this file:

Users are encouraged to add documentation when adding a script. There are template documents for User Guides and Specifications documents here (link to be added), and it is strongly encouraged to utilize these documents for new scripts and to follow the recommended name conventions.

Committers will add scripts or packages of scripts as “Downloads” as appropriate. “Downloads” are easily accessible packages of code that can be downloaded by anyone.

Add script through browser

Limitations with Browser
  • Cannot create folders
  • Cannot rollback
Steps for for adding a script through a browser
  1. Go to the FDA/Script repository:
  2. Log into your account if you have not.
  3. Click Source-> Browse->trunk and expand to the folder that you’d like to add a script
  4. Click “Create” or “Upload” to upload a ready prepared script.
  5. If you choose “Create”, a simple window with line numbered text editor is opened
  6. Provide and append a file name in the path field
  7. Provide description in the commit log field
  8. Click the “Commit” button.
if you have not done step 7, your change will not be saved!

Phuse google code scource page.JPG

Add script through TortoiseSVN

  • Require permission to install TortoiseSVN or other subversion client
  • Require password to upload scripts
  • You can check out the whole repository
  • You can create folders
  • You can test your codes if you have the software on your local computer
  • You can conduct editing, merging, rollback tasks
Steps for adding scripts through TortoiseSVN
  1. Install TortoiseSVN by following the links listed in or the steps in this file
  2. Once you have installed the subversion client, you can check out the whole repository by following the instruction at
  3. Once you have the repository at your local drive, you can navigate to the folder in the local repository and just copy your script to the folder
  4. Then right-click on the folder, then click the “SVN Commit”

Phuse tortoiseSVN commit.JPG

How to edit a script

Only committers or contributors with edit privileges can edit scripts.

The FDA/PhUSE script repository uses a Subversion repository to manage version control. Further information can be found here: It is recommended that you use a package to manage Subversion with your operating system. A list can be found by clicking here. For Windows users, there is some experience in the group with the Tortoise SVN package that can be downloaded here (be careful not to click on the download buttons that appear in adverts on the page).

Scripts can be edited directly from the Google code webpage, or via a Subversion package installed on your local computer. Committers can raise an issue with a script to highlight the need for an edit by following the instructions below.

How to flag an issue with a script

Go to the “Issues” tab of the Google Code repository and click the new issue button, completing the details on the displayed form.

How to resolve conflict of concurrent editing

Google Code does not manage concurrent editing of scripts by different users. Processes to handle development by scripts by multiple users are in development.

Last revised by DanteDT,01/7/2016