Skip to content
Navigation Menu
Toggle navigation
Sign in
In this repository
All GitHub Enterprise
↵
Jump to
↵
No suggested jump to results
In this repository
All GitHub Enterprise
↵
Jump to
↵
In this organization
All GitHub Enterprise
↵
Jump to
↵
In this repository
All GitHub Enterprise
↵
Jump to
↵
Sign in
Reseting focus
You signed in with another tab or window.
Reload
to refresh your session.
You signed out in another tab or window.
Reload
to refresh your session.
You switched accounts on another tab or window.
Reload
to refresh your session.
Dismiss alert
{{ message }}
loosolab
/
master_project_JLU2018
Public
Notifications
You must be signed in to change notification settings
Fork
0
Star
0
Code
Issues
7
Pull requests
1
Actions
Projects
0
Wiki
Security
Insights
Additional navigation options
Code
Issues
Pull requests
Actions
Projects
Wiki
Security
Insights
Files
037b2bf
bin
Modules
Ensembl
FTPHandling
FTPEntry.py
URLRetrieve.py
VersionChecker.py
__init__.py
ActivityCategorizer.py
ActivityTable.py
ActivityTableGenerator.py
Ensembl.py
GTFGen.py
__init__.py
checksums.py
ucsc
SaveResults.py
Uniquifier.py
__init__.py
config
RegGTFExtractor.py
bed_to_fasta.R
call_peaks.py
call_peaks.yaml
cdhit_wrapper.R
compareBed.sh
get_best_motif.py
maxScore.R
merge.R
merge_similar_clusters.R
reduce_bed.R
tfbsscan.py
config
README.md
masterenv.yml
nextflow.config
pipeline.nf
Breadcrumbs
master_project_JLU2018
/
bin
/
Modules
/
Ensembl
/
FTPHandling
/
URLRetrieve.py
Blame
Blame
Latest commit
History
History
36 lines (26 loc) · 1.1 KB
Breadcrumbs
master_project_JLU2018
/
bin
/
Modules
/
Ensembl
/
FTPHandling
/
URLRetrieve.py
Top
File metadata and controls
Code
Blame
36 lines (26 loc) · 1.1 KB
Raw
import ftplib from Modules.Ensembl.FTPHandling.FTPEntry import FTPEntry class FTPHandler: def __init__(self, url, wd): self.ftp = ftplib.FTP(url) self.ftp.login() self.ftp.cwd(wd) def change_dir(self, wd): self.ftp.cwd(wd) def get_all_entries(self): return self.ftp.nlst() def get_all_entries_from_dir(self, dire): self.change_dir(dire) return self.get_all_entries() def get_all_entries_as_FTPEntry(self): # Get All Files files = self.ftp.nlst() return [FTPEntry(item, self.ftp, self.ftp.pwd()) for item in files] def save_entries_to_file(self, origin, target): self.change_dir(origin) for file in self.get_all_entries_as_FTPEntry(): if file.gettype() == "f": # Download only Checksum & gff.gz files if file.getfilename() not in ["README", "manifest.tsv"]: print("Downloading....... > " + file.getfilename()) self.ftp.retrbinary("RETR " + file.getfilename(), open(target + "/" + file.getfilename(), 'wb').write)
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
You can’t perform that action at this time.