# WTCHG ALL samples
    objwtchg_all = rnaseq_data.all_hgic_loader(annotate_by='Ensembl Gene ID',
                                               include_derived=True)
    to_keep_wtchg = (
        'GIBCO_NSC_P4',
        # 'DURA018_NSC_N2_P6',
        # 'DURA018_NSC_N4_P4',
        'DURA019_NSC_N8C_P2',
        'DURA030_NSC_N16B6_P1',
        'DURA031_NSC_N44B_P2')

    # rRNA gene IDs
    rrna_ensg = set(gtf_reader.get_rrna())

    # MT gene_ids
    mt_ensg = set(gtf_reader.get_mitochondrial())

    # combine the data
    data = pd.concat((obj73721.data.loc[:, to_keep73721], obj61794.data,
                      objwtchg_all.data.loc[:, to_keep_wtchg]),
                     axis=1)

    # combine the metadata
    meta = pd.concat((
        obj73721.meta.loc[to_keep73721],
        obj61794.meta,
        objwtchg_all.meta.loc[to_keep_wtchg, :],
    ),
                     axis=0)

    data = data.loc[data.index.str.contains('ENSG')]
Beispiel #2
0
        eps = .01
    elif units == 'estimated_counts':
        eps = .01
    elif units == 'cpm':
        eps = .01

    if source == 'star' and units == 'tpm':
        raise NotImplementedError("Unable to convert STAR counts into TPM.")

    if transform in {'vst', 'rlog'
                     } and units not in {'counts', 'estimated_counts'}:
        raise AttributeError(
            "vst and rlog transformations require counts as input")

    if remove_mt:
        mt_ensg = set(gtf_reader.get_mitochondrial('GRCm38r88'))

    loc = loader.RnaSeqFileLocations(root_dir=os.path.join(
        loader.RNASEQ_DIR, 'wtchg_p170390'),
                                     alignment_subdir='mouse',
                                     batch_id='wtchg_p170390')

    kwargs = loc.loader_kwargs(source)
    kwargs.update(
        dict(tax_id=10090,
             samples=[
                 u'mDura3N1human', u'mDura5N24Ahuman', u'mDura6N6human',
                 u'mDura3N1mouse', u'mDura5N24Amouse', u'mDura6N6mouse',
                 u'eNSC3mouse', u'eNSC5mouse', u'eNSC6mouse'
             ]))
    kwargs.update(load_kwargs)