annotations.py 文件源码

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

项目:cellranger 作者: 10XGenomics 项目源码 文件源码
def get_concat_reference_sequence(self):
        """Return a concatenated reference sequence.

        Return value:
        - (None,None) if this contig isn't annotated with a V and a J segment.
        Otherwise a tuple (seqs, annos) where annos is a list of Annotation objects
        in the order that they should appear in a VDJ sequence and seqs is a list
        of corresponding sequences from the input fasta.
        """
        v_region = self.get_region_hits(VDJ_V_FEATURE_TYPES)
        j_region = self.get_region_hits(VDJ_J_FEATURE_TYPES)

        if not v_region or not j_region:
            return (None, None)

        seqs = []
        ordered_annos = []
        for region_defs in VDJ_ORDERED_REGIONS:
            regions = self.get_region_hits(region_defs)
            if regions:
                seqs.append(regions[0].feature.sequence)
                ordered_annos.append(regions[0])

        return (seqs, ordered_annos)
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号