Skip to content

Commit

Permalink
Merge pull request #70 from mobidic/dev
Browse files Browse the repository at this point in the history
Merge for v1.1.9
  • Loading branch information
Char-Al authored Feb 21, 2024
2 parents 3fad567 + 48958fa commit bc13945
Show file tree
Hide file tree
Showing 3 changed files with 60 additions and 38 deletions.
78 changes: 41 additions & 37 deletions seal/schedulers.py
Original file line number Diff line number Diff line change
Expand Up @@ -681,40 +681,44 @@ def check_clinvar(genome="GRCh37"):
lockFile = open(path_locker, 'x')
lockFile.close()

ftp=FTP('ftp.ncbi.nlm.nih.gov')
ftp.login()
ftp.cwd(f'pub/clinvar/vcf_{genome}')

ls = ftp.nlst()
for i in ls:
r = re.compile("clinvar_([0-9]+).vcf.gz$")
match = r.search(i)
app.logger.info(f" - file : {i}")
if match:
app.logger.info(f" - match : {match.group(1)}")
version = match.group(1)
file = match.group(0)

if not Clinvar.query.filter_by(version=version, genome=genome.lower()).one_or_none():
app.logger.info(f" - new clinvar")
vcf_path = Path(app.root_path).joinpath(f'static/temp/clinvar/{genome}')
vcf_path = vcf_path.joinpath(file)
t = 0
while t < 10:
try:
app.logger.info(f" - download attempt : {t}")
with open(f'{vcf_path}', 'wb') as fp:
ftp.retrbinary(f'RETR {file}', fp.write)
Thread(target=update_clinvar_thread, args=(vcf_path, int(version), genome.lower(), )).start()
app.logger.info(f" - thread launched")
t=10
except Exception as e:
app.logger.info(f" - download filed retry")
app.logger.error(e)
ftp.close()
ftp=FTP('ftp.ncbi.nlm.nih.gov')
ftp.login()
ftp.cwd(f'pub/clinvar/vcf_{genome}')
t+=1
app.logger.info("END CLINVAR UPDATE")
path_locker.unlink()
try:
ftp=FTP('ftp.ncbi.nlm.nih.gov')
ftp.login()
ftp.cwd(f'pub/clinvar/vcf_{genome}')
except Exception as e:
app.logger.error(e)
else:
ls = ftp.nlst()
for i in ls:
r = re.compile("clinvar_([0-9]+).vcf.gz$")
match = r.search(i)
app.logger.info(f" - file : {i}")
if match:
app.logger.info(f" - match : {match.group(1)}")
version = match.group(1)
file = match.group(0)

if not Clinvar.query.filter_by(version=version, genome=genome.lower()).one_or_none():
app.logger.info(f" - new clinvar")
vcf_path = Path(app.root_path).joinpath(f'static/temp/clinvar/{genome}')
vcf_path = vcf_path.joinpath(file)
t = 0
while t < 10:
try:
app.logger.info(f" - download attempt : {t}")
with open(f'{vcf_path}', 'wb') as fp:
ftp.retrbinary(f'RETR {file}', fp.write)
Thread(target=update_clinvar_thread, args=(vcf_path, int(version), genome.lower(), )).start()
app.logger.info(f" - thread launched")
t=10
except Exception as e:
app.logger.info(f" - download filed retry")
app.logger.error(e)
ftp.close()
ftp=FTP('ftp.ncbi.nlm.nih.gov')
ftp.login()
ftp.cwd(f'pub/clinvar/vcf_{genome}')
t+=1
finally:
app.logger.info("END CLINVAR UPDATE")
path_locker.unlink()
2 changes: 1 addition & 1 deletion seal/templates/analysis/sample.html
Original file line number Diff line number Diff line change
Expand Up @@ -1225,7 +1225,7 @@ <h3>Comments (<span class="commentsCountVar"></span>)</h3>
if(data["INTRON"] == null) {
return "NA";
}
return "Inton " + data["INTRON"].split("/")[0];
return "Intron " + data["INTRON"].split("/")[0];
}
return "Exon " + data["EXON"].split("/")[0];
},
Expand Down
18 changes: 18 additions & 0 deletions seal/templates/essentials/about.html
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,24 @@ <h3>License</h3>
<h2>Releases</h2>
<div id="releases-notes" class="w3-small">
<div class="w3-panel w3-leftbar w3-blue">
<h3>v1.1.9 [February 21, 2024]</h3>

<p>This minor version mainly enhances fix some bugs.</p>
<h4>Fixes</h4>
<ul>
<li>Fix some typo</li>
<li>Fix locker when ftp of ncbi not reached</li>
<li>Update Links for GnomAD</li>
</ul>

<h4>Known Issues</h4>
<ul>
<li>Initialisation of database</li>
</ul>

</div>

<div class="w3-panel w3-leftbar w3-pale-blue w3-text-gray">
<h3>v1.1.8 [November 08, 2023]</h3>

<p>This minor version mainly enhances fix some bugs.</p>
Expand Down

0 comments on commit bc13945

Please sign in to comment.