Example #1
0
def test_repliseq(update_ffmeta_event_data_repliseq):
    updater = FourfrontUpdater(**update_ffmeta_event_data_repliseq)
    updater.update_all_pfs()
    updater.update_qc()
    target_accession = updater.accessions('filtered_sorted_deduped_bam')[0]
    assert target_accession == '4DNFIP2T7ANW'
    assert updater.post_items
    assert len(updater.post_items['quality_metric_dedupqc_repliseq']) == 1
    uuid = list(updater.post_items['quality_metric_dedupqc_repliseq'].keys())[0]
    assert 'Proportion of removed duplicates' in updater.post_items['quality_metric_dedupqc_repliseq'][uuid]
    assert updater.patch_items
    assert '050c9382-61d7-49e8-8598-1a6734dda5d2' in updater.patch_items
    bam_patch = updater.patch_items['050c9382-61d7-49e8-8598-1a6734dda5d2']  # filtered bam
    assert 'md5sum' in bam_patch
    assert 'file_size' in bam_patch
    assert 'status' in bam_patch
    assert bam_patch['md5sum'] == '908488c3d8bea2875551c67c9fd1b3dc'
    assert bam_patch['file_size'] == 11061946
    assert bam_patch['status'] == 'uploaded'
    assert 'quality_metric' in updater.patch_items['4DNFIP2T7ANW']  # qc_metric is patched by accession
    assert '4127ad92-16cf-4716-ab68-dc9b352658eb' in updater.patch_items
    bg_patch = updater.patch_items['4127ad92-16cf-4716-ab68-dc9b352658eb']  # count_bg
    assert 'extra_files' in bg_patch
    assert len(bg_patch['extra_files']) == 2
    assert bg_patch['extra_files'][1]['file_format'] == 'bw'
    assert bg_patch['extra_files'][1]['md5sum'] == 'f08575a366c14dbc949d35e415151cfd'
    assert bg_patch['extra_files'][1]['file_size'] == 3120059
    assert bg_patch['extra_files'][1]['status'] == 'uploaded'
    assert bg_patch['extra_files'][0]['file_format'] == 'bg_px2'
    assert bg_patch['extra_files'][0]['md5sum'] == 'aa8e2848e1f022b197fe31c804de08bf'
    assert bg_patch['extra_files'][0]['file_size'] == 991610
    assert bg_patch['extra_files'][0]['status'] == 'uploaded'
Example #2
0
def test_chipseq(update_ffmeta_event_data_chipseq):
    updater = FourfrontUpdater(**update_ffmeta_event_data_chipseq)
    updater.update_all_pfs()
    updater.update_qc()
    target_accession = updater.accessions('chip.first_ta_ctl')[0]
    assert target_accession == '4DNFI8B19NWU'
    assert updater.post_items
    assert len(updater.post_items['quality_metric_chipseq']) == 1
    uuid = list(updater.post_items['quality_metric_chipseq'].keys())[0]
    assert 'ctl_dup_qc' in updater.post_items['quality_metric_chipseq'][uuid]
    assert updater.patch_items
    assert 'd3caa9c8-9e67-4d64-81d1-8039569dc6ce' in updater.patch_items
    bed_patch = updater.patch_items['d3caa9c8-9e67-4d64-81d1-8039569dc6ce']
    assert 'status' in bed_patch
    assert bed_patch['status'] == 'uploaded'
    assert 'quality_metric' in updater.patch_items[target_accession]
Example #3
0
def test_pf(update_ffmeta_hicbam):
    updater = FourfrontUpdater(**update_ffmeta_hicbam)
    updater.update_all_pfs()
    assert updater.patch_items
    assert 'eacc2a43-9fe8-41a7-89f4-7093619fde31' in updater.patch_items
    assert '5bded0bb-e429-48a2-bb85-e558111924e7' in updater.patch_items
    assert 'md5sum' in updater.patch_items['eacc2a43-9fe8-41a7-89f4-7093619fde31']
    assert 'file_size' in updater.patch_items['eacc2a43-9fe8-41a7-89f4-7093619fde31']
    assert 'status' in updater.patch_items['eacc2a43-9fe8-41a7-89f4-7093619fde31']
    outbam_patch = updater.patch_items['eacc2a43-9fe8-41a7-89f4-7093619fde31']
    assert outbam_patch['md5sum'] == 'eeff1f1bad00c0b386a3ce5f5751e1cc'
    assert outbam_patch['file_size'] == 313108291
    assert outbam_patch['status'] == 'uploaded'
    outpairs_patch = updater.patch_items['5bded0bb-e429-48a2-bb85-e558111924e7']
    assert outpairs_patch['extra_files'][0]['md5sum'] == '82ae753a21a52886d1e303c525208332'
    assert outpairs_patch['extra_files'][0]['file_size'] == 3300298
    assert outpairs_patch['extra_files'][0]['status'] == 'uploaded'
Example #4
0
def test_imargi(update_ffmeta_event_data_imargi):
    updater = FourfrontUpdater(**update_ffmeta_event_data_imargi)
    updater.update_all_pfs()
    updater.update_qc()
    target_accession = updater.accessions('out_pairs')[0]
    assert target_accession == '4DNFI2H7T6NP'
    assert updater.post_items
    assert len(updater.post_items['quality_metric_margi']) == 1
    uuid = list(updater.post_items['quality_metric_margi'].keys())[0]
    assert 'total_read_pairs' in updater.post_items['quality_metric_margi'][uuid]
    assert updater.patch_items
    assert 'aca7c203-f476-410f-b3bb-4965c9f5e411' in updater.patch_items
    pairs_patch = updater.patch_items['aca7c203-f476-410f-b3bb-4965c9f5e411']
    assert 'md5sum' in pairs_patch
    assert 'file_size' in pairs_patch
    assert 'status' in pairs_patch
    assert pairs_patch['md5sum'] == 'ec98b56a98249b85ee6a99a7f43f2884'
    assert pairs_patch['file_size'] == 22199565
    assert pairs_patch['status'] == 'uploaded'
    assert 'quality_metric' in updater.patch_items[target_accession]