Commit 94d46b48 authored by Mathieu Giraud's avatar Mathieu Giraud

split-from-imgt.py: gap_j() is done during retrieve_gene()

We also want to be able to take sequences from NCBI and gap them. See #2645.
Partially revert 806f2180.
parent f9618b14
......@@ -174,6 +174,7 @@ def retrieve_genes(f, genes, tag, additional_length, gene_list):
# post-process gene_data
if coord['imgt_data'].split('|')[-1] == FEATURE_J_REGION:
gene_lines = gene_data.split('\n')
gene_lines[1] = gap_j(gene_lines[1].lower())
gene_data = '\n'.join(gene_lines)
f.write(gene_data)
......@@ -353,17 +354,17 @@ def split_IMGTGENEDBReferenceSequences(f, gene_list):
current_special = verbose_open_w(name)
# Possibly gap J_REGION
if '>' not in l and current_files and feature == FEATURE_J_REGION:
l = gap_j(l)
for key in key_downstream:
downstream_data[key][-1][1]['seq'] += l
for key in key_upstream:
upstream_data[key][-1][1]['seq'] += l
# Possibly gap J_REGION
if '>' not in l and current_files and feature == FEATURE_J_REGION:
l = gap_j(l)
# Dump 'l' to the concerned files
for current_file in current_files:
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment