Ejemplo n.º 1
0
static rc_t SpotGroupSplitterFactory_Make( const SRASplitterFactory** cself,
        const SRATable* table, bool split, char* const spot_group[] )
{
    rc_t rc = 0;
    SpotGroupSplitterFactory* obj = NULL;

    if ( cself == NULL || table == NULL )
    {
        rc = RC( rcSRA, rcType, rcAllocating, rcParam, rcNull );
    }
    else
    {
        rc = SRASplitterFactory_Make( cself, eSplitterSpot, sizeof( *obj ),
                                      SpotGroupSplitterFactory_Init,
                                      SpotGroupSplitterFactory_NewObj,
                                      SpotGroupSplitterFactory_Release );
        if ( rc == 0 )
        {
            obj = ( SpotGroupSplitterFactory* ) *cself;
            obj->table = table;
            obj->split = split;
            obj->spot_group = spot_group;
        }
    }
    return rc;
}
Ejemplo n.º 2
0
static rc_t ReadFilterSplitterFactory_Make( const SRASplitterFactory** cself,
        const SRATable* table, SRAReadFilter read_filter )
{
    rc_t rc = 0;
    ReadFilterSplitterFactory* obj = NULL;

    if ( cself == NULL || table == NULL )
    {
        rc = RC( rcSRA, rcType, rcAllocating, rcParam, rcNull );
    }
    else
    {
        rc = SRASplitterFactory_Make( cself, eSplitterRead, sizeof( *obj ),
                                      ReadFilterSplitterFactory_Init,
                                      ReadFilterSplitterFactory_NewObj,
                                      ReadFilterSplitterFactory_Release );
        if ( rc == 0 )
        {
            obj = ( ReadFilterSplitterFactory* ) *cself;
            obj->table = table;
            obj->read_filter = read_filter;
        }
    }
    return rc;
}
Ejemplo n.º 3
0
static
rc_t IlluminaU32SplitterFactory_Make(const SRASplitterFactory** cself, const char* accession, const SRATable* table, TIlluminaLaneSplitterType type)
{
    rc_t rc = 0;
    IlluminaU32SplitterFactory* obj = NULL;

    if( cself == NULL || accession == NULL || table == NULL ) {
        rc = RC(rcSRA, rcType, rcConstructing, rcParam, rcNull);
    } else if( (rc = SRASplitterFactory_Make(cself, eSplitterSpot, sizeof(*obj),
                                             IlluminaU32SplitterFactory_Init,
                                             IlluminaU32SplitterFactory_NewObj,
                                             IlluminaU32SplitterFactory_Release)) == 0 ) {
        obj = (IlluminaU32SplitterFactory*)*cself;
        obj->accession = accession;
        obj->table = table;
        switch(type) {
            case eIlluminaLaneSplitter:
            case eIlluminaTileSplitter:
                obj->type = type;
                break;
            default:
                rc = RC(rcSRA, rcType, rcConstructing, rcParam, rcInvalid);
        }
    }
    return rc;
}
Ejemplo n.º 4
0
static
rc_t Absolid2BioFilterFactory_Make(const SRASplitterFactory** cself, const char* accession, const SRATable* table)
{
    rc_t rc = 0;
    Absolid2BioFilterFactory* obj = NULL;

    if( cself == NULL || accession == NULL || table == NULL ) {
        rc = RC(rcExe, rcType, rcConstructing, rcParam, rcNull);
    } else if( (rc = SRASplitterFactory_Make(cself, eSplitterSpot, sizeof(*obj),
                                             Absolid2BioFilterFactory_Init,
                                             Absolid2BioFilterFactory_NewObj,
                                             Absolid2BioFilterFactory_Release)) == 0 ) {
        obj = (Absolid2BioFilterFactory*)*cself;
        obj->accession = accession;
        obj->table = table;
    }
    return rc;
}
Ejemplo n.º 5
0
static rc_t MaxNReadsValidatorFactory_Make( const SRASplitterFactory** cself, const SRATable* table )
{
    rc_t rc = 0;
    MaxNReadsValidatorFactory* obj = NULL;

    if( cself == NULL || table == NULL )
    {
        rc = RC( rcSRA, rcType, rcAllocating, rcParam, rcNull );
    }
    else
    {
        rc = SRASplitterFactory_Make( cself, eSplitterSpot, sizeof( *obj ),
                                      MaxNReadsValidatorFactory_Init,
                                      MaxNReadsValidatorFactory_NewObj,
                                      MaxNReadsValidatorFactory_Release);
        if ( rc == 0 )
        {
            obj = ( MaxNReadsValidatorFactory* )*cself;
            obj->table = table;
        }
    }
    return rc;
}