~ubuntu-branches/ubuntu/trusty/qiime/trusty

« back to all changes in this revision

Viewing changes to scripts/categorized_dist_scatterplot.py

  • Committer: Package Import Robot
  • Author(s): Andreas Tille
  • Date: 2013-06-17 18:28:26 UTC
  • mfrom: (9.1.2 sid)
  • Revision ID: package-import@ubuntu.com-20130617182826-376az5ad080a0sfe
Tags: 1.7.0+dfsg-1
Upload preparations done for BioLinux to Debian

Show diffs side-by-side

added added

removed removed

Lines of Context:
6
6
__copyright__ = "Copyright 2011, The QIIME Project"
7
7
__credits__ = ["Justin Kuczynski"]
8
8
__license__ = "GPL"
9
 
__version__ = "1.5.0"
 
9
__version__ = "1.7.0"
10
10
__maintainer__ = "Justin Kuczynski"
11
11
__email__ = "justinak@gmail.com"
12
12
__status__ = "Release"
33
33
script_info['script_usage'] = [("Canonical Example:","Split samples by country. Within each country compare each child to all adults. Plot the average distance from that child to all adults, vs. the age of that child","python categorized_dist_scatterplot.py -m map.txt -d unifrac_distance.txt -c Country -p AgeCategory:Child -s AgeCategory:Adult -a AgeYears -o fig1.png"),("Example 2:","Same as above, but compares Child with all other categories (e.g.: NA, Infant, etc.)","python categorized_dist_scatterplot.py -m map.txt -d unifrac_distance.txt -c Country -p AgeCategory:Child -a AgeYears -o fig1.svg")]
34
34
script_info['output_description']= "a figure and the text dat for that figure "
35
35
script_info['required_options'] = [\
36
 
 make_option('-m', '--map',
 
36
 make_option('-m', '--map', type='existing_filepath',
37
37
     help='mapping file'),
38
 
 make_option('-d', '--distance_matrix',
 
38
 make_option('-d', '--distance_matrix', type='existing_filepath',
39
39
     help='distance matrix'),
40
 
 make_option('-p', '--primary_state',
 
40
 make_option('-p', '--primary_state', type='string',
41
41
     help="Samples matching this state will be plotted. E.g.: AgeCategory:Child . See qiime's filter_samples_from_otu_table.py for more syntax options"),
42
 
 make_option('-a', '--axis_category',
 
42
 make_option('-a', '--axis_category', type='string',
43
43
     help='this will form the horizontal axis of the figure, e.g.: AgeYears . Must be numbers'),
44
 
 make_option('-o', '--output_path',
 
44
 make_option('-o', '--output_path', type='new_dirpath',
45
45
     help='output figure, filename extention determines format. E.g.: "fig1.png" or similar. A "fig1.txt" or similar will also be created with the data underlying the figure'),
46
46
]
47
47
script_info['optional_options'] = [
48
 
 make_option('-c', '--colorby',
 
48
 make_option('-c', '--colorby', type='string',
49
49
     help='samples will first be separated by this column of the mapping file. They will be colored by this column of the mapping file, and all comparisons will be done only among samples with the same value in this column. e.g.: Country. You may omit -c, and the samples will not be separated'),
50
 
 make_option('-s', '--secondary_state',
 
50
 make_option('-s', '--secondary_state', type='string',
51
51
     help='all samples matching the primary state will be compared to samples matcthing this secondary state. E.g.: AgeCategory:Adult'),
52
52
]
53
53
script_info['version'] = __version__
108
108
    plt.savefig(opts.output_path)
109
109
 
110
110
if __name__ == "__main__":
111
 
    main()
 
 
b'\\ No newline at end of file'
 
111
    main()