->SetVersionInfo(1, 0, 0);
78 virtual void Init(
void);
80 virtual int Run(
void);
82 virtual void Exit(
void);
97=
"Low complexity region masker based on the SEG algorithm";
107arg_desc->SetUsageContext(
GetArguments().GetProgramBasename(),
110arg_desc->SetCurrentGroup(
"Input/output options");
111arg_desc->AddDefaultKey(
kInput,
"input_file_name",
114arg_desc->AddDefaultKey(
kOutput,
"output_file_name",
117arg_desc->AddDefaultKey(
kInputFormat,
"input_format",
118 "controls the format of the masker input",
124arg_desc->SetConstraint(
kInputFormat, strings_allowed);
125arg_desc->AddFlag (
"parse_seqids",
126 "Parse Seq-ids in FASTA input",
true);
129 "controls the format of the masker output",
137arg_desc->SetCurrentGroup(
"SEG algorithm options");
138arg_desc->AddDefaultKey(
"window",
"integer_value",
"SEG window",
141arg_desc->AddDefaultKey(
"locut",
"float_value",
"SEG locut",
144arg_desc->AddDefaultKey(
"hicut",
"float_value",
"SEG hicut",
159 if(
format==
"fasta") {
162}
else if(
format==
"blastdb") {
165 _ASSERT(
"Unknown input format"== 0);
177 if(
format==
"interval") {
180}
else if(
format==
"fasta") {
202 throwruntime_error(
"Unknown output format");
220 CSegMaskermasker(args[
"window"].AsInteger(),
221args[
"locut"].AsDouble(),
222args[
"hicut"].AsDouble());
228 while( (seq_entry = reader->GetNextSequence()).NotEmpty() ) {
239unique_ptr<CSegMasker::TMaskList> masks(masker(sequence_data));
240writer->Print(bioseq_handle, *masks,
GetArgs()[
"parse_seqids"]);
246cerr << e.
what() << endl;
268 #ifndef SKIP_DOXYGEN_PROCESSING 269 int main(
intargc,
const char* argv[])
const double kSegLocut
Locut parameter for SEG.
const int kSegWindow
Window that SEG examines at once.
const double kSegHicut
Hicut parameter for SEG.
Class for reading sequences from BLAST databases.
Class for reading sequences from fasta files.
Virtual base class for all input readers.
Output filter to print masked sequence locations as Blast-db-mask-info objects.
Output filter to write masked data in fasta format.
Output filter to print masked sequences as sets of intervals.
Output filter to print masked sequence locations as NCBI Seq-loc objects.
A base class for winmasker output writers.
This class encapsulates the SEG filtering algorithm.
virtual void Init(void)
@inheritDoc
SegMaskerApplication()
Application constructor.
virtual int Run(void)
@inheritDoc
CMaskReader * x_GetReader()
Retrieves the sequence reader interface for the application.
CMaskWriter * x_GetWriter()
Retrieves the output writer interface for the application.
static const char *const USAGE_LINE
Contains the description of this application.
virtual void Exit(void)
@inheritDoc
static SQLCHAR output[256]
void SetFullVersion(CRef< CVersionAPI > version)
Set version data for the program.
void HideStdArgs(THideStdArgs hide_mask)
Set the hide mask for the Hide Std Flags.
virtual const CArgs & GetArgs(void) const
Get parsed command line arguments.
int AppMain(int argc, const char *const *argv, const char *const *envp=0, EAppDiagStream diag=eDS_Default, const char *conf=NcbiEmptyCStr, const string &name=NcbiEmptyString)
Main function (entry point) for the NCBI application.
virtual void SetupArgDescriptions(CArgDescriptions *arg_desc)
Setup the command line argument descriptions.
const CNcbiArguments & GetArguments(void) const
Get the application's cached unprocessed command-line arguments.
@ fHideLogfile
Hide log file description.
@ fHideDryRun
Hide dryrun description.
@ fHideConffile
Hide configuration file description.
@ fHideVersion
Hide version description.
CArgAllow_Strings * Allow(const string &value)
Add allowed string values.
@ eInputFile
Name of file (must exist and be readable)
@ eDouble
Convertible into a floating point number (double)
@ eString
An arbitrary string.
@ eOutputFile
Name of file (must be writable)
@ eInteger
Convertible into an integer number (int or Int8)
@ fBinary
Open file in binary mode.
void SetDiagStream(CNcbiOstream *os, bool quick_flush=true, FDiagCleanup cleanup=0, void *cleanup_data=0, const string &stream_name="")
Set diagnostic stream.
virtual const char * what(void) const noexcept
Standard report (includes full backlog).
static CRef< CObjectManager > GetInstance(void)
Return the existing object manager or create one.
CSeq_entry_Handle AddTopLevelSeqEntry(CSeq_entry &top_entry, TPriority pri=kPriority_Default, EExist action=eExist_Default)
Add seq_entry, default priority is higher than for defaults or loaders Add object to the score with p...
CSeqVector GetSeqVector(EVectorCoding coding, ENa_strand strand=eNa_strand_plus) const
Get sequence: Iupacna or Iupacaa if use_iupac_coding is true.
@ eCoding_Ncbi
Set coding to binary coding (Ncbi4na or Ncbistdaa)
IO_PREFIX::ostream CNcbiOstream
Portable alias for ostream.
IO_PREFIX::istream CNcbiIstream
Portable alias for istream.
static string DoubleToString(double value, int precision=-1, TNumToStringFlags flags=0)
Convert double to string.
static string IntToString(int value, TNumToStringFlags flags=0, int base=10)
Convert int to string.
static bool StartsWith(const CTempString str, const CTempString start, ECase use_case=eCase)
Check if a string starts with a specified prefix value.
@ eBlast_filter_program_seg
E_Choice Which(void) const
Which variant is currently selected.
@ e_not_set
No variant selected.
The blob sat and sat key Both must be positive integers</td > n< td > Non empty string The interpretation of the blob id depends on a processor Cassandra n processor expects the following format
Contains the command line options common to filtering algorithms.
const size_t kNumInputFormats
Number of elements in kInputFormats.
const char * kOutputFormats[]
Output formats allowed, the first one is the default.
const size_t kNumOutputFormats
Number of elements in kOutputFormats.
const std::string kOutput
Command line flag to specify the output.
const std::string kOutputFormat
Command line flag to specify the output format.
const char * kInputFormats[]
Input formats allowed, the first one is the default.
const std::string kInput
Command line flag to specify the input.
const std::string kInputFormat
Command line flag to specify the input format.
string BuildAlgorithmParametersString(const CArgs &args)
Builds an algorithm options string for the filtering applications (segmasker, dustmasker) by examinin...
const string version
version string
Defines the CNcbiApplication and CAppException classes for creating NCBI applications.
int main(int argc, const char *argv[])
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4