Did I find the right examples for you? yes no      Crawl my project      Python Jobs

All Samples(4)  |  Call(3)  |  Derive(0)  |  Import(1)
It returns the integer corresponding to the given list of tags

        def bit_tags_to_int_flag(bit_tags):
    'It returns the integer corresponding to the given list of tags'
    return reduce(or_, bit_tags)
        


src/s/e/seq_crumbs-HEAD/test/test_sam_utils.py   seq_crumbs(Download)
import unittest
 
from crumbs.utils.sam import (bit_tags_to_int_flag, int_flag_to_bit_tags,
                              IS_PAIRED, IS_IN_PROPER_PAIR)
 
 
class FlagTests(unittest.TestCase):
    def test_create_flag(self):
        assert bit_tags_to_int_flag([IS_PAIRED]) == 1
        assert bit_tags_to_int_flag([IS_IN_PROPER_PAIR]) == 2
    def test_create_flag(self):
        assert bit_tags_to_int_flag([IS_PAIRED]) == 1
        assert bit_tags_to_int_flag([IS_IN_PROPER_PAIR]) == 2
        assert bit_tags_to_int_flag([IS_PAIRED, IS_IN_PROPER_PAIR]) == 3