diff --git a/tfinder/__init__.py b/tfinder/__init__.py index c8d7f2a7..61f64ae1 100644 --- a/tfinder/__init__.py +++ b/tfinder/__init__.py @@ -407,6 +407,7 @@ def get_dna_sequence(prom_term, upstream, downstream, chraccver, chrstart, chrst # Request for DNA sequence url = f"https://eutils.ncbi.nlm.nih.gov/entrez/eutils/efetch.fcgi?db=nuccore&id={chraccver}&from={start}&to={end}&rettype=fasta&retmode=text" + print(url) response = requests.get(url) if response.status_code == 200: @@ -418,6 +419,9 @@ def get_dna_sequence(prom_term, upstream, downstream, chraccver, chrstart, chrst sequence = NCBIdna.reverse_complement(dna_sequence) return sequence + else: + print(f"NCBI is under maintenance. Error {response.status_code}: {str(response.text)}") + return f"NCBI is under maintenance. Error {response.status_code}: {str(response.text)}" @staticmethod def reverse_complement(dna_sequence):