coding_dna = Seq(Refseq1, generic_dna) coding_dna.translate() str(coding_dna.translate()) seq = '' for i in range(len(Refseq1)): seq += Refseq1[i] typing1 = 'A*23:17' typing2 = 'A*23:01:01' HLAtyping = typing1+'_'+typing2 Exons = 'Exon1, Exon2, Exon3, Exon4, Exon5, Exon6, Exon7, Exon8' IMGTdbIO.checkSynonymMutation(HLAtyping, Exons, db_fp = '../Database/') ################## ## Check Synonymous ################# out_fp = '../Output/Stats/allLoci_paired_cases/' Loci_num = 'AllLoci' for locus in All_loci: for Allele, Item in AllField_allele_stats[locus].items(): if Item['ARS'] AllField_allele_stats[locus] TwoField_allele_stats[locus]
AllField_allele_stats[locus][FullField][ 'ARS'].append(caseID) TwoField_allele_stats[locus][TwoField][ 'ARS'].append(caseID) #ExonList = [exn.split('.')[0] for exn in Records[locus][ps]['ARS']] #ExonList = list(set(ExonList)) #Exons = '' #for i in range(len(ExonList)): # if i == 0: # Exons += ExonList[i] # else: # Exons += ', ' + ExonList[i] if not IMGTdbIO.checkSynonymMutation( FullField, 'Exon1, Exon2, Exon3', db_fp): # non-synonymous AllField_allele_stats[locus][FullField][ 'ARS_nonSynonymous'].append(caseID) TwoField_allele_stats[locus][TwoField][ 'ARS_nonSynonymous'].append(caseID) if len(Records[locus][ps]['non_ARS_exon']) > 0: AllField_allele_stats[locus][FullField][ 'non_ARS_exon'].append(caseID) TwoField_allele_stats[locus][TwoField][ 'non_ARS_exon'].append(caseID) ExonList = [ exn.split('.')[0] for exn in Records[locus] [ps]['non_ARS_exon']