mapcmd

package
v0.1.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 29, 2023 License: BSD-2-Clause Imports: 22 Imported by: 0

Documentation

Overview

Package mapcmd implements a command to draw the range reconstructions of a tree nodes.

Index

Constants

This section is empty.

Variables

View Source
var Command = &command.Command{
	Usage: `map [-c|--columns <value>] [--key <key-file>] [--gray]
	[--kde <value>] [--bound <value>] [-cpu <number>]
	[--richness] [--divtime] [--divage <mode>]
	[--unrot] [--present] [--contour <image-file>]
	-i|--input <file> [-o|--output <file-prefix>] <project-file>`,
	Short: "draw a map of a reconstruction",
	Long: `
Command map reads a file with a range reconstruction for the nodes of one or
more trees in a project, and draws the reconstruction as an image map using a
plate carrée (equirectangular) projection.

The argument of the command is the name of the project file.

The flag --input, or -i, is required an indicates the input file.

By default the ranges will be taken as given. If the flag --kde is defined,
a kernel density estimation using an spherical normal will be done using the
indicated value as the concentration parameter (in 1/radians^2). By default,
only the pixels in the top of the .95 of the CDF will be used. Use the flag
--bound to change this bound value.

As the number of nodes might be large, and when calculating a KDE the number
of computations can be large, the process is run in parallel using all
available processors. Use the flag --cpu to change the number of processors.

By default, it will output the results of each node. If the flag --richness is
defined, then it will output the richness on time, at each time stage (i.e.,
lineages alive at a given time stage). If the flag --divtime is defined, then
it will output the location of node splits (i.e., diversification points) at
each time stage. If the flag --divage is defined, with the values "recent",
"recent-all", "ancient", or "ancient-all", then it will output a map using
present locations by its age (as done in Bouckaert et al. 2012, Science
337:957). If "recent" is set, it will use splits, and prefer most recent
splits over ancient splits. If "recent-all" is set, it will use all locations,
and prefer most recent locations. If "ancient" is set, it will prefer ancients
splits over recent splits. If "ancient-all" is set, it will use all locations,
and prefer most ancient locations.

By default, the ranges will be produced using their respective time stage. If
the flag --unrot is given, then the estimated ranges will be draw at the
present time. By default, the paleogeography of the time stage will be used.
If --present flag is defined, the present time pixelation will be used for the
background.

If --contour is defined with a file, the given image will be used as a contour
of the output map. The contour image should have the same size of the output
image, and fully transparent, except for the contour, that will be always draw
in black. 

By default the output file image will have the input file name as prefix. To
change the prefix use the flag --output, or -o. The suffix of the file will be
the tree name, the node ID, and time stage, for example the suffix
"-vireya-n4-10.000.png" will be produced for node 4 of the 'vireya' tree, at
the time stage of 10 million years. By default the resulting image will be
3600 pixels wide. Use the flag --columns, or -c, tp define a different number
of columns.

By default the output images will be plain gray background. Use the flag --key
to define a set of colors for the image (using the project landscape).
If the flag --gray is given, then a gray colors will be used. The key file is
a tab-delimited file with the following required columns:

	-key	the value used as identifier
	-color	an RGB value separated by commas,
		for example "125,132,148".

Optionally it can contain the following columns:

	-gray:  for a gray scale value

Any other columns, will be ignored. Here is an example of a key file:

	key	color	gray	comment
	0	0, 26, 51	0	deep ocean
	1	0, 84, 119	10	oceanic plateaus
	2	68, 167, 196	20	continental shelf
	3	251, 236, 93	90	lowlands
	4	255, 165, 0	100	highlands
	5	229, 229, 224	50	ice sheets
	`,
	SetFlags: setFlags,
	Run:      run,
}

Functions

This section is empty.

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL