Fixes FTP issue for importGenome
Fixes FTP issue for importGenome

Fixes the following issue that occurs on some host for importing Genome

import pyGeno.bootstrap as B
B.printDatawraps()
B.importGenome('Mouse.GRCm38.78.tar.gz')

Importing genome package: /usr/src/app/pyGeno/bootstrap_data/genomes/Mouse.GRCm38.78.tar.gz... (This may take a while)
Downloading file: ftp://ftp.ensembl.org/pub/release-78/gtf/mus_musculus/Mus_musculus.GRCm38.78.gtf.gz...
done.
Downloading file: ftp://ftp.ensembl.org/pub/release-78/fasta/mus_musculus/dna/Mus_musculus.GRCm38.dna.chromosome.10.fa.gz...
done.
Downloading file: ftp://ftp.ensembl.org/pub/release-78/fasta/mus_musculus/dna/Mus_musculus.GRCm38.dna.chromosome.11.fa.gz...
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/usr/src/app/pyGeno/bootstrap.py", line 105, in importGenome
PG.importGenome(path, batchSize)
File "/usr/src/app/pyGeno/importation/Genomes.py", line 159, in importGenome
chromosomesFiles[key] = _getFile(fil, packageDir)
File "/usr/src/app/pyGeno/importation/Genomes.py", line 46, in _getFile
urllib.urlretrieve (fil, finalFile)
File "/usr/local/lib/python2.7/urllib.py", line 98, in urlretrieve
return opener.retrieve(url, filename, reporthook, data)
File "/usr/local/lib/python2.7/urllib.py", line 245, in retrieve
fp = self.open(url, data)
File "/usr/local/lib/python2.7/urllib.py", line 213, in open
return getattr(self, name)(url)
File "/usr/local/lib/python2.7/urllib.py", line 558, in open_ftp
(fp, retrlen) = self.ftpcache[key].retrfile(file, type)
File "/usr/local/lib/python2.7/urllib.py", line 906, in retrfile
conn, retrlen = self.ftp.ntransfercmd(cmd)
File "/usr/local/lib/python2.7/ftplib.py", line 334, in ntransfercmd
host, port = self.makepasv()
File "/usr/local/lib/python2.7/ftplib.py", line 312, in makepasv
host, port = parse227(self.sendcmd('PASV'))
File "/usr/local/lib/python2.7/ftplib.py", line 830, in parse227
raise error_reply, resp
IOError: [Errno ftp error] 200 Type set to I
tariqdaouda/pyGeno