Julien Allali

MiGaL Tutorial

MiGaL Tutorial: The programs

migal

This is the main program of MiGaL. migal is used to compare two RNA secondary structures. Various file formats are supported: bpseq, ct, ct2, dot/parenthesis and MiGaL xml format. Basically, to compare two structures encoded in file1 and file2 use migal -M file1 file2. The option -M indicates at which level from 0 to 3 (as described in previous page) one wants to perform the comparison.

Here are the main options of migal:(see also migal -h for a complete list of options)

rnaconverter

rnaconverter is used to convert file formats from ct, ct2, bpseq and dot/parenthesis to MiGaL xml format (or optionaly dot/parenthesis). This program is particulary useful if your structures contain pseudo-knots because rnaconverter will ask you to break some helices to remove them and so the output structures will be pseudo-knots free. Also, rnaconverter can check a postscript file (it checks that the format of the postscript is supported and the number of nucleotides in the postscript is equal to the number of nucleotides in the secondary structure file).

rna2tex

rna2tex computes a TeX file that contains the tree representation at each level of a RNA secondary structure. This program should be used only with small structures as latex will make stack overflow for too big trees (can be partially solved by editing texmf.cnf and running update-texmf).

check_ps

Check if a postscript file format can be handle by migal.

filterstructure

Extract from a structure file the part which corresponds to a sequence

rnapscolor

Color postscripts file using a sequence alignment. Can be used to color postscript files using result from other comparison tools such RNAforester.

getsequence

Get the sequence of the RNA represented in a postscript file. Can be used in jonction to filterstructure to extract in a structure file the part that is represented in the postscript file.

tools/explode_dpfile.py

If you have a file containing a lot of secondary structure in dot/parenthesis format (one line starting with ">", one line for the sequence, one line for the structure) this script will explode each structure into a separated file.

tools/phylo_nj.py

phylo_nj.py is used to compare many structures together and output distance matrices. Basically phylo_nj.py file1 file2 file3 file4 will run migal -M for each couple filei filej.

If you want to set specific parameters for migal, you can use the -o option.

The option -d creates a directory for each computation (migal is lunched into this directory), for example this can be used to save the alignments resulting from each comparison (-o"-a align" -d ).

Also, you can ask to use (option -p) a postscript file if they are present in the same place with suffix .ps. The option --rnaplot is used to build the missing postscript using RNAplot.

Finally, if you have phylip installed, the option --phylip will compute the tree from the matrices file using the neighbor joining method.

Take a look at the example 2 for a complete example of use and method description.

tools/phylo.py

phylo.py is used to build a phylogenetic tree from a set of secondary structures. This script supports most of the phylo_nj.py options.

Take a look at the example 3 for a complete example of use and method description.

tools/merge_matrix.py

This script is used to sum two matrices (computed with previous script). For example: merge_matrix.py Layer0 Layer1 0.6 0.4 prints a new matrix with values equal to 0.6*value in Layer0 + 0.4*value in Layer1.

back next