Mercurial > repos > davidvanzessen > baseline_fasta_generator
comparison script_imgt.py @ 4:aa4b95abef11 draft
Uploaded
| author | davidvanzessen |
|---|---|
| date | Wed, 23 Jul 2014 10:13:05 -0400 |
| parents | be17e1e7dc2b |
| children | 048f8cdbb6d2 |
comparison
equal
deleted
inserted
replaced
| 3:be17e1e7dc2b | 4:aa4b95abef11 |
|---|---|
| 52 o.write(">>>IMGT\n") | 52 o.write(">>>IMGT\n") |
| 53 outputdic = dict() | 53 outputdic = dict() |
| 54 for line in i.readlines()[1:]: | 54 for line in i.readlines()[1:]: |
| 55 linesplt = line.split("\t") | 55 linesplt = line.split("\t") |
| 56 ref = filterGene(linesplt[1], vPattern) | 56 ref = filterGene(linesplt[1], vPattern) |
| 57 if not ref: | 57 if not ref or not linesplt[2].rstrip(): |
| 58 continue | 58 continue |
| 59 if ref in outputdic: | 59 if ref in outputdic: |
| 60 outputdic[ref] += [(linesplt[0].replace(">", ""), linesplt[2].replace(">", "").rstrip())] | 60 outputdic[ref] += [(linesplt[0].replace(">", ""), linesplt[2].replace(">", "").rstrip())] |
| 61 else: | 61 else: |
| 62 outputdic[ref] = [(linesplt[0].replace(">", ""), linesplt[2].replace(">", "").rstrip())] | 62 outputdic[ref] = [(linesplt[0].replace(">", ""), linesplt[2].replace(">", "").rstrip())] |
