Exemplo n.º 1
0
def download_repeat_masker(repeat_masker_file=None):
    if repeat_masker_file is None:
        from basepair.config import get_data_dir
        ddir = get_data_dir()
        repeat_masker_file = Path(
            f"{ddir}/raw/annotation/mm10/RepeatMasker/mm10.fa.out.gz")
    repeat_masker_file.parent.mkdir(exist_ok=True, parents=True)
    return RemoteFile(
        'http://www.repeatmasker.org/genomes/mm10/RepeatMasker-rm405-db20140131/mm10.fa.out.gz',
        md5='c046c8a8d1a1ce20eb865574d31d528b').get_file(repeat_masker_file)
Exemplo n.º 2
0
    ("Essrb", "Oct4/m0_p16"),
])

# Use a fixed profile slice
PROFILE_SLICE = slice(65, 135)


if __name__ == '__main__':
    parser = argparse.ArgumentParser(description='Run motif simulation')
    parser.add_argument('exp', help='which experiment to run the simulation for')
    parser.add_argument('--gpu', default=0, type=int, help='Which GPU to use')
    args = parser.parse_args()

    exp = args.exp
    # imp_score = args.imp_score
    ddir = get_data_dir()

    # load the model
    logger.info("Loading model")
    if args.gpu is not None:
        create_tf_session(args.gpu)
    model_dir = models_dir / exp
    bpnet = BPNetSeqModel.from_mdir(model_dir)

    output_dir = model_dir / 'perturbation-analysis'

    pairs = get_motif_pairs(motifs)

    dfi = multiple_load_instances({task: model_dir / f'deeplift/{task}/out/profile/wn/instances.parq'
                                   for task in bpnet.tasks},
                                  motifs=motifs)