-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
6 changed files
with
1,066 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -65,3 +65,4 @@ perfs_benchmark.log | |
.env | ||
bench/ | ||
.chromnn | ||
*.keras |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,91 @@ | ||
{ | ||
"cells": [ | ||
{ | ||
"cell_type": "markdown", | ||
"metadata": {}, | ||
"source": [ | ||
"# Integrating multi-omics data with `momics`\n", | ||
"\n", | ||
"`momics` excels at managing multi-omics data. It allows you to store and retrieve data from a variety of sources. Here, we will see how to create, manage and query local repositories using `momics`.\n", | ||
"\n", | ||
"## Creating a local `momics` repository" | ||
] | ||
}, | ||
{ | ||
"cell_type": "code", | ||
"execution_count": 6, | ||
"metadata": {}, | ||
"outputs": [ | ||
{ | ||
"name": "stderr", | ||
"output_type": "stream", | ||
"text": [ | ||
"momics :: INFO :: 2024-10-21 09:31:58,466 :: Purged yeast_CNN_data.momics\n", | ||
"momics :: INFO :: 2024-10-21 09:31:58,471 :: Created yeast_CNN_data.momics\n", | ||
"momics :: INFO :: 2024-10-21 09:32:01,936 :: Genome sequence ingested in 3.4528s.\n", | ||
"momics :: INFO :: 2024-10-21 09:32:03,193 :: 2 tracks ingested in 1.2557s.\n" | ||
] | ||
}, | ||
{ | ||
"data": { | ||
"text/plain": [ | ||
"<momics.momics.Momics at 0x7f1d7c0dc1f0>" | ||
] | ||
}, | ||
"execution_count": 6, | ||
"metadata": {}, | ||
"output_type": "execute_result" | ||
} | ||
], | ||
"source": [ | ||
"from momics.momics import Momics\n", | ||
"\n", | ||
"## Creating repository\n", | ||
"Momics(\"yeast_CNN_data.momics\").remove() # Purging existing files\n", | ||
"repo = Momics(\"yeast_CNN_data.momics\") # Creating a brand new repository\n", | ||
"\n", | ||
"## Registering chromosome sizes\n", | ||
"## We will get chromosome sizes from a local fasta file.\n", | ||
"from pyfaidx import Fasta\n", | ||
"\n", | ||
"f = Fasta(\"/data/momics/S288c.fa\")\n", | ||
"chrom_lengths = {chrom: len(seq) for chrom, seq in zip(f.keys(), f.values())}\n", | ||
"\n", | ||
"repo.ingest_chroms(chrom_lengths, genome_version=\"S288c\")\n", | ||
"repo.chroms()\n", | ||
"\n", | ||
"## Registering sequence\n", | ||
"repo.ingest_sequence(\"/data/momics/S288c.fa\")\n", | ||
"\n", | ||
"## Registering genomic tracks\n", | ||
"repo.ingest_tracks(\n", | ||
" {\n", | ||
" \"ATAC\": \"/data/momics/S288c_atac.bw\",\n", | ||
" \"MNase\": \"/data/momics/S288c_mnase.bw\",\n", | ||
" }\n", | ||
")" | ||
] | ||
} | ||
], | ||
"metadata": { | ||
"kernelspec": { | ||
"display_name": "Python 3", | ||
"language": "python", | ||
"name": "python3" | ||
}, | ||
"language_info": { | ||
"codemirror_mode": { | ||
"name": "ipython", | ||
"version": 3 | ||
}, | ||
"file_extension": ".py", | ||
"mimetype": "text/x-python", | ||
"name": "python", | ||
"nbconvert_exporter": "python", | ||
"pygments_lexer": "ipython3", | ||
"version": "3.10.0" | ||
} | ||
}, | ||
"nbformat": 4, | ||
"nbformat_minor": 2 | ||
} |
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.