Skip to content

Commit b9540cc

Browse files
eyalmozesgouriano
authored andcommitted
additional scores in feature generator
JIRA GP-39647 git-svn-id: https://anonsvn.ncbi.nlm.nih.gov/repos/v1/trunk/c++@103818 78c7ea69-d796-4a43-9a09-de51944f1b03
1 parent 5e9c51e commit b9540cc

File tree

1 file changed

+23
-0
lines changed

1 file changed

+23
-0
lines changed

src/algo/sequence/gene_model.cpp

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3848,6 +3848,29 @@ void CFeatureGenerator::SImplementation::x_SetComment(CSeq_feat& rna_feat,
38483848
}
38493849
}
38503850

3851+
if (align->GetSeqStart(0) > 0) {
3852+
align_info->AddField("5prime_unaligned", (int)align->GetSeqStart(0));
3853+
}
3854+
TSeqPos product_length = 0;
3855+
if (align->GetSegs().IsSpliced()) {
3856+
product_length = align->GetSegs().GetSpliced().CanGetPoly_a()
3857+
? align->GetSegs().GetSpliced().GetPoly_a()
3858+
: align->GetSegs().GetSpliced().GetProduct_length();
3859+
int internal_unaligned = align->GetSegs().GetSpliced()
3860+
.InternalUnaligned();
3861+
if (internal_unaligned > 0) {
3862+
align_info->AddField("internal_unaligned", internal_unaligned);
3863+
}
3864+
} else {
3865+
product_length = m_scope->GetSequenceLength(align->GetSeq_id(0));
3866+
}
3867+
if (product_length != kInvalidSeqPos &&
3868+
product_length > align->GetSeqStop(0) + 1)
3869+
{
3870+
align_info->AddField("3prime_unaligned",
3871+
(int)(product_length - align->GetSeqStop(0) - 1));
3872+
}
3873+
38513874
if (!rna_comment.empty()) {
38523875
if (!rna_feat.IsSetComment()) {
38533876
rna_feat.SetComment(rna_comment);

0 commit comments

Comments
 (0)