readcounts.py 文件源码

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

项目:ngsphy 作者: merlyescalona 项目源码 文件源码
def getHaploidIndividualSequence(self,msa,ind):
        """
        Extract individuals "ind" sequence(s) from MSA dictionary
        ------------------------------------------------------------------------
        Parameters:
        - msa: dictionary
        - ind: dict(indexREP,seqDEscription)
        Returns:
        - sequence of the individual
        """
        # ind: [indID,indexREP,seqDescription]
        self.appLogger.debug("getHaploidIndividualSequence(self,msa,ind)")
        seqSize=len(msa["{0}_{1}".format(str(1),str(0))][str(0)]['sequence'])
        fullInd=None; speciesID=None; tipID=None; tmp=None
        fullInd=np.chararray(shape=(1,seqSize), itemsize=1)
        speciesID=ind["spID"].strip()
        locusID=ind["locID"].strip()
        tipID=ind["geneID"].strip()
        tmp=list(msa["{0}_{1}".format(str(speciesID), str(locusID))][str(tipID)]['sequence'])
        fullInd=[item for item in tmp]
        return fullInd
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号