File: distance_matrix_from_mapping.rst

package info (click to toggle)
qiime 1.8.0%2Bdfsg-4
  • links: PTS, VCS
  • area: main
  • in suites: jessie, jessie-kfreebsd
  • size: 130,508 kB
  • ctags: 10,145
  • sloc: python: 110,826; haskell: 379; sh: 169; makefile: 125
file content (56 lines) | stat: -rw-r--r-- 2,218 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
.. _distance_matrix_from_mapping:

.. index:: distance_matrix_from_mapping.py

*distance_matrix_from_mapping.py* -- Calculate the pairwise dissimilarity on one column of a mappping file
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

**Description:**

The input for this script is a mapping file and the name of a column, it has to be numeric, from which a distance matrix will be created. The output of this script is a distance matrix containing a dissimilarity value for each pairwise comparison.

As this is a univariate procedure only one metric is supported: d = c-b.


**Usage:** :file:`distance_matrix_from_mapping.py [options]`

**Input Arguments:**

.. note::

	
	**[REQUIRED]**
		
	-i, `-`-input_path
		Mapping filepath.
	-c, `-`-column
		String containing the name of the column in the mapping file, e.g. 'DOB'. If you pass two colums separated by a comma (e.g. 'Latitude,Longitud') the script will calculate the Vincenty formula (WGS-84) for distance between two Latitude/Longitude points.
	
	**[OPTIONAL]**
		
	-o, `-`-output_fp
		Output directory. One will be created if it doesn't exist. [default=map_distance_matrix.txt]


**Output:**

The output of `distance_matrix_from_mapping.py <./distance_matrix_from_mapping.html>`_ is a file containing a distance matrix between rows corresponding to a pair of columns in a mapping file.


**Pairwise dissimilarity:**

To calculate the distance matrix (using euclidean distance) on a column of the mapping file, where the results are output to DOB.txt, use the following command:

::

	distance_matrix_from_mapping.py -i Fasting_Map.txt -c DOB

**Pairwise dissimilarity using the Vincenty formula for distance between two Latitude/Longitude points:**

To calculate the distance matrix (using Vincenty formula) on a column of the mapping file, where the results are output to lat_long.txt, use the following command:

::

	distance_matrix_from_mapping.py -i lat_long.txt -c Latitute,Longitude -o lat_long_dtx_matrix.txt