Man page for selectΒΆ

NAME

pymvpa2-select - select a subset of samples and/or features from a dataset  

SYNOPSIS

pymvpa2 ,select /[,--version/] [,-h/] ,-i DATASET /[,DATASET /...] [,--samples-by-index IDX /[,IDX /...] ,| --samples-by-attr EXPR /[,EXPR /...]] [,--features-by-index IDX /[,IDX /...] ,| --features-by-attr EXPR /[,EXPR /...]] [,--strip-sa ATTR /[,ATTR /...]] [,--strip-fa ATTR /[,ATTR /...]] [,--strip-da ATTR /[,ATTR /...]] ,-o OUTPUT /[,--hdf5-compression TYPE/]  

DESCRIPTION

Select a subset of samples and/or features from a dataset

A subset of samples and/or feature can be selected by their indices (see --samples/features-by-index) or via simple expressions evaluating attribute value (see --samples/features-by-attr). It is possible to specify options for selecting samples and features simultaneously. It is also possible to strip arbitrary attributes from the output dataset (see --strip-...).

SELECTION BY INDEX

All --...-by-index options accept a sequence of integer indices. Alternatively it is possible to specify regular sequences of indices using a START:STOP:STEP notation (zero-based). For example, ':5' selects the first five elements, '2:4' selects the third and fourth element, and ':20:2' selects all even numbered elements from the first 20.

SELECTION BY ATTRIBUTE

All --...by-attr options support a simple expression language that allows for creating filters/masks from attribute values. Such selection expressions are made up of ATTRIBUTE OPERATOR VALUE triplets that can be combined via 'and' or 'or' keywords. For example:

... --samples-by-attr subj eq 5 and run lt 5 or run gt 10

selects all samples where attribute 'subj' equals 5 and the run attribute is either less than 5 or greater than 10. 'and' and 'or' operations are done in strictly serial order (no nested conditions).

Supported operators are:

eq (equal) ne (not equal) ge (greater or equal) le (less or equal) gt (greater than) lt (less than)  

OPTIONS

--version
show program's version and license information and exit
-h, --help, --help-np
show this help message and exit. --help-np forcefully disables the use of a pager for displaying the help.
-i DATASET [DATASET ...], --input DATASET [DATASET ...]
path(s) to one or more PyMVPA dataset files. All datasets will be merged into a single dataset (vstack'ed) in order of specification. In some cases this option may need to be specified more than once if multiple, but separate, input datasets are required.
 

Options for selecting samples:

--samples-by-index IDX [IDX ...]
select a subset of samples by index. See section 'SELECTION BY INDEX' for more details.
--samples-by-attr EXPR [EXPR ...]
select a subset of samples by attribute evaluation. See section 'SELECTION BY ATTRIBUTE' for more details.
 

Options for selecting features:

--features-by-index IDX [IDX ...]
select a subset of features by index. See section 'SELECTION BY INDEX' for more details.
--features-by-attr EXPR [EXPR ...]
select a subset of features by attribute evaluation. See section 'SELECTION BY ATTRIBUTE' for more details.
 

Options for removing attributes:

--strip-sa ATTR [ATTR ...]
strip one or more samples attributes given by their name from a dataset.
--strip-fa ATTR [ATTR ...]
strip one or more feature attributes given by their name from a dataset.
--strip-da ATTR [ATTR ...]
strip one or more dataset attributes given by their name from a dataset.
 

Output options:

-o OUTPUT, --output OUTPUT
output filename ('.hdf5' extension is added automatically if necessary). NOTE: The output format is suitable for data exchange between PyMVPA commands, but is not recommended for long-term storage or exchange as its specific content may vary depending on the actual software environment. For long-term storage consider conversion into other data formats (see 'dump' command).
--hdf5-compression TYPE
compression type for HDF5 storage. Available values depend on the specific HDF5 installation. Typical values are: 'gzip', 'lzf', 'szip', or integers from 1 to 9 indicating gzip compression levels.
 

AUTHOR

Written by Michael Hanke & Yaroslav Halchenko, and numerous other contributors.  

COPYRIGHT

Copyright © 2006-2015 PyMVPA developers

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.