seq.py 文件源码

python
阅读 28 收藏 0 点赞 0 评论 0

项目:wub 作者: nanoporetech 项目源码 文件源码
def base_complement(k):
    """ Return complement of base.

    Performs the subsitutions: A<=>T, C<=>G, X=>X for both upper and lower
    case. The return value is identical to the argument for all other values.

    :param k: A base.
    :returns: Complement of base.
    :rtype: str

    """
    try:
        return comp[k]
    except KeyError:
        sys.stderr.write(
            "WARNING: No reverse complement for {} found, returning argument.".format(k))
        return k
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号