本文整理汇总了C++中CSeq_feat::SetData方法的典型用法代码示例。如果您正苦于以下问题:C++ CSeq_feat::SetData方法的具体用法?C++ CSeq_feat::SetData怎么用?C++ CSeq_feat::SetData使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类CSeq_feat
的用法示例。
在下文中一共展示了CSeq_feat::SetData方法的12个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: xFeatureMakeRegulatory
// ----------------------------------------------------------------------------
bool CSoMap::xFeatureMakeRegulatory(
const string& so_type,
CSeq_feat& feature)
// ----------------------------------------------------------------------------
{
static const map<string, string, CompareNoCase> mapTypeToQual = {
{"DNAsel_hypersensitive_site", "DNase_I_hypersensitive_site"},
{"GC_rich_promoter_region", "GC_signal"},
{"boundary_element", "insulator"},
{"regulatory_region", "other"},
{"ribosome_entry_site", "ribosome_binding_site"},
};
feature.SetData().SetImp().SetKey("regulatory");
CRef<CGb_qual> regulatory_class(new CGb_qual);
regulatory_class->SetQual("regulatory_class");
auto cit = mapTypeToQual.find(so_type);
if (cit == mapTypeToQual.end()) {
regulatory_class->SetVal(so_type);
}
else {
regulatory_class->SetVal(cit->second);
}
feature.SetQual().push_back(regulatory_class);
return true;
}
示例2: xFeatureMakeRegion
// ----------------------------------------------------------------------------
bool CSoMap::xFeatureMakeRegion(
const string& so_type,
CSeq_feat& feature)
// ----------------------------------------------------------------------------
{
feature.SetData().SetRegion();
CRef<CGb_qual> qual(new CGb_qual("SO_type", so_type));
feature.SetQual().push_back(qual);
return true;
}
示例3: xFeatureMakeMiscRna
// ----------------------------------------------------------------------------
bool CSoMap::xFeatureMakeMiscRna(
const string& so_type,
CSeq_feat& feature)
// ----------------------------------------------------------------------------
{
feature.SetData().SetImp().SetKey("misc_RNA");
if (so_type=="pseudogenic_transcript") {
feature.SetPseudo(true);
}
return true;
}
示例4: xFeatureMakeCds
// ----------------------------------------------------------------------------
bool CSoMap::xFeatureMakeCds(
const string& so_type,
CSeq_feat& feature)
// ----------------------------------------------------------------------------
{
feature.SetData().SetCdregion();
if (so_type=="pseudogenic_CDS") {
feature.SetPseudo(true);
}
return true;
}
示例5: xFeatureMakeGene
// ----------------------------------------------------------------------------
bool CSoMap::xFeatureMakeGene(
const string& so_type,
CSeq_feat& feature)
// ----------------------------------------------------------------------------
{
feature.SetData().SetGene();
if (so_type == "pseudogene") {
feature.SetPseudo(true);
}
return true;
}
示例6: xFeatureMakeImp
// ----------------------------------------------------------------------------
bool CSoMap::xFeatureMakeImp(
const string& so_type,
CSeq_feat& feature)
// ----------------------------------------------------------------------------
{
static const map<string, string, CompareNoCase> mapTypeToKey = {
{"C_gene_segment", "C_region"},
{"D_gene_segment", "D_segment"},
{"D_loop", "D-loop"},
{"J_gene_segment", "J_segment"},
{"V_gene_segment", "V_segment"},
{"binding_site", "misc_binding"},
{"five_prime_UTR", "5\'UTR"},
{"long_terminal_repeat", "LTR"},
{"mature_protein_region", "mat_peptide"},
{"mobile_genetic_element", "mobile_element"},
{"modified_DNA_base", "modified_base"},
{"origin_of_replication", "rep_origin"},
{"primary_transcript", "prim_transcript"},
{"primer_binding_site", "primer_bind"},
{"protein_binding_site", "protein_bind"},
{"region", "source"},
{"sequence_alteration", "variation"},
{"sequence_difference", "misc_difference"},
{"sequence_secondary_structure", "misc_structure"},
{"sequence_uncertainty", "unsure"},
{"signal_peptide", "sig_peptide"},
{"three_prime_UTR", "3\'UTR"},
};
auto cit = mapTypeToKey.find(so_type);
if (cit == mapTypeToKey.end()) {
feature.SetData().SetImp().SetKey(so_type);
}
else {
feature.SetData().SetImp().SetKey(cit->second);
}
return true;
}
示例7: xFeatureMakeProt
// ----------------------------------------------------------------------------
bool CSoMap::xFeatureMakeProt(
const string& so_type,
CSeq_feat& feature)
// ----------------------------------------------------------------------------
{
static const map<string, CProt_ref::EProcessed, CompareNoCase>
mTypeToProcessed = {
{"mature_protein_region", CProt_ref::eProcessed_mature},
{"propeptide", CProt_ref::eProcessed_propeptide},
};
auto cit = mTypeToProcessed.find(so_type);
if (cit == mTypeToProcessed.end()) {
return false;
}
feature.SetData().SetProt().SetProcessed(cit->second);
return true;
}
示例8: xFeatureMakeRna
// ----------------------------------------------------------------------------
bool CSoMap::xFeatureMakeRna(
const string& so_type,
CSeq_feat& feature)
// ----------------------------------------------------------------------------
{
static const map<string, CRNA_ref::EType, CompareNoCase> mTypeToRna = {
{"mRNA", CRNA_ref::eType_mRNA},
{"rRNA", CRNA_ref::eType_rRNA},
{"pseudogenic_rRNA", CRNA_ref::eType_rRNA},
{"tRNA", CRNA_ref::eType_tRNA},
{"pseudogenic_tRNA", CRNA_ref::eType_tRNA},
{"tmRNA", CRNA_ref::eType_tmRNA},
};
auto it = mTypeToRna.find(so_type);
feature.SetData().SetRna().SetType(it->second);
if(NStr::StartsWith(so_type, "pseudogenic_")) {
feature.SetPseudo(true);
}
return true;
}
示例9: xFeatureMakeRepeatRegion
// ----------------------------------------------------------------------------
bool CSoMap::xFeatureMakeRepeatRegion(
const string& so_type,
CSeq_feat& feature)
// ----------------------------------------------------------------------------
{
static const map<string, string, CompareNoCase> mapTypeToSatellite = {
{"microsatellite", "microsatellite"},
{"minisatellite", "minisatellite"},
{"satellite_DNA", "satellite"},
};
static const map<string, string, CompareNoCase> mapTypeToRptType = {
{"tandem_repeat", "tandem"},
{"inverted_repeat", "inverted"},
{"direct_repeat", "direct"},
{"nested_repeat", "nested"},
{"non_LTR_retrotransposon_polymeric_tract", "non_ltr_retrotransposon_polymeric_tract"},
{"X_element_combinatorial_repeat", "x_element_combinatorial_repeat"},
{"Y_prime_element", "y_prime_element"},
{"repeat_region", "other"},
};
feature.SetData().SetImp().SetKey("repeat_region");
CRef<CGb_qual> qual(new CGb_qual);
auto cit = mapTypeToSatellite.find(so_type);
if (cit != mapTypeToSatellite.end()) {
qual->SetQual("satellite");
qual->SetVal(cit->second);
}
else {
qual->SetQual("rpt_type");
cit = mapTypeToRptType.find(so_type);
if (cit == mapTypeToRptType.end()) {
qual->SetVal(so_type);
}
else {
qual->SetVal(cit->second);
}
}
feature.SetQual().push_back(qual);
return true;
}
示例10: xFeatureMakeNcRna
// ----------------------------------------------------------------------------
bool CSoMap::xFeatureMakeNcRna(
const string& so_type,
CSeq_feat& feature)
// ----------------------------------------------------------------------------
{
static const map<string, string, CompareNoCase> mTypeToClass = {
{"ncRNA", "other"},
};
feature.SetData().SetRna().SetType(CRNA_ref::eType_ncRNA);
CRef<CGb_qual> qual(new CGb_qual);
qual->SetQual("ncRNA_class");
auto it = mTypeToClass.find(so_type);
if (it == mTypeToClass.end()) {
qual->SetVal(so_type);
}
else {
qual->SetVal(it->second);
}
feature.SetQual().push_back(qual);
return true;
}
示例11: xFeatureMakeMiscRecomb
// ----------------------------------------------------------------------------
bool CSoMap::xFeatureMakeMiscRecomb(
const string& so_type,
CSeq_feat& feature)
// ----------------------------------------------------------------------------
{
static const map<string, string, CompareNoCase> mapTypeToQual = {
{"meiotic_recombination_region", "meiotic"},
{"mitotic_recombination_region", "mitotic"},
{"non_allelic_homologous_recombination", "non_allelic_homologous"},
{"recombination_feature", "other"},
};
feature.SetData().SetImp().SetKey("misc_recomb");
CRef<CGb_qual> recombination_class(new CGb_qual);
recombination_class->SetQual("recombination_class");
auto cit = mapTypeToQual.find(so_type);
if (cit == mapTypeToQual.end()) {
recombination_class->SetVal(so_type);
}
else {
recombination_class->SetVal(cit->second);
}
feature.SetQual().push_back(recombination_class);
return true;
}
示例12: xFeatureMakeMiscFeature
// ----------------------------------------------------------------------------
bool CSoMap::xFeatureMakeMiscFeature(
const string& so_type,
CSeq_feat& feature)
// ----------------------------------------------------------------------------
{
static const map<string, string, CompareNoCase> mapTypeToQual = {
{"TSS", "transcription_start_site"},
};
feature.SetData().SetImp().SetKey("misc_feature");
if (so_type == "sequence_feature") {
return true;
}
CRef<CGb_qual> feat_class(new CGb_qual);
feat_class->SetQual("feat_class");
auto cit = mapTypeToQual.find(so_type);
if (cit == mapTypeToQual.end()) {
feat_class->SetVal(so_type);
}
else {
feat_class->SetVal(cit->second);
}
feature.SetQual().push_back(feat_class);
return true;
}