Example #1
0
    def download_all_data(self):
        """Download all large data sets from Synapse"""
        pb = progress_bar(5)
        # load the large gold standard file from D5C2 synapse main page
        filename = self._download_data('DREAM5_GoldStandard_probes.zip',
                                       'syn2898469')
        pb.animate(1)
        z = ZIP()
        z.loadZIPFile(filename)
        data = z.read('Answers.txt')
        self.gs = pd.read_csv(BytesIO(data), sep='\t')

        # download 4 other filenames from dreamtools synapse project
        self._download_data('all_8mers.txt', 'syn4483185')
        pb.animate(2)
        self._download_data('8mers_gs.txt', 'syn4483187')
        pb.animate(3)
        self._download_data('probe35_gs.txt', 'syn4483184')
        pb.animate(4)
        self._download_data('probes35.txt', 'syn4483183')
        pb.animate(5)
Example #2
0
 def unzip(self, filename):
     """Simple method to extract all files contained in an archive"""
     from dreamtools.core.ziptools import ZIP
     z = ZIP()
     z.loadZIPFile(self.get_pathname(filename)), z.extractall(
         self.directory)
Example #3
0
def test_zip():
    z = ZIP()
    try:
        z.loadZIPFile('p')
    except:
        pass