예제 #1
0
 def setUpClass(cls):
     cls.user = helpers.create_user(db, 'name', 'password', 'email')
     cls.project = create_project_with_name(PROJECT_NAME)
     cls.project1 = create_project_with_name(PROJECT_NAME + '2')
     cls.normal_bam = create_bam_with_name(cls.project['id'], 'normal',
                                           uri='/bam/path/normal.bam')
     cls.tumor_bam = create_bam_with_name(cls.project['id'], 'tumor',
                                          uri='/bam/path/tumor.bam')
     with tables(db.engine, 'vcfs') as (con, runs):
         res = runs.insert(
             {'uri': 'file://path/to/something.vcf',
              'project_id': cls.project['id'],
              'normal_bam_id': cls.normal_bam['id'],
              'tumor_bam_id': cls.tumor_bam['id'],
              'vcf_header': ''}
         ).returning(*runs.c).execute()
         cls.run = dict(res.fetchone())
     cls.run2 = create_run_with_uri(cls.project['id'], 'http://someuri.vcf')
     cls.comment1 = create_comment_with_text(cls.run['id'], 'this is some text')
     cls.comment2 = create_comment_with_text(cls.run['id'], 'more text')
예제 #2
0
 def setUpClass(cls):
     cls.project = create_project_with_name(cls.PROJECT_NAME)
     cls.bam = create_bam_with_name(
         cls.project['id'], cls.PROJECT_NAME, uri=cls.BAM_PATH)
     return super(TestRunsAPI, cls).setUpClass()