Esempio n. 1
0
 void execute()
 {
     set_samples_frequency();
     get_annotation();
     getsc_min_max();
     get_sample_intervals();
     init_samples();
     qrs_detection_algorithm();
 }
Esempio n. 2
0
static VALUE rxml_schema_type_annot(VALUE self)
{
    xmlSchemaTypePtr xtype;

    Data_Get_Struct(self, xmlSchemaType, xtype);

    if(xtype != NULL && xtype->annot != NULL)
        return get_annotation(xtype->annot);
    else
        return Qnil;
}
static void add_annotation_to_datanode(const pair<string, LeafData> & name_value, path::DataNode & data_node)
{
    YLOG_DEBUG("Got yfilter '{}' for {}", to_string(name_value.second.yfilter), name_value.first);
    if (name_value.second.yfilter != YFilter::read)
    {
        data_node.add_annotation(
                                 get_annotation(name_value.second.yfilter)
                                 );
        YLOG_DEBUG("Set yfilter '{}' for datanode '{}'", to_string(name_value.second.yfilter), name_value.first);
    }
    auto data_node_impl = dynamic_cast<path::DataNodeImpl*>(&data_node);
    data_node_impl->yfilter = name_value.second.yfilter;
}
static void add_annotation_to_datanode(const Entity & entity, path::DataNode & data_node)
{
    YLOG_DEBUG("Got yfilter '{}' for entity '{}'", to_string(entity.yfilter), entity.yang_name);
    if (entity.yfilter != YFilter::read)
    {
        data_node.add_annotation(
                                 get_annotation(entity.yfilter)
                                 );
        YLOG_DEBUG("Set yfilter '{}' for datanode '{}'", to_string(entity.yfilter), entity.yang_name);
    }
    auto data_node_impl = dynamic_cast<path::DataNodeImpl*>(&data_node);
    data_node_impl->yfilter = entity.yfilter;
}
Esempio n. 5
0
/** Function of type BFT_func_ptr extracting a core k-mer to disk.
*   A core k-mer contains in its annotation all genome ids inserted in the graph.
*   @param kmer is a k-mer from the BFT graph.
*   @param graph is the BFT from which kmer is from.
*   @param args contains all additional parameters given to extract_pangenome_kmers_to_disk():
*   A pointer to a file where to write the k-mer and a pointer to the current number of k-mers written.
*/
size_t extract_core_kmers(BFT_kmer* kmer, BFT* graph, va_list args){

    //Extract from the variable arguments list args a pointer to a file where to extract core k-mers
    FILE* file = va_arg(args, FILE*);
    //Extract from the variable arguments list args a pointer to the current number of core k-mers extracted
    int* nb_core_kmers = va_arg(args, int*);

    BFT_annotation* kmer_annot = get_annotation(kmer); //Get the k-mer annotation

    //If the k-mer annotation has all the genome ids inserted, k-mer is cpre
    if (get_count_id_genomes(kmer_annot, graph) == graph->nb_genomes){
        fwrite(kmer->kmer, sizeof(char), strlen(kmer->kmer)+1, file); //Write the k-mer in the file
        *nb_core_kmers += 1; //Increase the current number of core k-mers extracted
    }

    return true;
}

/** Function of type BFT_func_ptr extracting a dispensable k-mer to disk.
*   A dispensable k-mer contains in its annotation less than all genome ids inserted in the graph.
*   @param kmer is a k-mer from the BFT graph.
*   @param graph is the BFT from which kmer is from.
*   @param args contains all additional parameters given to extract_pangenome_kmers_to_disk():