Commit cf74a343 by Mathieu Giraud

### germline/split-from-imgt.py: handle custom 118 positions

parent 7d72e3b2
 ... @@ -130,15 +130,25 @@ CUSTOM_118 = { '': 0 # custom position of 118 in sequences without the Trp-Gl ... @@ -130,15 +130,25 @@ CUSTOM_118 = { '': 0 # custom position of 118 in sequences without the Trp-Gl def gap_j(seq): def gap_j(seq): '''Gap J sequences in order to align the Phe118/Trp118 codon''' '''Gap J sequences in order to align the Phe118/Trp118 codon''' m = j118.search(seq) if not m: seqs = seq.strip() if len(seq) > PHE_TRP_WARN_SIZE: print "# %s in %s" % (PHE_TRP_WARN_MSG, seq) if seqs in CUSTOM_118: seq = "# %s\n%s" % (PHE_TRP_WARN_MSG, seq) print "# Custom 118 position in %s" % seq return seq pos = CUSTOM_118[seqs] seq = seq.replace('\n', " # Custom\n") else: m = j118.search(seq) if not m: if len(seq) > PHE_TRP_WARN_SIZE: print "# %s in %s" % (PHE_TRP_WARN_MSG, seq) seq = "# %s\n%s" % (PHE_TRP_WARN_MSG, seq) return seq pos = m.start() + 1 # positions start at 1 pos = m.start() + 1 # positions start at 1 return (MAX_GAP_J - pos) * '.' + seq return (MAX_GAP_J - pos) * '.' + seq ... ...
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!