Mercurial > repos > erasmus-medical-center > hla_dq
comparison hla_dq.py @ 1:4fc47a3ff9e8 draft default tip
planemo upload for repository https://github.com/ErasmusMC-Bioinformatics/galaxytools-emc/tree/master/tools/hla_dq commit 3f631031b57350f0437e90e4de3352725bb84716
author | erasmus-medical-center |
---|---|
date | Wed, 30 May 2018 09:21:15 -0400 |
parents | 10a407fb5072 |
children |
comparison
equal
deleted
inserted
replaced
0:10a407fb5072 | 1:4fc47a3ff9e8 |
---|---|
40 from A and B, determine possible associated serotypes | 40 from A and B, determine possible associated serotypes |
41 ''' | 41 ''' |
42 | 42 |
43 ''' each combination of DQA1,DQB1,type ''' | 43 ''' each combination of DQA1,DQB1,type ''' |
44 associated_combinations = [ | 44 associated_combinations = [ |
45 ['02:01', '02:02', 'DQ2.2'], | 45 ['02:01', '02:02', ' DQ2.2 (02:01-02:02)'], |
46 ['03:03', '02:02', 'DQ2.3'], | 46 ['03:03', '02:02', ' DQ2.3 (03:03-02:02)'], |
47 ['05:01', '02:01', 'DQ2.5'], | 47 ['05:01', '02:01', ' DQ2.5 (05:01-02:01)'], |
48 ['03:01', '03:02', 'DQ8'], | 48 ['03:01', '03:02', ' DQ8 (03:01-03:02)'], |
49 ['03:02', '03:02', 'DQ8'], | 49 ['03:02', '03:02', ' DQ8 (03:02-03:02)'], |
50 ['03:03', '03:02', 'DQ8']] | 50 ['03:03', '03:02', ' DQ8 (03:03-03:02)']] |
51 | 51 |
52 return [a[2] for a in associated_combinations | 52 return [a[2] for a in associated_combinations |
53 if a[0] in typesA and a[1] in typesB] | 53 if a[0] in typesA and a[1] in typesB] |
54 | 54 |
55 | 55 |
81 for line in associations: | 81 for line in associations: |
82 bcount += 1 | 82 bcount += 1 |
83 outfile.write( | 83 outfile.write( |
84 'A' + str(bcount) + '\t' + | 84 'A' + str(bcount) + '\t' + |
85 '\t'.join([';'.join(sorted(set(l))) | 85 '\t'.join([';'.join(sorted(set(l))) |
86 if l else '-' for l in line])+'\n') | 86 if l else ' -' for l in line])+'\n') |