sampledoc
News and Announcements »

filter_distance_matrix.py – Filter a distance matrix to contain only a specified set of samples.

Description:

Usage: filter_distance_matrix.py [options]

Input Arguments:

Note

[REQUIRED]

-i, --input_distance_matrix
The input distance matrix
-o, --output_distance_matrix
Path to store the output distance matrix

[OPTIONAL]

--sample_id_fp
A list of sample identifiers (or tab-delimited lines with a sample identifier in the first field) which should be retained
-t, --otu_table_fp
The otu table filepath
-m, --mapping_fp
Path to the mapping file
-s, --valid_states
String containing valid states, e.g. ‘STUDY_NAME:DOG’
--negate
Discard specified samples (instead of keeping them) [default: False]

Output:

Filter samples ids listed in sample_id_list.txt from dm.txt

filter_distance_matrix.py -i dm.txt -o dm_out.txt --sample_id_fp sample_id_list.txt

Filter samples ids in otu_table.txt from dm.txt

filter_distance_matrix.py -i dm.txt -o dm_out.txt -t otu_table.txt

Filter samples ids where DOB is 20061218 in Fasting_Map.txt. (Run “filter_by_metadata.py -h” for additional information on how metadata filtering can be specified.)

filter_distance_matrix.py -i dm.txt -o dm_out4.txt -m Fasting_Map.txt -s "DOB:20061218"

Site index


sampledoc