-
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
Anton Kulaga
committed
Sep 5, 2023
1 parent
9176610
commit 314f0d8
Showing
6 changed files
with
290 additions
and
22 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
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,219 @@ | ||
{ | ||
"cells": [ | ||
{ | ||
"cell_type": "code", | ||
"execution_count": null, | ||
"id": "initial_id", | ||
"metadata": { | ||
"collapsed": true, | ||
"is_executing": true, | ||
"ExecuteTime": { | ||
"start_time": "2023-09-05T23:25:16.251706600Z" | ||
} | ||
}, | ||
"outputs": [ | ||
{ | ||
"name": "stdout", | ||
"output_type": "stream", | ||
"text": [ | ||
"Downloading the genome with annotations from Ensembl, this may take a while. The results are cached\n" | ||
] | ||
}, | ||
{ | ||
"name": "stderr", | ||
"output_type": "stream", | ||
"text": [ | ||
"02:25:18 | INFO | Downloading genome from Ensembl. Target URL: http://ftp.ensembl.org/pub/release-110/fasta/acanthochromis_polyacanthus/dna/Acanthochromis_polyacanthus.ASM210954v1.dna_sm.toplevel.fa.gz...\n", | ||
"Download: 100%|██████████| 265M/265M [00:15<00:00, 18.0MB/s] \n", | ||
"02:25:34 | INFO | Genome download successful, starting post processing...\n", | ||
"02:25:39 | INFO | name: ASM210954v1\n", | ||
"02:25:39 | INFO | local name: ASM210954v1\n", | ||
"02:25:39 | INFO | fasta: /home/antonkulaga/.local/share/genomes/ASM210954v1/ASM210954v1.fa\n", | ||
"Filtering Fasta: 16.6M lines [00:05, 3.09M lines/s]\n", | ||
"02:26:06 | INFO | Downloading annotation from Ensembl. Target URL: http://ftp.ensembl.org/pub/release-110/gtf/acanthochromis_polyacanthus/Acanthochromis_polyacanthus.ASM210954v1.110.gtf.gz...\n", | ||
"Download: 100%|██████████| 11.7M/11.7M [00:01<00:00, 11.0MB/s]\n", | ||
"02:26:11 | INFO | Annotation download successful\n" | ||
] | ||
} | ||
], | ||
"source": [ | ||
"from pathlib import *\n", | ||
"from pycomfort.files import *" | ||
] | ||
}, | ||
{ | ||
"cell_type": "code", | ||
"execution_count": null, | ||
"outputs": [], | ||
"source": [ | ||
"import sys\n", | ||
"\n", | ||
"base = Path(\"..\")\n", | ||
"local = (base / \"genotations\").resolve()\n", | ||
"if local.exists():\n", | ||
" sys.path.insert(0, Path(\"..\").absolute().as_posix())\n", | ||
" sys.path.insert(0, local)\n", | ||
" print(sys.path)\n", | ||
"else:\n", | ||
" base = Path(\".\")\n", | ||
"%load_ext autoreload\n", | ||
"%autoreload 2" | ||
], | ||
"metadata": { | ||
"collapsed": false, | ||
"is_executing": true | ||
}, | ||
"id": "1f3e9d797e482da8" | ||
}, | ||
{ | ||
"cell_type": "code", | ||
"execution_count": null, | ||
"outputs": [], | ||
"source": [ | ||
"import polars as pl\n", | ||
"from genotations import genomes\n", | ||
"from genotations.genomes import Annotations\n", | ||
"from genotations import *\n", | ||
"from genotations import ensembl\n", | ||
"from genotations.quantification import *\n", | ||
"from genotations.genomes import *" | ||
], | ||
"metadata": { | ||
"collapsed": false, | ||
"is_executing": true | ||
}, | ||
"id": "1dac2ca0035ac603" | ||
}, | ||
{ | ||
"cell_type": "code", | ||
"execution_count": null, | ||
"outputs": [], | ||
"source": [ | ||
"pl.Config.set_tbl_width_chars(10000)\n", | ||
"pl.Config.set_fmt_str_lengths(1000)\n", | ||
"pl.Config.set_tbl_rows(20)" | ||
], | ||
"metadata": { | ||
"collapsed": false, | ||
"is_executing": true | ||
}, | ||
"id": "bd54e6bb80abcde4" | ||
}, | ||
{ | ||
"cell_type": "code", | ||
"execution_count": null, | ||
"outputs": [], | ||
"source": [ | ||
"human = ensembl.human" | ||
], | ||
"metadata": { | ||
"collapsed": false, | ||
"is_executing": true | ||
}, | ||
"id": "87b39d6be6dc123e" | ||
}, | ||
{ | ||
"cell_type": "code", | ||
"execution_count": null, | ||
"outputs": [], | ||
"source": [ | ||
"chimpanzee = ensembl.chimpanzee" | ||
], | ||
"metadata": { | ||
"collapsed": false, | ||
"is_executing": true | ||
}, | ||
"id": "47f84c5329edbc04" | ||
}, | ||
{ | ||
"cell_type": "code", | ||
"execution_count": null, | ||
"outputs": [], | ||
"source": [ | ||
"chimpanzee" | ||
], | ||
"metadata": { | ||
"collapsed": false, | ||
"is_executing": true | ||
}, | ||
"id": "4dc51d36a272cd5c" | ||
}, | ||
{ | ||
"cell_type": "code", | ||
"execution_count": null, | ||
"outputs": [], | ||
"source": [ | ||
"chimpanzee.annotations" | ||
], | ||
"metadata": { | ||
"collapsed": false, | ||
"is_executing": true | ||
}, | ||
"id": "aeae01cc8f522bd7" | ||
}, | ||
{ | ||
"cell_type": "code", | ||
"execution_count": 13, | ||
"outputs": [ | ||
{ | ||
"name": "stderr", | ||
"output_type": "stream", | ||
"text": [ | ||
"01:59:22 | ERROR | assembly GCA_944319715.1 should be in assembly genomes!\n", | ||
"01:59:22 | ERROR | assembly GCA_944319725.1 should be in assembly genomes!\n" | ||
] | ||
}, | ||
{ | ||
"data": { | ||
"text/plain": "'/home/antonkulaga/.local/share/genomes/Pan_tro_3.0/Pan_tro_3.0.annotation.gtf'" | ||
}, | ||
"execution_count": 13, | ||
"metadata": {}, | ||
"output_type": "execute_result" | ||
} | ||
], | ||
"source": [ | ||
"chimpanzee.genome.annotation_gtf_file" | ||
], | ||
"metadata": { | ||
"collapsed": false, | ||
"ExecuteTime": { | ||
"end_time": "2023-09-05T22:59:22.122219627Z", | ||
"start_time": "2023-09-05T22:59:18.611651653Z" | ||
} | ||
}, | ||
"id": "d8c2d705f97d9607" | ||
}, | ||
{ | ||
"cell_type": "code", | ||
"execution_count": null, | ||
"outputs": [], | ||
"source": [], | ||
"metadata": { | ||
"collapsed": false | ||
}, | ||
"id": "499ee96ebc107cd5" | ||
} | ||
], | ||
"metadata": { | ||
"kernelspec": { | ||
"display_name": "Python 3", | ||
"language": "python", | ||
"name": "python3" | ||
}, | ||
"language_info": { | ||
"codemirror_mode": { | ||
"name": "ipython", | ||
"version": 2 | ||
}, | ||
"file_extension": ".py", | ||
"mimetype": "text/x-python", | ||
"name": "python", | ||
"nbconvert_exporter": "python", | ||
"pygments_lexer": "ipython2", | ||
"version": "2.7.6" | ||
} | ||
}, | ||
"nbformat": 4, | ||
"nbformat_minor": 5 | ||
} |
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
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
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
Oops, something went wrong.