How to use the bamnostic.bamnostic.utils.Roi function in bamnostic

To help you get started, we’ve selected a few bamnostic examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github betteridiot / bamnostic / bamnostic / bamnostic / utils.py View on Github external
if len(split_roi) <= 2:
        if not kwargs['until_eof']:
            warnings.warn('Fetching till end of contig. Potentially large region', RuntimeWarning )
            if yes_no():
                if len(split_roi) == 2:
                    return Roi(split_roi[0], int(split_roi[1]))
                else:
                    return Roi(split_roi[0])
            else:
                raise ValueError('User declined action')
        else:
            if len(split_roi) == 2:
                return Roi(split_roi[0], int(split_roi[1]))
            else:
                return Roi(split_roi[0])
    elif len(split_roi) == 3:
        return Roi(split_roi[0], int(split_roi[1]), int(split_roi[2]))
    else:
        return None
github betteridiot / bamnostic / bamnostic / bamnostic / utils.py View on Github external
for i, arg in enumerate(split_roi[1:]):
        split_roi[i+1] = int(arg)
    
    if len(split_roi) <= 2:
        if not kwargs['until_eof']:
            warnings.warn('Fetching till end of contig. Potentially large region', RuntimeWarning )
            if yes_no():
                if len(split_roi) == 2:
                    return Roi(split_roi[0], int(split_roi[1]))
                else:
                    return Roi(split_roi[0])
            else:
                raise ValueError('User declined action')
        else:
            if len(split_roi) == 2:
                return Roi(split_roi[0], int(split_roi[1]))
            else:
                return Roi(split_roi[0])
    elif len(split_roi) == 3:
        return Roi(split_roi[0], int(split_roi[1]), int(split_roi[2]))
    else:
        return None
github betteridiot / bamnostic / bamnostic / bamnostic / utils.py View on Github external
if not kwargs['until_eof']:
            warnings.warn('Fetching till end of contig. Potentially large region', RuntimeWarning )
            if yes_no():
                if len(split_roi) == 2:
                    return Roi(split_roi[0], int(split_roi[1]))
                else:
                    return Roi(split_roi[0])
            else:
                raise ValueError('User declined action')
        else:
            if len(split_roi) == 2:
                return Roi(split_roi[0], int(split_roi[1]))
            else:
                return Roi(split_roi[0])
    elif len(split_roi) == 3:
        return Roi(split_roi[0], int(split_roi[1]), int(split_roi[2]))
    else:
        return None