File: optionally_keep_sequence

package info (click to toggle)
ncbi-blast%2B 2.16.0%2Bds-7
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 143,172 kB
  • sloc: cpp: 985,828; ansic: 303,887; sh: 14,536; xml: 5,050; javascript: 3,442; python: 2,958; perl: 2,612; java: 2,284; makefile: 1,453; awk: 162; pascal: 72
file content (29 lines) | stat: -rw-r--r-- 1,305 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
Author: Aaron M. Ucko <ucko@debian.org>
Date:   Wed Dec 14 22:44:19 2016 -0500
Description: Hang on to sequence data even if -parse_deflines recognized a non-local ID,
    on the condition that the environment variable BLAST_ALWAYS_KEEP_SEQUENCE
    (or configuration parameter [BLAST] always_keep_sequence) is set to a
    "true" value (English-only, case-insensitive true, t, yes, y, or 1).
--- a/c++/src/algo/blast/api/search_strategy.cpp
+++ b/c++/src/algo/blast/api/search_strategy.cpp
@@ -560,6 +560,11 @@ void CExportStrategy::x_Process_Pssm(CRe
     m_QueueSearchRequest->SetService(new_service);
 }
 
+NCBI_PARAM_DECL(bool, BLAST, always_keep_sequence);
+NCBI_PARAM_DEF_EX(bool, BLAST, always_keep_sequence, false, eParam_Default,
+                  BLAST_ALWAYS_KEEP_SEQUENCE);
+typedef NCBI_PARAM_TYPE(BLAST, always_keep_sequence) TAlwaysKeepSequence;
+
 void CExportStrategy::x_Process_Query(CRef<IQueryFactory> & query)
 {
     if (query.Empty())
@@ -581,7 +586,7 @@ void CExportStrategy::x_Process_Query(CR
     // Check if there are any range restrictions applied and if local IDs are
     // being used to determine how to specify the query sequence(s)
 
-    bool has_local_ids = false;
+    bool has_local_ids = TAlwaysKeepSequence::GetDefault();
 
     if (!seqloc_list.empty())
     {