From e94203f701b0da5a0bc8fd0723afee51fdace085 Mon Sep 17 00:00:00 2001 From: Mathieu Giraud Date: Fri, 13 Jul 2018 12:39:23 +0200 Subject: [PATCH] germline/split-from-imgt.py: GENES_SEQ_FROM_NCBI, remembers on how to get genes from the NCBI. Partially revert 806f218. See #2645. --- germline/split-from-imgt.py | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/germline/split-from-imgt.py b/germline/split-from-imgt.py index 50b05df69..ec7453af9 100644 --- a/germline/split-from-imgt.py +++ b/germline/split-from-imgt.py @@ -10,6 +10,8 @@ import re import ncbi +GENES_SEQ_FROM_NCBI = False + IMGT_LICENSE = ''' # To use the IMGT germline databases (IMGT/GENE-DB), you have to agree to IMGT license: # academic research only, provided that it is referred to IMGT®, @@ -158,8 +160,11 @@ def retrieve_genes(f, genes, tag, additional_length, gene_list): # gene_id: is the NCBI ID of the VDJ gene # target: is the NCBI ID of the chromosome - gene_data = coord['seq'] - + if GENES_SEQ_FROM_NCBI: + gene_data = ncbi.get_gene_sequence(gene, coord['imgt_data'] + tag, coord['from'], coord['to'], allele_additional_length) + else: + # IMGT + gene_data = coord['seq'] if gene_id: # Check consistency for *01 allele -- GitLab