Var

class Var[source]

An instance of this class is the global bucket.

An instance of this class is made, called ‘var’. It can be read and changed by the user, and it is imported by other classes that need access to ‘global’ variables contained in it.

property BRLEN_MAX

(property) BRLEN_MAX (float)

property BRLEN_MIN

(property) BRLEN_MIN (float)

property GAMMA_SHAPE_MAX

(property) GAMMA_SHAPE_MAX (float)

property GAMMA_SHAPE_MIN

(property) GAMMA_SHAPE_MIN (float)

property KAPPA_MAX

(property) KAPPA_MAX (float)

property KAPPA_MIN

(property) KAPPA_MIN (float)

property PINVAR_MAX

(property) PINVAR_MAX (float)

property PINVAR_MIN

(property) PINVAR_MIN (float)

property PIVEC_MAX

(property) PIVEC_MAX (float)

property PIVEC_MIN

(property) PIVEC_MIN (float)

property RATE_MAX

(property) RATE_MAX (float)

property RATE_MIN

(property) RATE_MIN (float)

property RELRATE_MAX

(property) RELRATE_MAX (float)

property RELRATE_MIN

(property) RELRATE_MIN (float)

alignments

A list of alignments. Only those alignments read from the command line and from read()

argvAfterDoubleDash

In the p4 script, non-filename command-line args are accommodated, awkwardly. They need to be put after a double dash. They can then be found here.

doSplash

Whether to do the splash screen on startup with no args. When you get tired of it, turn it off in a customization file. You can always see it again with p4.func.splash().

property examplesDir

The directory where the p4 examples can be found.

Assuming that p4 can find them.

property excepthookEditor

The editor that is called by excepthook, or None

Setting this to None or to the name of an editor acts as a Boolean to say whether to follow a traceback with a hook to call your editor.

It is for using p4 at the terminal, writing scripts and source in an editor such as emacs or vi. The various files and lines of the traceback are given numbers that you can type in to get to the source. Handy!

The editor needs to be clever enough to use the “+N” command line option to be able to go to a particular line (N). Emacs and vi can both do this.

Set to, for example ‘emacsclient -n’, or ‘vim’. Default is None.

fileNames

Files read in from the command line.

property interactiveHelper

For interactive use, set the helper.

Set to bpython, or ipython. Default is None.

modelSymbols

A list of symbols used in text tree drawings, showing model disposition on the tree.

newick_allowSpacesInNames

Allow unquoted taxon names in Newick and Nexus trees to have spaces.

This will allow reading trees like (A, B C, (D E, F)G H); Multiple spaces are collapsed into single spaces.

property newtAndBrentPowellOptPassLimit

(property) newtAndBrentPowellOptPassLimit (int)

nexusSets

A single NexusSets object (not a list) from files from the command line or from read(). If more sets info is read in, it all gets put in the single NexusSets object

nexus_allowAllDigitNames

The NEXUS spec does not allow names that are all numerals. Temporarily override by True-ing this.

nexus_allowUTREE

UTREE has been deprecated since at least 1997.

But if you need to read UTREE-containing tree files, you can turn it on with this.

property nexus_getAllCommandComments

Whether to get all command comments in NEXUS tree files.

property nexus_getLineEndingsAsTokens

(property) Whether line endings get returned as nexus tokens (int)

property nexus_getP4CommandComments

Whether to get p4-specific command comments in NEXUS trees.

property nexus_getWeightCommandComments

Whether to get the ‘weight’ command comment in a NEXUS tree.

nexus_ignoreFormatCommandSymbols

In nexus, if you have dna, rna, or protein datatype, you can, according to the nexus standard, add extra symbols, defined in the format command. I don’t like that, so I don’t allow it. However, at least I warn the user, either as a warning (if True) or a glitch (if False).

nexus_readBeastTreeCommandComments

Beast trees use command comments eg [&stuff=0.12345] a lot. To read them, turn var.nexus_getAllCommandComments on, and then turn this on.

nexus_warnSkipUnknownBlock

Print a little message if p4 encounters a NEXUS block that it does not know what to do with.

nexus_warnSwitchGapChar

In Nexus data, the characters for gap and missing can be set to almost anything you like, but I like them to be ‘-‘ and ‘?’, which is more usual. So if needed, I switch them. Dodgy! – But at least I warn the user, unless that warning is turned off.

nexus_warnSwitchMissingChar

See Var.nexus_warnSwitchGapChar

property nexus_writeVisibleComments

(property) nexus_writeVisibleComments (int)

phylipDataMaxNameLength

The length of the taxon name in phylip data.

Unfortunately the phylip data format has a lot of variations. Even in the ‘official’ phylip data format, the name length is a compile-time variable. Its usually 10, tho. You can change it with this.

property rMatrixNormalizeTo1

(property) not user-settable

rMatrixProteinSpecs

A list of the currently available protein models.

sequenceLists

A list of SequenceList objects from files from the command line or from read()

topologyDistanceMetrics

A list of metrics.

At the time of writing, sd, wrf, bld, diffs, scqdist, tqdist.

Used by p4.tree.Tree.topologyDistance() and p4.trees.Trees.topologyDistanceMatrix()

trees

Tree objects from files from the command line or from read()

verboseRead

Running commentary on p4’s attempts to read in files.

warnReadNoFile

If you give read() a string that is not a file, p4 points it out, in case its a mistake.

writeFastaUppercase

Whether fasta sequences are written in uppercase.