Ignore:
Timestamp:
Mar 14, 2013, 2:30:14 PM (9 years ago)
Author:
Peter
Message:

closes #739. Two new functions in BamHeader?: tid(string) and parse_region.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/yat/omic/BamHeader.h

    r2993 r2999  
    55
    66/*
    7   Copyright (C) 2012 Peter Johansson
     7  Copyright (C) 2012, 2013 Peter Johansson
    88
    99  This file is part of the yat library, http://dev.thep.lu.se/yat
     
    2727#include YAT_BAM_HEADER
    2828
     29#include <string>
     30
    2931namespace theplu {
    3032namespace yat {
     
    4749
    4850    /**
     51       Parse a region in the format: 'chr2:100,000-200,000 and return
     52       values in variables \a tid, \a begin and \a end. \a reg is
     53       1-based and \a begin and \a end are 0-based, i.e.,
     54       "chr2:100,000-200,000" will set \a begin = 99000 and \a end =
     55       200000.
     56
     57       \see bam_parse_region
     58
     59       \throw utility::runtime_error on failure
     60
     61       \since new in yat 0.11
     62     */
     63    void parse_region(const std::string& reg, int& tid, int& begin,
     64                      int& end) const;
     65
     66    /**
    4967       Name of chromosome with ID \a tid
    5068     */
     
    5573     */
    5674    uint32_t target_length(size_t tid) const;
     75
     76    /**
     77       \brief inverse of target_name(size_t)
     78
     79       \note If \a name does not exist, behaviour is unexpected.
     80
     81       \since new in yat 0.11
     82     */
     83    int32_t tid(const std::string& name) const;
    5784
    5885    /**
Note: See TracChangeset for help on using the changeset viewer.