Example #1
0
Created on Sep 28, 2014

@author: karmel
'''
from glasslab.dataanalysis.graphing.seq_grapher import SeqGrapher
from glasslab.dataanalysis.misc.rodrigo.samples import sample_name,\
    get_threshold
if __name__ == '__main__':
    yzer = SeqGrapher()

    dirpath = 'karmel/Desktop/Projects/GlassLab/Notes_and_Reports/' +\
        'Miscellaneous_Collaborations/Rodrigo_CD8s_2014_09/Promoters'
    dirpath = yzer.get_path(dirpath)

    cond, seq, breed = ('naive', 'atac', '')
    wt_prefix = sample_name(cond, seq, breed)
    ko_prefix = sample_name(cond, seq, 'foxo1_ko_')

    wt_dirpath = yzer.get_filename(dirpath, wt_prefix)
    ko_dirpath = yzer.get_filename(dirpath, ko_prefix)

    wt_filename = yzer.get_filename(wt_dirpath,
                                    wt_prefix + '_promoters.txt')
    ko_filename = yzer.get_filename(ko_dirpath,
                                    ko_prefix + '_promoters.txt')

    wt_data = yzer.import_file(wt_filename)
    wt_data = wt_data.fillna(0)
    ko_data = yzer.import_file(ko_filename)
    ko_data = ko_data.fillna(0)
Example #2
0
Created on Sep 27, 2014

@author: karmel
'''
from glasslab.dataanalysis.misc.rodrigo.samples import SAMPLES, sample_name,\
    get_threshold
from glasslab.dataanalysis.motifs.motif_analyzer import MotifAnalyzer
if __name__ == '__main__':
    yzer = MotifAnalyzer()

    dirpath = 'karmel/Desktop/Projects/GlassLab/Notes_and_Reports/' +\
        'Miscellaneous_Collaborations/Rodrigo_CD8s_2014_09/Enhancers'
    dirpath = yzer.get_path(dirpath)

    for cond, seq, breed in SAMPLES:
        sample_prefix = sample_name(cond, seq, breed)
        sample_dirpath = yzer.get_filename(dirpath, sample_prefix)
        filename = yzer.get_filename(sample_dirpath,
                                     sample_prefix + '_enhancers.txt')

        data = yzer.import_file(filename)
        data = data.fillna(0)

        if True:

            min_thresh = get_threshold(seq)

            subdata = data[data['tag_count'] >= min_thresh]
            yzer.run_homer(subdata,
                           'all',
                           sample_dirpath,