/* File: belvuMain.c * Author: Gemma Barson, 2011-04-06 * Copyright (c) 2011 - 2012 Genome Research Ltd * --------------------------------------------------------------------------- * SeqTools is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License * as published by the Free Software Foundation; either version 3 * of the License, or (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * or see the on-line version at http://www.gnu.org/copyleft/gpl.txt * --------------------------------------------------------------------------- * This file is part of the SeqTools sequence analysis package, * written by * Gemma Barson (Sanger Institute, UK) * * based on original code by * Erik Sonnhammer (SBC, Sweden) * * and utilizing code taken from the AceDB and ZMap packages, written by * Richard Durbin (Sanger Institute, UK) * Jean Thierry-Mieg (CRBM du CNRS, France) * Ed Griffiths (Sanger Institute, UK) * Roy Storey (Sanger Institute, UK) * Malcolm Hinsley (Sanger Institute, UK) * * Description: main() function for Belvu application *---------------------------------------------------------------------------- */ #include "belvuApp/belvu_.hpp" #include "belvuApp/belvuWindow.hpp" #include "belvuApp/belvuTree.hpp" #include "seqtoolsUtils/utilities.hpp" #include "seqtoolsUtils/blxmsp.hpp" #include #include #include #include /* Usage text. This is a duplicate of the text that is in * doc/User_doc/dotter_usage.txt, so ideally we would get rid of this and use * the text from the file instead; for now, we must update both. */ #define USAGE_TEXT "\ \n\ Belvu - View multiple alignments in good-looking colours.\n\ \n\ Usage: belvu [options] |-\n\ \n\ |- = alignment file or pipe.\n\ \n\ Options:\n\ -c Print Conservation table.\n\ -l Load residue color code file.\n\ -L Load markup and organism color code file.\n\ -m Read file with matching sequence segments.\n\ -r Read alignment in 'raw' format (Name sequence).\n\ -R Do not parse coordinates when reading alignment.\n\ -o Write alignment or tree to stdout in this format and exit.\n\ Valid formats: MSF, Mul(Stockholm), Selex, \n\ FastaAlign, Fasta, tree.\n\ -X Print UPGMA-based subfamilies at cutoff .\n\ -n Make non-redundant to %identity at startup.\n\ -Q Remove columns more gappy than .\n\ -q Remove sequences more gappy than .\n\ -G Penalize gaps in pairwise comparisons.\n\ -i Ignore gaps in conservation calculation.\n\ -P Remove partial sequences at startup.\n\ -C Don't write coordinates to saved file.\n\ -z Separator char between name and coordinates in saved file.\n\ -a Show alignment annotations on screen (Stockholm format only).\n\ -p Output random model probabilites for HMMER.\n\ (Based on all residues.)\n\ -S Sort sequences in this order.\n\ a -> alphabetically\n\ o -> by Swissprot organism, alphabetically\n\ s -> by score\n\ n -> by Neighbor-joining tree\n\ u -> by UPGMA tree\n\ S -> by similarity to first sequence\n\ i -> by identity to first sequence\n\ -s Read in file of scores.\n\ -T Tree options:\n\ i -> Start up showing tree\n\ I -> Start up showing only tree\n\ d -> Show distances in tree\n\ n -> Neighbor-joining\n\ u -> UPGMA\n\ c -> Don't color tree by organism\n\ o -> Don't display sequence coordinates in tree\n\ b -> Use Scoredist distance correction (default)\n\ j -> Use Jukes-Cantor distance correction\n\ k -> Use Kimura distance correction\n\ s -> Use Storm & Sonnhammer distance correction\n\ r -> Use uncorrected distances\n\ p -> Print distance matrix and exit\n\ R -> Read distance matrix instead of alignment\n\ (only in combination with Tree routines)\n\ -b Apply boostrap analysis with bootstrap samples\n\ -B Print out bootstrap trees and exit\n\ (Negative value -> display bootstrap trees on screen)\n\ -O