File: spades_download_binary.py

package info (click to toggle)
spades 3.13.1+dfsg-2
  • links: PTS, VCS
  • area: main
  • in suites: bullseye, sid
  • size: 22,172 kB
  • sloc: cpp: 136,213; ansic: 48,218; python: 16,809; perl: 4,252; sh: 2,115; java: 890; makefile: 507; pascal: 348; xml: 303
file content (42 lines) | stat: -rwxr-xr-x 1,528 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
#!/usr/bin/python3

############################################################################
# Copyright (c) 2015 Saint Petersburg State University
# Copyright (c) 2011-2014 Saint Petersburg Academic University
# All Rights Reserved
# See file LICENSE for details.
############################################################################

import os
import urllib2
import spades_init

spades_init.init()
spades_version = spades_init.spades_version
spades_bin_dir = os.path.join(spades_init.spades_home, 'bin')

import support

print("\n======= Binaries download started.\n")
if not os.path.exists(spades_bin_dir):
    os.makedirs(spades_bin_dir)

print("\n======= BayesHammer download started.\n")
data = urllib2.urlopen('http://spades.bioinf.spbau.ru/release' + spades_version + '/hammer')
file = os.path.join(spades_bin_dir, 'hammer')
support.save_data_to_file(data, file)
print("\n======= BayesHammer download finished.\n")

print("\n======= SPAdes download started.\n")
data = urllib2.urlopen('http://spades.bioinf.spbau.ru/release' + spades_version + '/spades')
file = os.path.join(spades_bin_dir, 'spades')
support.save_data_to_file(data, file)
print("\n======= SPAdes download finished.\n")

print("\n======= BWA download started.\n")
data = urllib2.urlopen('http://spades.bioinf.spbau.ru/release' + spades_version + '/bwa-spades')
file = os.path.join(spades_bin_dir, 'bwa-spades')
support.save_data_to_file(data, file)
print("\n======= BWA download finished.\n")

print("\n======= Binaries download finished.\n")