prot_to_neighbors.hpp
上传用户:yhdzpy8989
上传日期:2007-06-13
资源大小:13604k
文件大小:6k
- /*
- * ===========================================================================
- * PRODUCTION $Log: prot_to_neighbors.hpp,v $
- * PRODUCTION Revision 1000.5 2004/04/12 19:28:16 gouriano
- * PRODUCTION PRODUCTION: UPGRADED [CATCHUP_003] Dev-tree R1.11
- * PRODUCTION
- * ===========================================================================
- */
- #ifndef GUI_PLUGINS_ALGO_ALIGN___PROT_TO_NEIGHBORS__HPP
- #define GUI_PLUGINS_ALGO_ALIGN___PROT_TO_NEIGHBORS__HPP
- /* $Id: prot_to_neighbors.hpp,v 1000.5 2004/04/12 19:28:16 gouriano Exp $
- * ===========================================================================
- *
- * PUBLIC DOMAIN NOTICE
- * National Center for Biotechnology Information
- *
- * This software/database is a "United States Government Work" under the
- * terms of the United States Copyright Act. It was written as part of
- * the author's official duties as a United States Government employee and
- * thus cannot be copyrighted. This software/database is freely available
- * to the public for use. The National Library of Medicine and the U.S.
- * Government have not placed any restriction on its use or reproduction.
- *
- * Although all reasonable efforts have been taken to ensure the accuracy
- * and reliability of the software and data, the NLM and the U.S.
- * Government do not and cannot warrant the performance or results that
- * may be obtained by using this software or data. The NLM and the U.S.
- * Government disclaim all warranties, express or implied, including
- * warranties of performance, merchantability or fitness for any particular
- * purpose.
- *
- * Please cite the author in any work or product based on this material.
- *
- * ===========================================================================
- *
- * Authors: Mike DiCuccio
- *
- * File Description:
- *
- */
- #include <gui/core/algo_thread.hpp>
- #include <gui/core/version.hpp>
- #include "align_to_neighbors.hpp"
- #include "blast_util.hpp"
- BEGIN_NCBI_SCOPE
- USING_SCOPE(objects);
- class CAlgoPlugin_AlignProtToNeighbors
- : public CAlignToNeighbors,
- public CAlgorithm<CAlgoPlugin_AlignProtToNeighbors>
- {
- public:
- void RunCommand(CPluginMessage& msg);
- // standard info boilerplate
- static void GetInfo(CPluginInfo& info);
- };
- inline void
- CAlgoPlugin_AlignProtToNeighbors::RunCommand(CPluginMessage& msg)
- {
- CAlignToNeighbors::Run(msg);
- }
- // standard info boilerplate
- inline
- void CAlgoPlugin_AlignProtToNeighbors::GetInfo(CPluginInfo& info)
- {
- info.Reset();
- // version info macro
- info.SetInfo(CPluginVersion::eMajor, CPluginVersion::eMinor, 0,
- string(__DATE__) + " " + string(__TIME__),
- "CAlgoPlugin_AlignProtToNeighbors",
- "Alignments/Align protein to Entrez neighbors",
- "Create an alignment of a protein sequence "
- "to its related sequences",
- "");
- // command info
- CPluginCommandSet& cmds = info.SetCommands();
- CPluginCommand& args = cmds.AddAlgoCommand(eAlgoCommand_run);
- args.AddArgument("cds_feat", "Protein sequence",
- CSeq_feat::GetTypeInfo());
- args.SetConstraint("cds_feat",
- (*CPluginValueConstraint::CreateFeatType(),
- CSeqFeatData::e_Cdregion));
- args.AddConstraint("cds_feat",
- *CPluginValueConstraint::CreateFeatProduct());
- CBlastUtils::AddBlastArgs(args, blast::eBlastp);
- args.AddDefaultArgument("neighbor_filter",
- "Which entrez neighbors",
- CPluginArg::eString, "all");
- args.SetConstraint("neighbor_filter",
- (*CPluginValueConstraint::CreateSet(),
- "all",
- "arbitrary query string (below)"));
- args.AddOptionalArgument("query_string",
- "Entrez query for filtering",
- CPluginArg::eString);
- // pass to the base class standard arg function
- //x_AddStandardArgs(args);
- }
- END_NCBI_SCOPE
- /*
- * ===========================================================================
- * $Log: prot_to_neighbors.hpp,v $
- * Revision 1000.5 2004/04/12 19:28:16 gouriano
- * PRODUCTION: UPGRADED [CATCHUP_003] Dev-tree R1.11
- *
- * Revision 1.11 2004/04/07 12:57:49 dicuccio
- * Formatting changes
- *
- * Revision 1.10 2004/03/05 17:33:44 dicuccio
- * Changed plugin to run single-threaded until thread issues can be sorted out.
- * Use sequence::GetId() instead of CSeq_id::GetStringDescr()
- *
- * Revision 1.9 2004/01/27 18:40:27 dicuccio
- * Code clean-up. Renamed plugin classes to follow standard pattern
- *
- * Revision 1.8 2004/01/13 20:37:41 dicuccio
- * Use CBlastUtils for standard blast argument processing
- *
- * Revision 1.7 2003/11/26 17:12:30 dicuccio
- * Switched to use CThreadedAlgorithm<>
- *
- * Revision 1.6 2003/11/24 15:45:23 dicuccio
- * Renamed CVersion to CPluginVersion
- *
- * Revision 1.5 2003/11/06 20:12:12 dicuccio
- * Cleaned up handling of USING_SCOPE - removed from all headers
- *
- * Revision 1.4 2003/11/04 17:49:22 dicuccio
- * Changed calling parameters for plugins - pass CPluginMessage instead of paired
- * CPluginCommand/CPluginReply
- *
- * Revision 1.3 2003/10/17 17:45:40 jcherry
- * Default E-values -> 0.05
- *
- * Revision 1.2 2003/10/16 21:52:07 jcherry
- * Added filtering of neighbors
- *
- * Revision 1.1 2003/10/15 18:17:07 dicuccio
- * Split algo into two front-ends (one for mRNA, one for proteins)
- *
- * ===========================================================================
- */
- #endif // GUI_PLUGINS_ALGO_ALIGN___PROT_TO_NEIGHBORS__HPP