def test_view(self):
     """
     Test the view method
     """
     data = {
         "profiles.csv": [{"PROJECTID": "ENCODE", "project_id": "ENCODE", "ANNOTATION": ""}],
         "annotations.csv": [{}],
         "genomes.csv": [],
         "accessions.csv": [
             {
                 "project_id": "ENCODE",
                 "accession_id": "ABCD",
                 "species": "H**o sapiens",
                 "cell": "cell",
                 "readType": "1x70D",
                 "type": "type",
                 "qualities": "qualities",
                 "dataType": "dataType",
                 "rnaExtract": "rnaExtract",
                 "localization": "localization",
                 "lab": "lab",
             }
         ],
         "runs.csv": [{"project_id": "ENCODE", "run_id": "run_id", "read_length": 70}],
         "files.csv": [
             {"project_id": "ENCODE", "accession_id": "ABCD", "type": "fastq", "file_location": "myfile.fastq.gz"}
         ],
     }
     view.main(data, SANDBOX)
    def install(self):
        workspace = self.buildout['extract']['workspace']
        staging = self.options['staging']
        if not os.path.exists(staging):
            os.makedirs(staging)

        data = {}
        for source in [f for f in glob.glob(os.path.join(workspace, '*.csv'))]:
            file_name = os.path.split(source)[-1]
            target = os.path.join(staging, file_name)
            shutil.copyfile(source, target)
            data[file_name] = read_csv(target)

        accessions.main(data, staging)
        annotations.main(data, staging)
        files.main(data, staging)
        genomes.main(data, staging)
        profiles.main(data)
        experiments.main(data, staging)
        read_length.main(data, staging)
        view.main(data, staging)
    def install(self):
        workspace = self.buildout['extract']['workspace']
        staging = self.options['staging']
        if not os.path.exists(staging):
            os.makedirs(staging)

        data = {}
        for source in [f for f in glob.glob(os.path.join(workspace, '*.csv'))]:
            file_name = os.path.split(source)[-1]
            target = os.path.join(staging, file_name)
            shutil.copyfile(source, target)
            data[file_name] = read_csv(target)

        accessions.main(data, staging)
        annotations.main(data, staging)
        files.main(data, staging)
        genomes.main(data, staging)
        profiles.main(data)
        experiments.main(data, staging)
        read_length.main(data, staging)
        view.main(data, staging)
 def test_view(self):
     """
     Test the view method
     """
     data = {
         'profiles.csv': [{
             'PROJECTID': 'ENCODE',
             'project_id': 'ENCODE',
             'ANNOTATION': ''
         }],
         'annotations.csv': [{}],
         'genomes.csv': [],
         'accessions.csv': [{
             'project_id': 'ENCODE',
             'accession_id': 'ABCD',
             'species': 'H**o sapiens',
             'cell': 'cell',
             'readType': '1x70D',
             'type': 'type',
             'qualities': 'qualities',
             'dataType': 'dataType',
             'rnaExtract': 'rnaExtract',
             'localization': 'localization',
             'lab': 'lab'
         }],
         'runs.csv': [{
             'project_id': 'ENCODE',
             'run_id': 'run_id',
             'read_length': 70
         }],
         'files.csv': [{
             'project_id': 'ENCODE',
             'accession_id': 'ABCD',
             'type': 'fastq',
             'file_location': 'myfile.fastq.gz'
         }],
     }
     view.main(data, SANDBOX)