コード例 #1
0
ファイル: vdb_info.c プロジェクト: genome-vendor/sra-sdk
static rc_t vdb_info_print_dflt( vdb_info_data * data )
{
    rc_t rc= KOutMsg( "acc    : %s\n", data->acc );
    if ( rc == 0 && data->path[ 0 ] != 0 )
        rc = KOutMsg( "path   : %s\n", data->path );
    if ( rc == 0 && data->file_size != 0 )
        rc = KOutMsg( "size   : %,lu\n", data->file_size );
    if ( rc == 0 && data->s_path_type[ 0 ] != 0 )
        rc = KOutMsg( "type   : %s\n", data->s_path_type );
    if ( rc == 0 && data->s_platform[ 0 ] != 0 )
        rc = KOutMsg( "platf  : %s\n", data->s_platform );
    if ( rc == 0 && data->seq_rows != 0 )
        rc = KOutMsg( "SEQ    : %,lu\n", data->seq_rows );
    if ( rc == 0 && data->ref_rows != 0 )
        rc = KOutMsg( "REF    : %,lu\n", data->ref_rows );
    if ( rc == 0 && data->prim_rows != 0 )
        rc = KOutMsg( "PRIM   : %,lu\n", data->prim_rows );
    if ( rc == 0 && data->sec_rows != 0 )
        rc = KOutMsg( "SEC    : %,lu\n", data->sec_rows );
    if ( rc == 0 && data->ev_rows != 0 )
        rc = KOutMsg( "EVID   : %,lu\n", data->ev_rows );
    if ( rc == 0 && data->ev_int_rows != 0 )
        rc = KOutMsg( "EVINT  : %,lu\n", data->ev_int_rows );
    if ( rc == 0 && data->consensus_rows != 0 )
        rc = KOutMsg( "CONS   : %,lu\n", data->consensus_rows );
    if ( rc == 0 && data->passes_rows != 0 )
        rc = KOutMsg( "PASS   : %,lu\n", data->passes_rows );
    if ( rc == 0 && data->metrics_rows != 0 )
        rc = KOutMsg( "METR   : %,lu\n", data->metrics_rows );

    if ( rc == 0 && data->schema_name[ 0 ] != 0 )
        rc = KOutMsg( "SCHEMA : %s\n", data->schema_name );

    if ( rc == 0 && data->ts.timestamp != 0 )
        rc = KOutMsg( "TIME   : 0x%.016x (%.02d/%.02d/%d %.02d:%.02d)\n",
                      data->ts.timestamp, data->ts.month, data->ts.day, data->ts.year,
                      data->ts.hour, data->ts.minute );

    if ( rc == 0 )
        vdb_info_print_dflt_event( &data->formatter, "FMT" );
    if ( rc == 0 )
        vdb_info_print_dflt_event( &data->loader, "LDR" );
    if ( rc == 0 )
        vdb_info_print_dflt_event( &data->update, "UPD" );

    return rc;
}
コード例 #2
0
ファイル: vdb_info.c プロジェクト: ncbi/sra-tools
static rc_t vdb_info_print_dflt( vdb_info_data * data )
{
    rc_t rc= KOutMsg( "acc    : %s\n", data->acc );

    if ( rc == 0 && data->path[ 0 ] != 0 )
        rc = KOutMsg( "path   : %s\n", data->path );

    if ( rc == 0 && data->remote_path[ 0 ] != 0 )
        rc = KOutMsg( "remote : %s\n", data->remote_path );

    if ( rc == 0 && data->file_size != 0 )
        rc = KOutMsg( "size   : %,lu\n", data->file_size );

    if ( rc == 0 && data->cache[ 0 ] != 0 )
    {
        rc = KOutMsg( "cache  : %s\n", data->cache );
        if ( rc == 0 )
            rc = KOutMsg( "percent: %f\n", data->cache_percent );
        if ( rc == 0 )
            rc = KOutMsg( "bytes  : %,lu\n", data->bytes_in_cache );
    }
    
    if ( rc == 0 && data->s_path_type[ 0 ] != 0 )    
        rc = KOutMsg( "type   : %s\n", data->s_path_type );

    if ( rc == 0 && data->s_platform[ 0 ] != 0 )
        rc = KOutMsg( "platf  : %s\n", data->s_platform );

    if ( rc == 0 && data->seq_rows != 0 )
        rc = KOutMsg( "SEQ    : %,lu\n", data->seq_rows );

    if ( rc == 0 && data->ref_rows != 0 )
        rc = KOutMsg( "REF    : %,lu\n", data->ref_rows );

    if ( rc == 0 && data->prim_rows != 0 )
        rc = KOutMsg( "PRIM   : %,lu\n", data->prim_rows );

    if ( rc == 0 && data->sec_rows != 0 )
        rc = KOutMsg( "SEC    : %,lu\n", data->sec_rows );

    if ( rc == 0 && data->ev_rows != 0 )
        rc = KOutMsg( "EVID   : %,lu\n", data->ev_rows );

    if ( rc == 0 && data->ev_int_rows != 0 )
        rc = KOutMsg( "EVINT  : %,lu\n", data->ev_int_rows );

    if ( rc == 0 && data->consensus_rows != 0 )
        rc = KOutMsg( "CONS   : %,lu\n", data->consensus_rows );

    if ( rc == 0 && data->passes_rows != 0 )
        rc = KOutMsg( "PASS   : %,lu\n", data->passes_rows );

    if ( rc == 0 && data->metrics_rows != 0 )
        rc = KOutMsg( "METR   : %,lu\n", data->metrics_rows );

    if ( rc == 0 && data->schema_name[ 0 ] != 0 )
        rc = KOutMsg( "SCHEMA : %s\n", data->schema_name );

    if ( rc == 0 && data->ts.timestamp != 0 )
        rc = KOutMsg( "TIME   : 0x%.016x (%.02d/%.02d/%d %.02d:%.02d)\n",
                      data->ts.timestamp, data->ts.month, data->ts.day, data->ts.year,
                      data->ts.hour, data->ts.minute );

    if ( rc == 0 && data->species[ 0 ] != 0 )
        rc = KOutMsg( "SPECIES: %s\n", data->species );
        
    if ( rc == 0 )
        vdb_info_print_dflt_event( &data->formatter, "FMT" );
    if ( rc == 0 )
        vdb_info_print_dflt_event( &data->loader, "LDR" );
    if ( rc == 0 )
        vdb_info_print_dflt_event( &data->update, "UPD" );

    if ( rc == 0 && data->bam_hdr.present )
    {
        rc = KOutMsg( "BAMHDR : %d bytes / %d lines\n", data->bam_hdr.hdr_bytes, data->bam_hdr.total_lines );
        if ( rc == 0 && data->bam_hdr.HD_lines > 0 )
            rc = KOutMsg( "BAMHDR : %d HD-lines\n", data->bam_hdr.HD_lines );
        if ( rc == 0 && data->bam_hdr.SQ_lines > 0 )
            rc = KOutMsg( "BAMHDR : %d SQ-lines\n", data->bam_hdr.SQ_lines );
        if ( rc == 0 && data->bam_hdr.RG_lines > 0 )
            rc = KOutMsg( "BAMHDR : %d RG-lines\n", data->bam_hdr.RG_lines );
        if ( rc == 0 && data->bam_hdr.PG_lines > 0 )
            rc = KOutMsg( "BAMHDR : %d PG-lines\n", data->bam_hdr.PG_lines );
    }
    
    return rc;
}