def find_saschas_pairs(): pair_dists = biopsy.pair_analysis( 'c:/data/remos/0/0.cleaned', 'c:/data/remos/0/0.analysis', 45, pair_filter = saschas_pair_filter, location_filter = biopsy.get_default_pair_filter( family_file = 'C:/Data/Ensembl/mouse_families.txt', paralog_file = 'C:/Data/Ensembl/mouse_paralogs.txt', subtypes = [ # 'Fungi/Metazoa group', # 'Coelomata', # 'Bilateria', # 'Chordata', # 'Amniota', # 'Tetrapoda', 'Euteleostomi', 'Theria', 'Eutheria', 'Euarchontoglires', 'Murinae', 'Mus musculus', ] ) ) biopsy.save( pair_dists, 'saschas.pairs' )
def test_pair_analysis(): import webbrowser remome_threshold = 100 remome_file = 'c:/data/remos/%d/%d.cleaned' % ( remome_threshold, remome_threshold ) analysis_file = 'c:/data/remos/%d/%d.analysis' % ( remome_threshold, remome_threshold ) location_filter = biopsy.get_default_pair_filter() hits = biopsy.pair_analysis( remome_file, analysis_file, max_distance = 45, distance_filter = lambda d: d == 25, pair_filter = lambda p: p == ( 'M00471', 'M00791', False, False ), location_filter = location_filter ) for k, v in hits.iteritems(): print k print v for g in location_filter.filter2.genes_for_pair[ k ]: print g webbrowser.open( biopsy.ensembl_url( g ) ) print