Created
May 29, 2013 20:26
-
-
Save gregcaporaso/5673546 to your computer and use it in GitHub Desktop.
Generate sample ids for the office surface succession project.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
# File created on 29 May 2013 | |
from __future__ import division | |
__author__ = "Greg Caporaso" | |
__copyright__ = "Copyright 2011, The QIIME project" | |
__credits__ = ["Greg Caporaso"] | |
__license__ = "GPL" | |
__version__ = "1.6.0-dev" | |
__maintainer__ = "Greg Caporaso" | |
__email__ = "[email protected]" | |
__status__ = "Development" | |
from qiime.util import parse_command_line_parameters, make_option | |
script_info = {} | |
script_info['brief_description'] = "" | |
script_info['script_description'] = "" | |
script_info['script_usage'] = [("","","")] | |
script_info['output_description']= "" | |
script_info['required_options'] = [ | |
make_option('--cities',help="the city labels"), | |
make_option('--max_timepoint',type='int',help="the maximum timepoint to create labels until") | |
] | |
script_info['optional_options'] = [] | |
script_info['version'] = __version__ | |
def main(): | |
option_parser, opts, args =\ | |
parse_command_line_parameters(**script_info) | |
cities = opts.cities | |
buildings = map(str,[1,2,3]) | |
plate_locations = ['C','F','W'] | |
rows = map(str,[3]) | |
sample_types = ['Ca','Ce','Dr'] | |
max_timepoint = opts.max_timepoint | |
for city in cities: | |
for timepoint in range(1,max_timepoint+1): | |
for building in buildings: | |
for plate_location in plate_locations: | |
for row in rows: | |
for sample_type in sample_types: | |
print '.'.join([city+building+plate_location,row,sample_type,"%03d" % timepoint]) | |
if __name__ == "__main__": | |
main() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment