Indiana University
University Information Technology Services
  
What are archived documents?
Login>>
Login

Login is for authorized groups (e.g., UITS, OVPIT, and TCC) that need access to specialized Knowledge Base documents. Otherwise, simply use the Knowledge Base without logging in.

Close

What is structure, and how do I use it on Quarry?

On this page:


About structure

The program structure can use genotypes of individuals to form clusters that represent populations, assign individuals to populations, and describe genotypes of individuals in terms of populations from which they were derived.

The Department of Human Genetics at the University of Chicago distributes structure. For information about structure packages, see the department's Documentation for structure software: Version 2.2 (in PDF format). For sample data sets in structure format, see the department's sample data sets page.

Using structure on Quarry

At Indiana University, structure version 2.2.3 is available on Quarry. Accounts on Quarry are available to all IU students, faculty, and staff, as well as affiliated researchers. Instructional use is limited to courses approved by the Director for Research Technologies. Review the Quarry usage policies before requesting a Quarry account.

To use structure on Quarry:

  1. Request a Quarry account.
  2. Set up SoftEnv and submit jobs.
  3. Pass options to structure.
  4. Using the structurejob script to submit a batch job

Request a Quarry account

To request a Quarry account, use the Account Management System (AMS); see At IU, if I already have some computing accounts, how do I get others?

For more, see Getting started on Quarry.

Set up SoftEnv and submit jobs

  1. To add structure to your softenv, edit your .soft file, adding the line +structure and executing a resoft.

  2. Create a directory that contains the datafile and all the paramfiles.

  3. If your job will run for fewer than 20 minutes, call structure in the directory. (See the Passing options section below.)

    If your job will take longer than 20 minutes, use the structurejob script, as described below.

Output that structure would normally print to the screen is stored in the $PBS_O_WORKDIR/testout and $PBS_O_WORKDIR/log.out files.

Passing options

To run structure from the command line, you will need the following files:

structure -m mainparams -e extraparams -i datafile

Also, you will have to pass options to structure. If you have the rights to configure in your three files, you can turn an interactive structure program into a batch job by creating a file that contains the options that you need to pass. To do so, create a text file that contains your options, one option per line, or combine all the options on the command line and pipe them to structure.

For example, if the default option is Y, which you need to enter to keep the structure program running, your option file would have only one line, containing the letter Y. If you name the text file optionfile, the command would be:

cat optionfile | structure -m mainparams -e extraparams -i datafile

Alternatively, you can echo the option and pipe it to structure:

/bin/echo "Y\n" | structure -m mainparams -e extraparams -i datafile

To pass a series of options, you have to use newline (\n) to separate them onto different lines:

/bin/echo "Y\nD\n3\nY\n" | structure -m mainparams -e extraparams -i datafile

Using the structurejob script to submit a batch job

If your job will require more than 20 minutes to finish, you can use the structurejob script to submit a batch job. This script is customized to set up the working environment, write a script using TORQUE (also called PBS), and submit the TORQUE script to run as a batch job.

To learn how to use structurejob, enter structurejob at the prompt. You will see the following information:

structurejob usage: structurejob -o name_of_the_option_file \ -m name_of_the_main_params_file \ -e name_of_the_extra_params_file\ -i name_of_input_data_file \ [ -output name_of_output_file ] \ [ -error name_of_error_file ] \ [ -walltime hh:mm:ss ]

The first four options are necessary.

Note: IU's involvement in the TeraGrid, and the presentation of this material, is based upon work supported by the National Science Foundation under Grants No. 0833618, SCI451237, SCI535258, and SCI504075. Any opinions, findings and conclusions or recommendations expressed in this material are those of the author(s) and do not necessarily reflect the views of the National Science Foundation.

This is document awti in domain all.
Last modified on May 13, 2009.

Comments/Questions/Corrections

Use this form to offer suggestions, corrections, and additions to the Knowledge Base. We welcome your input!

If you are affiliated with Indiana University and would like assistance with a specific computing problem, please use the Ask a Consultant form, or contact your campus Support Center.

Contact Information

Note: We will reply to your comment at this address. If your message concerns a problem receiving email, please enter an alternate email address.