1 #ifndef OBJTOOLS_EDIT___SEQ_ENTRY_EDIT__HPP
2 #define OBJTOOLS_EDIT___SEQ_ENTRY_EDIT__HPP
142 const vector<CSeqdesc::E_Choice> &choices_to_delete =
143 vector<CSeqdesc::E_Choice>() );
175 size_t min_unknown,
int max_unknown,
176 size_t min_known,
int max_known,
177 bool is_assembly_gap =
false,
int gap_type =
CSeq_gap::eType_unknown,
int linkage = -1,
int linkage_evidence = -1 );
181 size_t min_unknown,
int max_unknown,
182 size_t min_known,
int max_known,
183 bool is_assembly_gap =
false,
int gap_type =
CSeq_gap::eType_unknown,
int linkage = -1,
int linkage_evidence = -1 );
265 const TCuts& sorted_cuts);
271 const TCuts& sorted_cuts);
277 const TCuts& sorted_cuts);
282 const TCuts& sorted_cuts,
283 bool& bFeatureDeleted,
284 bool& bFeatureTrimmed,
User-defined methods of the data storage class.
User-defined methods of the data storage class.
User-defined methods of the data storage class.
@Seq_descr.hpp User-defined methods of the data storage class.
namespace ncbi::objects::
Include a standard set of the NCBI C++ Toolkit most basic headers.
unsigned int TSeqPos
Type for sequence locations and lengths.
vector< CBioseq_Handle > TBioseqHandles
#define NCBI_STD_DEPRECATED(message)
#define END_NCBI_SCOPE
End previously defined NCBI scope.
#define END_SCOPE(ns)
End the previously defined scope.
#define BEGIN_NCBI_SCOPE
Define ncbi namespace.
#define BEGIN_SCOPE(ns)
Define a new scope.
#define NCBI_XOBJEDIT_EXPORT
void TrimSeqAlign(CBioseq_Handle bsh, CRef< CSeq_align > align, const TCuts &sorted_cuts)
Trim Seq-align annotation.
void SetLinkageType(CSeq_ext &ext, CSeq_gap::TType linkage_type)
SetLinkageType A function to set the linkage_type for gaps in a delta sequence.
void DivvyUpAlignments(const TVecOfSeqEntryHandles &vecOfSeqEntryHandles)
Call this if the alignments directly under these seq-entries are all jumbled up between each other.
void AddBioseqToBioseq(const CBioseq_Handle &to, const CBioseq_Handle &add)
Attach one Bioseq to another.
void TrimSequenceAndAnnotation(CBioseq_Handle bsh, const TCuts &cuts, EInternalTrimType internal_cut_conversion=eTrimToClosestEnd)
Trim sequence data and all associated annotation.
void AddSeqEntryToSeqEntry(const CSeq_entry_Handle &to, const CSeq_entry_Handle &add)
Attach one Seq-entry to another.
void TrimSeqData(CBioseq_Handle bsh, CRef< CSeq_inst > inst, const TCuts &sorted_cuts)
Trim sequence data.
TLocAdjustmentVector NormalizeUnknownLengthGaps(CSeq_inst &inst, TSeqPos unknown_length=100)
NormalizeUnknownLengthGaps A function to adjust the length of unknown-length gaps to a specific lengt...
void AddBioseqToBioseqSet(const CBioseq_set_Handle &bsst, const CBioseq_Handle &seq)
Add a Bioseq to a Bioseq-set.
CRef< CSeqdesc > FindUnverified(const CBioseq &seq)
void RetranslateCdregion(CBioseq_Handle nuc_bsh, bool partial_start, bool partial_stop, CRef< CSeq_inst > trimmed_nuc_inst, CRef< CSeq_feat > cds, const TCuts &sorted_cuts)
Secondary function needed after trimming Seq-feat.
void SortSeqDescr(CSeq_entry &entry)
void TrimSeqGraph(CBioseq_Handle bsh, CRef< CSeq_graph > graph, const TCuts &sorted_cuts)
Trim Seq-graph annotation.
void SetTargetedLocusName(CBioseq_Handle seq, const string &tls)
bool IsUnverifiedMisassembled(const CBioseq &seq)
string GetTargetedLocusName(const CSeq_feat &feat)
vector< TLocAdjustment > TLocAdjustmentVector
void AddLocalIdUserObjects(CSeq_entry &entry)
Creates a User-object descriptor on every sequence that has a local ID Contains the original local ID...
CRef< CSeq_entry > SeqEntryFromSeqSubmit(const CSeq_submit &submit)
Create a Seq-entry from a Seq-submit.
void BioseqSetDescriptorPropagateDown(const CBioseq_set_Handle &bioseq_set_h, const vector< CSeqdesc::E_Choice > &choices_to_delete=vector< CSeqdesc::E_Choice >())
Moves descriptors down to children of the given bioseq-set.
NCBI_XOBJEDIT_EXPORT void AdjustCdregionFrame(TSeqPos original_nuc_len, CRef< CSeq_feat > cds, const TCuts &sorted_cuts)
Secondary function needed after trimming Seq-feat.
bool HasRepairedIDs(const CSeq_entry &entry)
Detects whether colliding IDs were fixed by comparing sequence IDs to the contents of the OriginalID ...
void RemoveUserObjectType(CSeq_entry &entry, CUser_object::EObjectType type)
Removes User-object descriptors of a certain type from the seq-entry.
bool IsUnverifiedOrganism(const CBioseq &seq)
vector< CSeq_entry_Handle > TVecOfSeqEntryHandles
CRef< CBioseq > SetNewProteinSequence(CScope &new_scope, CRef< CSeq_feat > cds, CRef< CSeq_inst > new_inst)
Secondary function needed after trimming Seq-feat.
void SetLinkageTypeScaffold(CSeq_ext &ext, CLinkage_evidence::TType evidence_type)
SetLinkageTypeScaffold A special case of SetLinkageType.
void SetLinkageTypeLinkedRepeat(CSeq_ext &ext, CLinkage_evidence::TType evidence_type)
void DeleteProteinAndRenormalizeNucProtSet(const CSeq_feat_Handle &feat_h)
Secondary function needed after trimming Seq-feat.
void ConvertRawToDeltaByNs(CSeq_inst &inst, size_t min_unknown, int max_unknown, size_t min_known, int max_known, bool is_assembly_gap=false, int gap_type=CSeq_gap::eType_unknown, int linkage=-1, int linkage_evidence=-1)
ConvertRawToDeltaByNs A function to convert a raw sequence to a delta sequence, using runs of Ns to d...
string GetTargetedLocusNameConsensus(const string &tls1, const string &tls2)
void TrimSeqFeat(CRef< CSeq_feat > feat, const TCuts &sorted_cuts, bool &bFeatureDeleted, bool &bFeatureTrimmed, bool &partial_start, bool &partial_stop)
Trim Seq-feat annotation.
void GetSortedCuts(CBioseq_Handle bsh, const TCuts &cuts, TCuts &sorted_cuts, EInternalTrimType internal_cut_conversion=eTrimToClosestEnd)
1) Merge abutting and overlapping cuts.
void ResetLinkageEvidence(CSeq_ext &ext, CLinkage_evidence::TType evidence_type)
bool IsUnverifiedContaminant(const CBioseq &seq)
bool IsUnverifiedFeature(const CBioseq &seq)
EInternalTrimType
Any internal cut listed in TCuts will be converted to a terminal cut using one of these options.
void AddLinkageEvidence(CSeq_ext &ext, CLinkage_evidence::TType evidence_type)
AddLinkageEvidence A function to add linkage evidence for gaps in a delta sequence.
CRange< TSeqPos > TRange
A list of trim coordinates.
string GenerateTargetedLocusName(CBioseq_Handle seq)
NCBI_XOBJEDIT_EXPORT void SegregateSetsByBioseqList(const CSeq_entry_Handle &target, const CScope::TBioseqHandles &bioseq_handles)
Split a Seq-entry, where the second part holds the given bioseqs.
void BioseqSetDescriptorPropagateUp(CBioseq_set_Handle set)
Moves descriptors up from children of the given bioseq-set if each child has an identical copy of the...
pair< TSeqPos, int > TLocAdjustment
void HandleCollidingIds(CSeq_entry &entry)