Skip to content

A utility class to retrieve information and download files from the dbGaP ftp server.

License

Notifications You must be signed in to change notification settings

UW-GAC/dbgap_ftp

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

22 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

dbgap-ftp

This python package provides a class to retrieve information and download files from dbGaP's ftp server. At this point, it is not a comprehensive package and insteads provides only specific functionality!

Example usage:

Instantiate a new connection object:

from dbgap_ftp import dbgap_ftp

con = dbgap_ftp.DbgapFtp()

Retrieve the highest version associated with a given study accesion:

# For the Framingham Heart Study, phs000007:
accession = 7
con.get_highest_study_version(7)

Retrieve a list of data dictionaries associated with a version of study:

accession = 7
version = 29
dds = con.get_data_dictionaries(7, 29)
# Show only the first five data dictionaries.
dds[:5]

Download a list of files from the dbGaP ftp server:

local_path = '/my/local/directory/'
downlaoded, failed = con.download_files(dds, local_path)

About

A utility class to retrieve information and download files from the dbGaP ftp server.

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages