python/pymethylprocess/PreProcessDataTypes.py
def download_geo(self, query, output_dir):
        """Download GEO IDATs.

        Parameters
        ----------
        query
            GEO accession number to query, must be 450k/850k.
        output_dir
            Output directory to store idats and clinical information csv"""
        base=importr('base')
        geo = importr("GEOquery")
        geo.getGEOSuppFiles(query)
        raw_tar_file = "{0}/{0}_RAW.tar".format(query)
        if not os.path.exists(raw_tar_file):
            print("Warning: GEO file {} not downloaded. Check accession on GEO and make sure there is this file available.".format(raw_tar_file))
        robjects.r["untar"](raw_tar_file, exdir = "{}/idat".format(query), tar='internal')
        idatFiles = robjects.r('list.files("{}/idat", pattern = "idat.gz$", full = TRUE)'.format(query))
        robjects.r["sapply"](idatFiles, robjects.r["gunzip"], overwrite = True)
        subprocess.call('mv {}/idat/*.idat {}/'.format(query, output_dir),shell=True)
        self.download_geo_clinical_info(query,output_dir)
Download GEO IDATs.

        Parameters
        ----------
        query
            GEO accession number to query, must be 450k/850k.
        output_dir
            Output directory to store idats and clinical information csv


query
GEO accession number to query, must be 450k/850k.
output_dir
Output directory to store idats and clinical information csv
query GEO accession number to query must be 450k / 850k . output_dir Output directory to store idats and clinical information csv
def download_geo(self, query, output_dir):
        base=importr('base')
        geo = importr("GEOquery")
        geo.getGEOSuppFiles(query)
        raw_tar_file = "{0}/{0}_RAW.tar".format(query)
        if not os.path.exists(raw_tar_file):
            print("Warning: GEO file {} not downloaded. Check accession on GEO and make sure there is this file available.".format(raw_tar_file))
        robjects.r["untar"](raw_tar_file, exdir = "{}/idat".format(query), tar='internal')
        idatFiles = robjects.r('list.files("{}/idat", pattern = "idat.gz$", full = TRUE)'.format(query))
        robjects.r["sapply"](idatFiles, robjects.r["gunzip"], overwrite = True)
        subprocess.call('mv {}/idat/*.idat {}/'.format(query, output_dir),shell=True)
        self.download_geo_clinical_info(query,output_dir)
def download_geo ( self , query , output_dir ) : base = importr ( 'base' ) geo = importr ( "GEOquery" ) geo . getGEOSuppFiles ( query ) raw_tar_file = "{0}/{0}_RAW.tar" . format ( query ) if not os . path . exists ( raw_tar_file ) : print ( "Warning: GEO file {} not downloaded. Check accession on GEO and make sure there is this file available." . format ( raw_tar_file ) ) robjects . r [ "untar" ] ( raw_tar_file , exdir = "{}/idat" . format ( query ) , tar = 'internal' ) idatFiles = robjects . r ( 'list.files("{}/idat", pattern = "idat.gz$", full = TRUE)' . format ( query ) ) robjects . r [ "sapply" ] ( idatFiles , robjects . r [ "gunzip" ] , overwrite = True ) subprocess . call ( 'mv {}/idat/*.idat {}/' . format ( query , output_dir ) , shell = True ) self . download_geo_clinical_info ( query , output_dir )
Download GEO IDATs.
Download GEO IDATs .
"""Download GEO IDATs.

        Parameters
        ----------
        query
            GEO accession number to query, must be 450k/850k.
        output_dir
            Output directory to store idats and clinical information csv"""
self
query
output_dir