NCBI C++ ToolKit
cobalt_app_util.hpp
Go to the documentation of this file.

Go to the SVN repository for this file.

1 #ifndef ALGO_COBALT___COBALT_APP_UTIL__HPP
2 #define ALGO_COBALT___COBALT_APP_UTIL__HPP
3 
4 /* $Id: cobalt_app_util.hpp 51015 2011-08-25 15:03:46Z boratyng $
5 * ===========================================================================
6 *
7 * PUBLIC DOMAIN NOTICE
8 * National Center for Biotechnology Information
9 *
10 * This software/database is a "United States Government Work" under the
11 * terms of the United States Copyright Act. It was written as part of
12 * the author's offical duties as a United States Government employee and
13 * thus cannot be copyrighted. This software/database is freely available
14 * to the public for use. The National Library of Medicine and the U.S.
15 * Government have not placed any restriction on its use or reproduction.
16 *
17 * Although all reasonable efforts have been taken to ensure the accuracy
18 * and reliability of the software and data, the NLM and the U.S.
19 * Government do not and cannot warrant the performance or results that
20 * may be obtained by using this software or data. The NLM and the U.S.
21 * Government disclaim all warranties, express or implied, including
22 * warranties of performance, merchantability or fitness for any particular
23 * purpose.
24 *
25 * Please cite the author in any work or product based on this material.
26 *
27 * ===========================================================================*/
28 
29 /*****************************************************************************
30 
31 File name: cobalt_app_util.hpp
32 
33 Author: Greg Boratyn
34 
35 Contents: Utility functions for COBALT command line applications
36 
37 ******************************************************************************/
38 
41 #include <objmgr/util/sequence.hpp>
43 
45 BEGIN_SCOPE(cobalt)
46 
47 /// Reads fasta sequences from stream, adds them to scope,
48 /// and returns them as the list of Seq_locs
49 /// @param instream Input Stream [in|out]
50 /// @param seqs List of the read sequences [out]
51 /// @param scope Scope that contains the read sequences [in|out]
52 /// @param flags Fasta Reader flags [in]
53 void GetSeqLocFromStream(CNcbiIstream& instream,
54  vector< CRef<objects::CSeq_loc> >& seqs,
55  CRef<objects::CScope>& scope,
56  objects::CFastaReader::TFlags flags);
57 
58 
59 /// Reads fasta sequences as multiple sequence alignment
60 /// @param instream Input stream [in|out]
61 /// @param scope Scope that contains the read sequences [in|out]
62 /// @param flags Fasta Reader flags [in]
63 /// @param id_generator Generator for sequece ids [in|out]
64 /// @return Alignment in ASN.1 format
66  CRef<objects::CScope>& scope,
67  objects::CFastaReader::TFlags flags,
68  objects::CSeqIdGenerator& id_generator);
69 
70 
71 END_SCOPE(cobalt)
73 
74 #endif /* ALGO_COBALT___COBALT_APP_UTIL_HPP */
void GetSeqLocFromStream(CNcbiIstream &instream, vector< CRef< objects::CSeq_loc > > &seqs, CRef< objects::CScope > &scope, objects::CFastaReader::TFlags flags)
Reads fasta sequences from stream, adds them to scope, and returns them as the list of Seq_locs.
CRef< objects::CSeq_align > GetAlignmentFromStream(CNcbiIstream &instream, CRef< objects::CScope > &scope, objects::CFastaReader::TFlags flags, objects::CSeqIdGenerator &id_generator)
Reads fasta sequences as multiple sequence alignment.
static uch flags
Operators to edit gaps in sequences.
#define END_NCBI_SCOPE
End previously defined NCBI scope.
Definition: ncbistl.hpp:103
#define END_SCOPE(ns)
End the previously defined scope.
Definition: ncbistl.hpp:75
#define BEGIN_NCBI_SCOPE
Define ncbi namespace.
Definition: ncbistl.hpp:100
#define BEGIN_SCOPE(ns)
Define a new scope.
Definition: ncbistl.hpp:72
IO_PREFIX::istream CNcbiIstream
Portable alias for istream.
Definition: ncbistre.hpp:146
The Object manager core.
Modified on Tue Apr 16 20:10:04 2024 by modify_doxy.py rev. 669887