{ "cells": [ { "cell_type": "markdown", "metadata": {}, "source": [ "[![Open In Colab](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/github/saketkc/pysradb/blob/develop/notebooks/01.Python-API_demo.ipynb)" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "# Python API Demo\n", "\n", "This notebook demonstrates the core functionality of pysradb Python API for querying SRA metadata." ] }, { "cell_type": "code", "execution_count": 1, "metadata": { "execution": { "iopub.execute_input": "2025-11-01T13:07:15.972370Z", "iopub.status.busy": "2025-11-01T13:07:15.972015Z", "iopub.status.idle": "2025-11-01T13:07:16.357927Z", "shell.execute_reply": "2025-11-01T13:07:16.356676Z" } }, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "pysradb 3.0.0.dev0 is already installed\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ "/data/github/pysradb/pysradb/utils.py:16: TqdmExperimentalWarning: Using `tqdm.autonotebook.tqdm` in notebook mode. Use `tqdm.tqdm` instead to force console mode (e.g. in jupyter console)\n", " from tqdm.autonotebook import tqdm\n" ] } ], "source": [ "# Install pysradb if not already installed\n", "try:\n", " import pysradb\n", "\n", " print(f\"pysradb {pysradb.__version__} is already installed\")\n", "except ImportError:\n", " print(\"Installing pysradb from GitHub...\")\n", " import sys\n", "\n", " !{sys.executable} -m pip install -q git+https://github.com/saketkc/pysradb\n", " print(\"pysradb installed successfully!\")" ] }, { "cell_type": "code", "execution_count": 2, "metadata": { "colab": { "base_uri": "https://localhost:8080/" }, "execution": { "iopub.execute_input": "2025-11-01T13:07:16.423567Z", "iopub.status.busy": "2025-11-01T13:07:16.423041Z", "iopub.status.idle": "2025-11-01T13:07:16.426702Z", "shell.execute_reply": "2025-11-01T13:07:16.425713Z" }, "id": "D-CWF0xjKhxJ", "outputId": "b639c586-2a2b-4ecd-ae4a-55643c276cda" }, "outputs": [], "source": [ "# pip install git+https://github.com/saketkc/pysradb" ] }, { "cell_type": "code", "execution_count": 3, "metadata": { "colab": { "base_uri": "https://localhost:8080/" }, "execution": { "iopub.execute_input": "2025-11-01T13:07:16.428767Z", "iopub.status.busy": "2025-11-01T13:07:16.428621Z", "iopub.status.idle": "2025-11-01T13:07:17.350867Z", "shell.execute_reply": "2025-11-01T13:07:17.349172Z" }, "id": "Tyd8Sjv3KpMa", "outputId": "9480b87f-a3bd-4507-fac4-c03ee2ad1c8f" }, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "pysradb 3.0.0.dev0\r\n" ] } ], "source": [ "!pysradb --version" ] }, { "cell_type": "code", "execution_count": 4, "metadata": { "colab": { "base_uri": "https://localhost:8080/" }, "execution": { "iopub.execute_input": "2025-11-01T13:07:17.354299Z", "iopub.status.busy": "2025-11-01T13:07:17.353950Z", "iopub.status.idle": "2025-11-01T13:07:17.358832Z", "shell.execute_reply": "2025-11-01T13:07:17.357663Z" }, "id": "3h9Wlv3lKb7b", "outputId": "d3cf89f7-f059-41bd-9767-2bb2a0679dbf" }, "outputs": [], "source": [ "from pysradb.sraweb import SRAweb" ] }, { "cell_type": "code", "execution_count": 5, "metadata": { "execution": { "iopub.execute_input": "2025-11-01T13:07:17.361533Z", "iopub.status.busy": "2025-11-01T13:07:17.361250Z", "iopub.status.idle": "2025-11-01T13:07:17.365279Z", "shell.execute_reply": "2025-11-01T13:07:17.364056Z" }, "id": "0iOHm8wUKb8G" }, "outputs": [], "source": [ "db = SRAweb()" ] }, { "cell_type": "markdown", "metadata": { "id": "CDyWgOqzdn6d" }, "source": [ "## Get metadata of one project" ] }, { "cell_type": "code", "execution_count": 6, "metadata": { "colab": { "base_uri": "https://localhost:8080/", "height": 3152 }, "execution": { "iopub.execute_input": "2025-11-01T13:07:17.368102Z", "iopub.status.busy": "2025-11-01T13:07:17.367803Z", "iopub.status.idle": "2025-11-01T13:07:19.140051Z", "shell.execute_reply": "2025-11-01T13:07:19.139033Z" }, "id": "pXJ6WhsjKb_x", "outputId": "dfcb2624-7e85-487c-9550-0d7b7887ed68" }, "outputs": [ { "data": { "text/html": [ "
\n", "\n", "\n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", "
study_accessionstudy_titleexperiment_accessionexperiment_titleexperiment_descorganism_taxidorganism_namelibrary_namelibrary_strategylibrary_source...biosamplebioprojectinstrumentinstrument_modelinstrument_model_desctotal_spotstotal_sizerun_accessionrun_total_spotsrun_total_bases
133SRP016501Evolutionary dynamics of gene and isoform regu...SRX196264GSM1020640: mouse_a_brain; Mus musculus; RNA-SeqGSM1020640: mouse_a_brain; Mus musculus; RNA-Seq10090Mus musculusRNA-SeqTRANSCRIPTOMIC...SAMN01766814PRJNA177791Illumina HiSeq 2000Illumina HiSeq 2000ILLUMINA872646045927043102SRR594393872646048726460400
132SRP016501Evolutionary dynamics of gene and isoform regu...SRX196265GSM1020641: mouse_a_colon; Mus musculus; RNA-SeqGSM1020641: mouse_a_colon; Mus musculus; RNA-Seq10090Mus musculusRNA-SeqTRANSCRIPTOMIC...SAMN01766815PRJNA177791Illumina HiSeq 2000Illumina HiSeq 2000ILLUMINA1018164916835402318SRR59439410181649110181649100
131SRP016501Evolutionary dynamics of gene and isoform regu...SRX196266GSM1020642: mouse_a_heart; Mus musculus; RNA-SeqGSM1020642: mouse_a_heart; Mus musculus; RNA-Seq10090Mus musculusRNA-SeqTRANSCRIPTOMIC...SAMN01766816PRJNA177791Illumina Genome Analyzer IIxIllumina Genome Analyzer IIxILLUMINA351759821502674440SRR594395351759822532670704
130SRP016501Evolutionary dynamics of gene and isoform regu...SRX196267GSM1020643: mouse_a_kidney; Mus musculus; RNA-SeqGSM1020643: mouse_a_kidney; Mus musculus; RNA-Seq10090Mus musculusRNA-SeqTRANSCRIPTOMIC...SAMN01766817PRJNA177791Illumina HiSeq 2000Illumina HiSeq 2000ILLUMINA1192747867555854784SRR59439611927478611927478600
129SRP016501Evolutionary dynamics of gene and isoform regu...SRX196268GSM1020644: mouse_a_liver; Mus musculus; RNA-SeqGSM1020644: mouse_a_liver; Mus musculus; RNA-Seq10090Mus musculusRNA-SeqTRANSCRIPTOMIC...SAMN01766818PRJNA177791Illumina HiSeq 2000Illumina HiSeq 2000ILLUMINA1162924787481554926SRR59439711629247811629247800
..................................................................
4SRP016501Evolutionary dynamics of gene and isoform regu...SRX196393GSM1020769: chicken_c_liver; Gallus gallus; RN...GSM1020769: chicken_c_liver; Gallus gallus; RN...9031Gallus gallusRNA-SeqTRANSCRIPTOMIC...SAMN01766943PRJNA177791Illumina HiSeq 2000Illumina HiSeq 2000ILLUMINA18978066562367072SRR594522189780661366420752
3SRP016501Evolutionary dynamics of gene and isoform regu...SRX196394GSM1020770: chicken_c_lung; Gallus gallus; RNA...GSM1020770: chicken_c_lung; Gallus gallus; RNA...9031Gallus gallusRNA-SeqTRANSCRIPTOMIC...SAMN01766944PRJNA177791Illumina HiSeq 2000Illumina HiSeq 2000ILLUMINA26604280931417024SRR594523266042801862299600
2SRP016501Evolutionary dynamics of gene and isoform regu...SRX196395GSM1020771: chicken_c_skm; Gallus gallus; RNA-SeqGSM1020771: chicken_c_skm; Gallus gallus; RNA-Seq9031Gallus gallusRNA-SeqTRANSCRIPTOMIC...SAMN01766945PRJNA177791Illumina HiSeq 2000Illumina HiSeq 2000ILLUMINA25606436986287075SRR594524256064361792450520
1SRP016501Evolutionary dynamics of gene and isoform regu...SRX196396GSM1020772: chicken_c_spleen; Gallus gallus; R...GSM1020772: chicken_c_spleen; Gallus gallus; R...9031Gallus gallusRNA-SeqTRANSCRIPTOMIC...SAMN01766946PRJNA177791Illumina HiSeq 2000Illumina HiSeq 2000ILLUMINA244017081201671888SRR594525244017081756922976
0SRP016501Evolutionary dynamics of gene and isoform regu...SRX196397GSM1020773: chicken_c_testes; Gallus gallus; R...GSM1020773: chicken_c_testes; Gallus gallus; R...9031Gallus gallusRNA-SeqTRANSCRIPTOMIC...SAMN01766947PRJNA177791Illumina HiSeq 2000Illumina HiSeq 2000ILLUMINA374233941980545796SRR594526374233942993871520
\n", "

134 rows × 24 columns

\n", "
" ], "text/plain": [ " study_accession study_title \\\n", "133 SRP016501 Evolutionary dynamics of gene and isoform regu... \n", "132 SRP016501 Evolutionary dynamics of gene and isoform regu... \n", "131 SRP016501 Evolutionary dynamics of gene and isoform regu... \n", "130 SRP016501 Evolutionary dynamics of gene and isoform regu... \n", "129 SRP016501 Evolutionary dynamics of gene and isoform regu... \n", ".. ... ... \n", "4 SRP016501 Evolutionary dynamics of gene and isoform regu... \n", "3 SRP016501 Evolutionary dynamics of gene and isoform regu... \n", "2 SRP016501 Evolutionary dynamics of gene and isoform regu... \n", "1 SRP016501 Evolutionary dynamics of gene and isoform regu... \n", "0 SRP016501 Evolutionary dynamics of gene and isoform regu... \n", "\n", " experiment_accession experiment_title \\\n", "133 SRX196264 GSM1020640: mouse_a_brain; Mus musculus; RNA-Seq \n", "132 SRX196265 GSM1020641: mouse_a_colon; Mus musculus; RNA-Seq \n", "131 SRX196266 GSM1020642: mouse_a_heart; Mus musculus; RNA-Seq \n", "130 SRX196267 GSM1020643: mouse_a_kidney; Mus musculus; RNA-Seq \n", "129 SRX196268 GSM1020644: mouse_a_liver; Mus musculus; RNA-Seq \n", ".. ... ... \n", "4 SRX196393 GSM1020769: chicken_c_liver; Gallus gallus; RN... \n", "3 SRX196394 GSM1020770: chicken_c_lung; Gallus gallus; RNA... \n", "2 SRX196395 GSM1020771: chicken_c_skm; Gallus gallus; RNA-Seq \n", "1 SRX196396 GSM1020772: chicken_c_spleen; Gallus gallus; R... \n", "0 SRX196397 GSM1020773: chicken_c_testes; Gallus gallus; R... \n", "\n", " experiment_desc organism_taxid \\\n", "133 GSM1020640: mouse_a_brain; Mus musculus; RNA-Seq 10090 \n", "132 GSM1020641: mouse_a_colon; Mus musculus; RNA-Seq 10090 \n", "131 GSM1020642: mouse_a_heart; Mus musculus; RNA-Seq 10090 \n", "130 GSM1020643: mouse_a_kidney; Mus musculus; RNA-Seq 10090 \n", "129 GSM1020644: mouse_a_liver; Mus musculus; RNA-Seq 10090 \n", ".. ... ... \n", "4 GSM1020769: chicken_c_liver; Gallus gallus; RN... 9031 \n", "3 GSM1020770: chicken_c_lung; Gallus gallus; RNA... 9031 \n", "2 GSM1020771: chicken_c_skm; Gallus gallus; RNA-Seq 9031 \n", "1 GSM1020772: chicken_c_spleen; Gallus gallus; R... 9031 \n", "0 GSM1020773: chicken_c_testes; Gallus gallus; R... 9031 \n", "\n", " organism_name library_name library_strategy library_source ... \\\n", "133 Mus musculus RNA-Seq TRANSCRIPTOMIC ... \n", "132 Mus musculus RNA-Seq TRANSCRIPTOMIC ... \n", "131 Mus musculus RNA-Seq TRANSCRIPTOMIC ... \n", "130 Mus musculus RNA-Seq TRANSCRIPTOMIC ... \n", "129 Mus musculus RNA-Seq TRANSCRIPTOMIC ... \n", ".. ... ... ... ... ... \n", "4 Gallus gallus RNA-Seq TRANSCRIPTOMIC ... \n", "3 Gallus gallus RNA-Seq TRANSCRIPTOMIC ... \n", "2 Gallus gallus RNA-Seq TRANSCRIPTOMIC ... \n", "1 Gallus gallus RNA-Seq TRANSCRIPTOMIC ... \n", "0 Gallus gallus RNA-Seq TRANSCRIPTOMIC ... \n", "\n", " biosample bioproject instrument \\\n", "133 SAMN01766814 PRJNA177791 Illumina HiSeq 2000 \n", "132 SAMN01766815 PRJNA177791 Illumina HiSeq 2000 \n", "131 SAMN01766816 PRJNA177791 Illumina Genome Analyzer IIx \n", "130 SAMN01766817 PRJNA177791 Illumina HiSeq 2000 \n", "129 SAMN01766818 PRJNA177791 Illumina HiSeq 2000 \n", ".. ... ... ... \n", "4 SAMN01766943 PRJNA177791 Illumina HiSeq 2000 \n", "3 SAMN01766944 PRJNA177791 Illumina HiSeq 2000 \n", "2 SAMN01766945 PRJNA177791 Illumina HiSeq 2000 \n", "1 SAMN01766946 PRJNA177791 Illumina HiSeq 2000 \n", "0 SAMN01766947 PRJNA177791 Illumina HiSeq 2000 \n", "\n", " instrument_model instrument_model_desc total_spots \\\n", "133 Illumina HiSeq 2000 ILLUMINA 87264604 \n", "132 Illumina HiSeq 2000 ILLUMINA 101816491 \n", "131 Illumina Genome Analyzer IIx ILLUMINA 35175982 \n", "130 Illumina HiSeq 2000 ILLUMINA 119274786 \n", "129 Illumina HiSeq 2000 ILLUMINA 116292478 \n", ".. ... ... ... \n", "4 Illumina HiSeq 2000 ILLUMINA 18978066 \n", "3 Illumina HiSeq 2000 ILLUMINA 26604280 \n", "2 Illumina HiSeq 2000 ILLUMINA 25606436 \n", "1 Illumina HiSeq 2000 ILLUMINA 24401708 \n", "0 Illumina HiSeq 2000 ILLUMINA 37423394 \n", "\n", " total_size run_accession run_total_spots run_total_bases \n", "133 5927043102 SRR594393 87264604 8726460400 \n", "132 6835402318 SRR594394 101816491 10181649100 \n", "131 1502674440 SRR594395 35175982 2532670704 \n", "130 7555854784 SRR594396 119274786 11927478600 \n", "129 7481554926 SRR594397 116292478 11629247800 \n", ".. ... ... ... ... \n", "4 562367072 SRR594522 18978066 1366420752 \n", "3 931417024 SRR594523 26604280 1862299600 \n", "2 986287075 SRR594524 25606436 1792450520 \n", "1 1201671888 SRR594525 24401708 1756922976 \n", "0 1980545796 SRR594526 37423394 2993871520 \n", "\n", "[134 rows x 24 columns]" ] }, "execution_count": 6, "metadata": {}, "output_type": "execute_result" } ], "source": [ "df = db.sra_metadata(\"SRP016501\")\n", "df" ] }, { "cell_type": "markdown", "metadata": { "id": "gl-3e2L9Kb_7" }, "source": [ "## Get detailed metadata" ] }, { "cell_type": "code", "execution_count": 7, "metadata": { "colab": { "base_uri": "https://localhost:8080/", "height": 1000 }, "execution": { "iopub.execute_input": "2025-11-01T13:07:19.143434Z", "iopub.status.busy": "2025-11-01T13:07:19.143150Z", "iopub.status.idle": "2025-11-01T13:07:26.352948Z", "shell.execute_reply": "2025-11-01T13:07:26.351467Z" }, "id": "JBUcbaxlKb_9", "outputId": "57afe1b5-cb98-4cdd-b452-69527cbd695d" }, "outputs": [ { "data": { "text/html": [ "
\n", "\n", "\n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", "
run_accessionstudy_accessionstudy_titleexperiment_accessionexperiment_titleexperiment_descorganism_taxidorganism_namelibrary_namelibrary_strategy...experiment_aliassource_nametissuestrainena_fastq_httpena_fastq_http_1ena_fastq_http_2ena_fastq_ftpena_fastq_ftp_1ena_fastq_ftp_2
0SRR594393SRP016501Evolutionary dynamics of gene and isoform regu...SRX196264GSM1020640: mouse_a_brain; Mus musculus; RNA-SeqGSM1020640: mouse_a_brain; Mus musculus; RNA-Seq10090Mus musculus<NA>RNA-Seq...GSM1020640_1mouse_brainbrainDBA/2J<NA>http://ftp.sra.ebi.ac.uk/vol1/fastq/SRR594/SRR...http://ftp.sra.ebi.ac.uk/vol1/fastq/SRR594/SRR...<NA>era-fasp@fasp.sra.ebi.ac.uk:vol1/fastq/SRR594/...era-fasp@fasp.sra.ebi.ac.uk:vol1/fastq/SRR594/...
1SRR594394SRP016501Evolutionary dynamics of gene and isoform regu...SRX196265GSM1020641: mouse_a_colon; Mus musculus; RNA-SeqGSM1020641: mouse_a_colon; Mus musculus; RNA-Seq10090Mus musculus<NA>RNA-Seq...GSM1020641_1mouse_coloncolonDBA/2J<NA>http://ftp.sra.ebi.ac.uk/vol1/fastq/SRR594/SRR...http://ftp.sra.ebi.ac.uk/vol1/fastq/SRR594/SRR...<NA>era-fasp@fasp.sra.ebi.ac.uk:vol1/fastq/SRR594/...era-fasp@fasp.sra.ebi.ac.uk:vol1/fastq/SRR594/...
2SRR594395SRP016501Evolutionary dynamics of gene and isoform regu...SRX196266GSM1020642: mouse_a_heart; Mus musculus; RNA-SeqGSM1020642: mouse_a_heart; Mus musculus; RNA-Seq10090Mus musculus<NA>RNA-Seq...GSM1020642_1mouse_heartheartDBA/2J<NA>http://ftp.sra.ebi.ac.uk/vol1/fastq/SRR594/SRR...http://ftp.sra.ebi.ac.uk/vol1/fastq/SRR594/SRR...<NA>era-fasp@fasp.sra.ebi.ac.uk:vol1/fastq/SRR594/...era-fasp@fasp.sra.ebi.ac.uk:vol1/fastq/SRR594/...
3SRR594396SRP016501Evolutionary dynamics of gene and isoform regu...SRX196267GSM1020643: mouse_a_kidney; Mus musculus; RNA-SeqGSM1020643: mouse_a_kidney; Mus musculus; RNA-Seq10090Mus musculus<NA>RNA-Seq...GSM1020643_1mouse_kidneykidneyDBA/2J<NA>http://ftp.sra.ebi.ac.uk/vol1/fastq/SRR594/SRR...http://ftp.sra.ebi.ac.uk/vol1/fastq/SRR594/SRR...<NA>era-fasp@fasp.sra.ebi.ac.uk:vol1/fastq/SRR594/...era-fasp@fasp.sra.ebi.ac.uk:vol1/fastq/SRR594/...
4SRR594397SRP016501Evolutionary dynamics of gene and isoform regu...SRX196268GSM1020644: mouse_a_liver; Mus musculus; RNA-SeqGSM1020644: mouse_a_liver; Mus musculus; RNA-Seq10090Mus musculus<NA>RNA-Seq...GSM1020644_1mouse_liverliverDBA/2J<NA>http://ftp.sra.ebi.ac.uk/vol1/fastq/SRR594/SRR...http://ftp.sra.ebi.ac.uk/vol1/fastq/SRR594/SRR...<NA>era-fasp@fasp.sra.ebi.ac.uk:vol1/fastq/SRR594/...era-fasp@fasp.sra.ebi.ac.uk:vol1/fastq/SRR594/...
..................................................................
129SRR594522SRP016501Evolutionary dynamics of gene and isoform regu...SRX196393GSM1020769: chicken_c_liver; Gallus gallus; RN...GSM1020769: chicken_c_liver; Gallus gallus; RN...9031Gallus gallus<NA>RNA-Seq...GSM1020769_1chicken_liverliver<NA><NA>http://ftp.sra.ebi.ac.uk/vol1/fastq/SRR594/SRR...http://ftp.sra.ebi.ac.uk/vol1/fastq/SRR594/SRR...<NA>era-fasp@fasp.sra.ebi.ac.uk:vol1/fastq/SRR594/...era-fasp@fasp.sra.ebi.ac.uk:vol1/fastq/SRR594/...
130SRR594523SRP016501Evolutionary dynamics of gene and isoform regu...SRX196394GSM1020770: chicken_c_lung; Gallus gallus; RNA...GSM1020770: chicken_c_lung; Gallus gallus; RNA...9031Gallus gallus<NA>RNA-Seq...GSM1020770_1chicken_lunglung<NA><NA>http://ftp.sra.ebi.ac.uk/vol1/fastq/SRR594/SRR...http://ftp.sra.ebi.ac.uk/vol1/fastq/SRR594/SRR...<NA>era-fasp@fasp.sra.ebi.ac.uk:vol1/fastq/SRR594/...era-fasp@fasp.sra.ebi.ac.uk:vol1/fastq/SRR594/...
131SRR594524SRP016501Evolutionary dynamics of gene and isoform regu...SRX196395GSM1020771: chicken_c_skm; Gallus gallus; RNA-SeqGSM1020771: chicken_c_skm; Gallus gallus; RNA-Seq9031Gallus gallus<NA>RNA-Seq...GSM1020771_1chicken_skmskeletal muscle<NA><NA>http://ftp.sra.ebi.ac.uk/vol1/fastq/SRR594/SRR...http://ftp.sra.ebi.ac.uk/vol1/fastq/SRR594/SRR...<NA>era-fasp@fasp.sra.ebi.ac.uk:vol1/fastq/SRR594/...era-fasp@fasp.sra.ebi.ac.uk:vol1/fastq/SRR594/...
132SRR594525SRP016501Evolutionary dynamics of gene and isoform regu...SRX196396GSM1020772: chicken_c_spleen; Gallus gallus; R...GSM1020772: chicken_c_spleen; Gallus gallus; R...9031Gallus gallus<NA>RNA-Seq...GSM1020772_1chicken_spleenspleen<NA><NA>http://ftp.sra.ebi.ac.uk/vol1/fastq/SRR594/SRR...http://ftp.sra.ebi.ac.uk/vol1/fastq/SRR594/SRR...<NA>era-fasp@fasp.sra.ebi.ac.uk:vol1/fastq/SRR594/...era-fasp@fasp.sra.ebi.ac.uk:vol1/fastq/SRR594/...
133SRR594526SRP016501Evolutionary dynamics of gene and isoform regu...SRX196397GSM1020773: chicken_c_testes; Gallus gallus; R...GSM1020773: chicken_c_testes; Gallus gallus; R...9031Gallus gallus<NA>RNA-Seq...GSM1020773_1chicken_testestestes<NA><NA>http://ftp.sra.ebi.ac.uk/vol1/fastq/SRR594/SRR...http://ftp.sra.ebi.ac.uk/vol1/fastq/SRR594/SRR...<NA>era-fasp@fasp.sra.ebi.ac.uk:vol1/fastq/SRR594/...era-fasp@fasp.sra.ebi.ac.uk:vol1/fastq/SRR594/...
\n", "

134 rows × 53 columns

\n", "
" ], "text/plain": [ " run_accession study_accession \\\n", "0 SRR594393 SRP016501 \n", "1 SRR594394 SRP016501 \n", "2 SRR594395 SRP016501 \n", "3 SRR594396 SRP016501 \n", "4 SRR594397 SRP016501 \n", ".. ... ... \n", "129 SRR594522 SRP016501 \n", "130 SRR594523 SRP016501 \n", "131 SRR594524 SRP016501 \n", "132 SRR594525 SRP016501 \n", "133 SRR594526 SRP016501 \n", "\n", " study_title experiment_accession \\\n", "0 Evolutionary dynamics of gene and isoform regu... SRX196264 \n", "1 Evolutionary dynamics of gene and isoform regu... SRX196265 \n", "2 Evolutionary dynamics of gene and isoform regu... SRX196266 \n", "3 Evolutionary dynamics of gene and isoform regu... SRX196267 \n", "4 Evolutionary dynamics of gene and isoform regu... SRX196268 \n", ".. ... ... \n", "129 Evolutionary dynamics of gene and isoform regu... SRX196393 \n", "130 Evolutionary dynamics of gene and isoform regu... SRX196394 \n", "131 Evolutionary dynamics of gene and isoform regu... SRX196395 \n", "132 Evolutionary dynamics of gene and isoform regu... SRX196396 \n", "133 Evolutionary dynamics of gene and isoform regu... SRX196397 \n", "\n", " experiment_title \\\n", "0 GSM1020640: mouse_a_brain; Mus musculus; RNA-Seq \n", "1 GSM1020641: mouse_a_colon; Mus musculus; RNA-Seq \n", "2 GSM1020642: mouse_a_heart; Mus musculus; RNA-Seq \n", "3 GSM1020643: mouse_a_kidney; Mus musculus; RNA-Seq \n", "4 GSM1020644: mouse_a_liver; Mus musculus; RNA-Seq \n", ".. ... \n", "129 GSM1020769: chicken_c_liver; Gallus gallus; RN... \n", "130 GSM1020770: chicken_c_lung; Gallus gallus; RNA... \n", "131 GSM1020771: chicken_c_skm; Gallus gallus; RNA-Seq \n", "132 GSM1020772: chicken_c_spleen; Gallus gallus; R... \n", "133 GSM1020773: chicken_c_testes; Gallus gallus; R... \n", "\n", " experiment_desc organism_taxid \\\n", "0 GSM1020640: mouse_a_brain; Mus musculus; RNA-Seq 10090 \n", "1 GSM1020641: mouse_a_colon; Mus musculus; RNA-Seq 10090 \n", "2 GSM1020642: mouse_a_heart; Mus musculus; RNA-Seq 10090 \n", "3 GSM1020643: mouse_a_kidney; Mus musculus; RNA-Seq 10090 \n", "4 GSM1020644: mouse_a_liver; Mus musculus; RNA-Seq 10090 \n", ".. ... ... \n", "129 GSM1020769: chicken_c_liver; Gallus gallus; RN... 9031 \n", "130 GSM1020770: chicken_c_lung; Gallus gallus; RNA... 9031 \n", "131 GSM1020771: chicken_c_skm; Gallus gallus; RNA-Seq 9031 \n", "132 GSM1020772: chicken_c_spleen; Gallus gallus; R... 9031 \n", "133 GSM1020773: chicken_c_testes; Gallus gallus; R... 9031 \n", "\n", " organism_name library_name library_strategy ... experiment_alias \\\n", "0 Mus musculus RNA-Seq ... GSM1020640_1 \n", "1 Mus musculus RNA-Seq ... GSM1020641_1 \n", "2 Mus musculus RNA-Seq ... GSM1020642_1 \n", "3 Mus musculus RNA-Seq ... GSM1020643_1 \n", "4 Mus musculus RNA-Seq ... GSM1020644_1 \n", ".. ... ... ... ... ... \n", "129 Gallus gallus RNA-Seq ... GSM1020769_1 \n", "130 Gallus gallus RNA-Seq ... GSM1020770_1 \n", "131 Gallus gallus RNA-Seq ... GSM1020771_1 \n", "132 Gallus gallus RNA-Seq ... GSM1020772_1 \n", "133 Gallus gallus RNA-Seq ... GSM1020773_1 \n", "\n", " source_name tissue strain ena_fastq_http \\\n", "0 mouse_brain brain DBA/2J \n", "1 mouse_colon colon DBA/2J \n", "2 mouse_heart heart DBA/2J \n", "3 mouse_kidney kidney DBA/2J \n", "4 mouse_liver liver DBA/2J \n", ".. ... ... ... ... \n", "129 chicken_liver liver \n", "130 chicken_lung lung \n", "131 chicken_skm skeletal muscle \n", "132 chicken_spleen spleen \n", "133 chicken_testes testes \n", "\n", " ena_fastq_http_1 \\\n", "0 http://ftp.sra.ebi.ac.uk/vol1/fastq/SRR594/SRR... \n", "1 http://ftp.sra.ebi.ac.uk/vol1/fastq/SRR594/SRR... \n", "2 http://ftp.sra.ebi.ac.uk/vol1/fastq/SRR594/SRR... \n", "3 http://ftp.sra.ebi.ac.uk/vol1/fastq/SRR594/SRR... \n", "4 http://ftp.sra.ebi.ac.uk/vol1/fastq/SRR594/SRR... \n", ".. ... \n", "129 http://ftp.sra.ebi.ac.uk/vol1/fastq/SRR594/SRR... \n", "130 http://ftp.sra.ebi.ac.uk/vol1/fastq/SRR594/SRR... \n", "131 http://ftp.sra.ebi.ac.uk/vol1/fastq/SRR594/SRR... \n", "132 http://ftp.sra.ebi.ac.uk/vol1/fastq/SRR594/SRR... \n", "133 http://ftp.sra.ebi.ac.uk/vol1/fastq/SRR594/SRR... \n", "\n", " ena_fastq_http_2 ena_fastq_ftp \\\n", "0 http://ftp.sra.ebi.ac.uk/vol1/fastq/SRR594/SRR... \n", "1 http://ftp.sra.ebi.ac.uk/vol1/fastq/SRR594/SRR... \n", "2 http://ftp.sra.ebi.ac.uk/vol1/fastq/SRR594/SRR... \n", "3 http://ftp.sra.ebi.ac.uk/vol1/fastq/SRR594/SRR... \n", "4 http://ftp.sra.ebi.ac.uk/vol1/fastq/SRR594/SRR... \n", ".. ... ... \n", "129 http://ftp.sra.ebi.ac.uk/vol1/fastq/SRR594/SRR... \n", "130 http://ftp.sra.ebi.ac.uk/vol1/fastq/SRR594/SRR... \n", "131 http://ftp.sra.ebi.ac.uk/vol1/fastq/SRR594/SRR... \n", "132 http://ftp.sra.ebi.ac.uk/vol1/fastq/SRR594/SRR... \n", "133 http://ftp.sra.ebi.ac.uk/vol1/fastq/SRR594/SRR... \n", "\n", " ena_fastq_ftp_1 \\\n", "0 era-fasp@fasp.sra.ebi.ac.uk:vol1/fastq/SRR594/... \n", "1 era-fasp@fasp.sra.ebi.ac.uk:vol1/fastq/SRR594/... \n", "2 era-fasp@fasp.sra.ebi.ac.uk:vol1/fastq/SRR594/... \n", "3 era-fasp@fasp.sra.ebi.ac.uk:vol1/fastq/SRR594/... \n", "4 era-fasp@fasp.sra.ebi.ac.uk:vol1/fastq/SRR594/... \n", ".. ... \n", "129 era-fasp@fasp.sra.ebi.ac.uk:vol1/fastq/SRR594/... \n", "130 era-fasp@fasp.sra.ebi.ac.uk:vol1/fastq/SRR594/... \n", "131 era-fasp@fasp.sra.ebi.ac.uk:vol1/fastq/SRR594/... \n", "132 era-fasp@fasp.sra.ebi.ac.uk:vol1/fastq/SRR594/... \n", "133 era-fasp@fasp.sra.ebi.ac.uk:vol1/fastq/SRR594/... \n", "\n", " ena_fastq_ftp_2 \n", "0 era-fasp@fasp.sra.ebi.ac.uk:vol1/fastq/SRR594/... \n", "1 era-fasp@fasp.sra.ebi.ac.uk:vol1/fastq/SRR594/... \n", "2 era-fasp@fasp.sra.ebi.ac.uk:vol1/fastq/SRR594/... \n", "3 era-fasp@fasp.sra.ebi.ac.uk:vol1/fastq/SRR594/... \n", "4 era-fasp@fasp.sra.ebi.ac.uk:vol1/fastq/SRR594/... \n", ".. ... \n", "129 era-fasp@fasp.sra.ebi.ac.uk:vol1/fastq/SRR594/... \n", "130 era-fasp@fasp.sra.ebi.ac.uk:vol1/fastq/SRR594/... \n", "131 era-fasp@fasp.sra.ebi.ac.uk:vol1/fastq/SRR594/... \n", "132 era-fasp@fasp.sra.ebi.ac.uk:vol1/fastq/SRR594/... \n", "133 era-fasp@fasp.sra.ebi.ac.uk:vol1/fastq/SRR594/... \n", "\n", "[134 rows x 53 columns]" ] }, "execution_count": 7, "metadata": {}, "output_type": "execute_result" } ], "source": [ "df = db.sra_metadata(\"SRP016501\", detailed=True)\n", "df" ] }, { "cell_type": "markdown", "metadata": { "id": "unVsYJARdsfL" }, "source": [ "## Get metadata of multiple projects" ] }, { "cell_type": "code", "execution_count": 8, "metadata": { "colab": { "base_uri": "https://localhost:8080/", "height": 1000 }, "execution": { "iopub.execute_input": "2025-11-01T13:07:26.356567Z", "iopub.status.busy": "2025-11-01T13:07:26.356317Z", "iopub.status.idle": "2025-11-01T13:07:28.115240Z", "shell.execute_reply": "2025-11-01T13:07:28.113903Z" }, "id": "YzbKfVVOdvIE", "outputId": "8333cc13-a3af-446d-ffad-54caab6fa46a" }, "outputs": [ { "data": { "text/html": [ "
\n", "\n", "\n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", "
study_accessionstudy_titleexperiment_accessionexperiment_titleexperiment_descorganism_taxidorganism_namelibrary_namelibrary_strategylibrary_source...biosamplebioprojectinstrumentinstrument_modelinstrument_model_desctotal_spotstotal_sizerun_accessionrun_total_spotsrun_total_bases
25SRP098789Selective stalling of human translation throug...SRX2536403GSM2475997: 1.5 µM PF-067446846, 10 min, rep 1...GSM2475997: 1.5 µM PF-067446846, 10 min, rep 1...9606Homo sapiensOTHERTRANSCRIPTOMIC...SAMN06293487PRJNA369742Illumina HiSeq 2000Illumina HiSeq 2000ILLUMINA42082855916745706SRR5227288420828552104142750
24SRP098789Selective stalling of human translation throug...SRX2536404GSM2475998: 1.5 µM PF-067446846, 10 min, rep 2...GSM2475998: 1.5 µM PF-067446846, 10 min, rep 2...9606Homo sapiensOTHERTRANSCRIPTOMIC...SAMN06293486PRJNA369742Illumina HiSeq 2000Illumina HiSeq 2000ILLUMINA416574611360366732SRR5227289416574612082873050
23SRP098789Selective stalling of human translation throug...SRX2536405GSM2475999: 1.5 µM PF-067446846, 10 min, rep 3...GSM2475999: 1.5 µM PF-067446846, 10 min, rep 3...9606Homo sapiensOTHERTRANSCRIPTOMIC...SAMN06293485PRJNA369742Illumina HiSeq 2000Illumina HiSeq 2000ILLUMINA404629731287284933SRR5227290404629732023148650
22SRP098789Selective stalling of human translation throug...SRX2536406GSM2476000: 0.3 µM PF-067446846, 10 min, rep 1...GSM2476000: 0.3 µM PF-067446846, 10 min, rep 1...9606Homo sapiensOTHERTRANSCRIPTOMIC...SAMN06293484PRJNA369742Illumina HiSeq 2000Illumina HiSeq 2000ILLUMINA41143319843881081SRR5227291411433192057165950
21SRP098789Selective stalling of human translation throug...SRX2536407GSM2476001: 0.3 µM PF-067446846, 10 min, rep 2...GSM2476001: 0.3 µM PF-067446846, 10 min, rep 2...9606Homo sapiensOTHERTRANSCRIPTOMIC...SAMN06293483PRJNA369742Illumina HiSeq 2000Illumina HiSeq 2000ILLUMINA605524371875910244SRR5227292605524373027621850
..................................................................
30SRP016501Evolutionary dynamics of gene and isoform regu...SRX196393GSM1020769: chicken_c_liver; Gallus gallus; RN...GSM1020769: chicken_c_liver; Gallus gallus; RN...9031Gallus gallusRNA-SeqTRANSCRIPTOMIC...SAMN01766943PRJNA177791Illumina HiSeq 2000Illumina HiSeq 2000ILLUMINA18978066562367072SRR594522189780661366420752
29SRP016501Evolutionary dynamics of gene and isoform regu...SRX196394GSM1020770: chicken_c_lung; Gallus gallus; RNA...GSM1020770: chicken_c_lung; Gallus gallus; RNA...9031Gallus gallusRNA-SeqTRANSCRIPTOMIC...SAMN01766944PRJNA177791Illumina HiSeq 2000Illumina HiSeq 2000ILLUMINA26604280931417024SRR594523266042801862299600
28SRP016501Evolutionary dynamics of gene and isoform regu...SRX196395GSM1020771: chicken_c_skm; Gallus gallus; RNA-SeqGSM1020771: chicken_c_skm; Gallus gallus; RNA-Seq9031Gallus gallusRNA-SeqTRANSCRIPTOMIC...SAMN01766945PRJNA177791Illumina HiSeq 2000Illumina HiSeq 2000ILLUMINA25606436986287075SRR594524256064361792450520
27SRP016501Evolutionary dynamics of gene and isoform regu...SRX196396GSM1020772: chicken_c_spleen; Gallus gallus; R...GSM1020772: chicken_c_spleen; Gallus gallus; R...9031Gallus gallusRNA-SeqTRANSCRIPTOMIC...SAMN01766946PRJNA177791Illumina HiSeq 2000Illumina HiSeq 2000ILLUMINA244017081201671888SRR594525244017081756922976
26SRP016501Evolutionary dynamics of gene and isoform regu...SRX196397GSM1020773: chicken_c_testes; Gallus gallus; R...GSM1020773: chicken_c_testes; Gallus gallus; R...9031Gallus gallusRNA-SeqTRANSCRIPTOMIC...SAMN01766947PRJNA177791Illumina HiSeq 2000Illumina HiSeq 2000ILLUMINA374233941980545796SRR594526374233942993871520
\n", "

160 rows × 24 columns

\n", "
" ], "text/plain": [ " study_accession study_title \\\n", "25 SRP098789 Selective stalling of human translation throug... \n", "24 SRP098789 Selective stalling of human translation throug... \n", "23 SRP098789 Selective stalling of human translation throug... \n", "22 SRP098789 Selective stalling of human translation throug... \n", "21 SRP098789 Selective stalling of human translation throug... \n", ".. ... ... \n", "30 SRP016501 Evolutionary dynamics of gene and isoform regu... \n", "29 SRP016501 Evolutionary dynamics of gene and isoform regu... \n", "28 SRP016501 Evolutionary dynamics of gene and isoform regu... \n", "27 SRP016501 Evolutionary dynamics of gene and isoform regu... \n", "26 SRP016501 Evolutionary dynamics of gene and isoform regu... \n", "\n", " experiment_accession experiment_title \\\n", "25 SRX2536403 GSM2475997: 1.5 µM PF-067446846, 10 min, rep 1... \n", "24 SRX2536404 GSM2475998: 1.5 µM PF-067446846, 10 min, rep 2... \n", "23 SRX2536405 GSM2475999: 1.5 µM PF-067446846, 10 min, rep 3... \n", "22 SRX2536406 GSM2476000: 0.3 µM PF-067446846, 10 min, rep 1... \n", "21 SRX2536407 GSM2476001: 0.3 µM PF-067446846, 10 min, rep 2... \n", ".. ... ... \n", "30 SRX196393 GSM1020769: chicken_c_liver; Gallus gallus; RN... \n", "29 SRX196394 GSM1020770: chicken_c_lung; Gallus gallus; RNA... \n", "28 SRX196395 GSM1020771: chicken_c_skm; Gallus gallus; RNA-Seq \n", "27 SRX196396 GSM1020772: chicken_c_spleen; Gallus gallus; R... \n", "26 SRX196397 GSM1020773: chicken_c_testes; Gallus gallus; R... \n", "\n", " experiment_desc organism_taxid \\\n", "25 GSM2475997: 1.5 µM PF-067446846, 10 min, rep 1... 9606 \n", "24 GSM2475998: 1.5 µM PF-067446846, 10 min, rep 2... 9606 \n", "23 GSM2475999: 1.5 µM PF-067446846, 10 min, rep 3... 9606 \n", "22 GSM2476000: 0.3 µM PF-067446846, 10 min, rep 1... 9606 \n", "21 GSM2476001: 0.3 µM PF-067446846, 10 min, rep 2... 9606 \n", ".. ... ... \n", "30 GSM1020769: chicken_c_liver; Gallus gallus; RN... 9031 \n", "29 GSM1020770: chicken_c_lung; Gallus gallus; RNA... 9031 \n", "28 GSM1020771: chicken_c_skm; Gallus gallus; RNA-Seq 9031 \n", "27 GSM1020772: chicken_c_spleen; Gallus gallus; R... 9031 \n", "26 GSM1020773: chicken_c_testes; Gallus gallus; R... 9031 \n", "\n", " organism_name library_name library_strategy library_source ... \\\n", "25 Homo sapiens OTHER TRANSCRIPTOMIC ... \n", "24 Homo sapiens OTHER TRANSCRIPTOMIC ... \n", "23 Homo sapiens OTHER TRANSCRIPTOMIC ... \n", "22 Homo sapiens OTHER TRANSCRIPTOMIC ... \n", "21 Homo sapiens OTHER TRANSCRIPTOMIC ... \n", ".. ... ... ... ... ... \n", "30 Gallus gallus RNA-Seq TRANSCRIPTOMIC ... \n", "29 Gallus gallus RNA-Seq TRANSCRIPTOMIC ... \n", "28 Gallus gallus RNA-Seq TRANSCRIPTOMIC ... \n", "27 Gallus gallus RNA-Seq TRANSCRIPTOMIC ... \n", "26 Gallus gallus RNA-Seq TRANSCRIPTOMIC ... \n", "\n", " biosample bioproject instrument instrument_model \\\n", "25 SAMN06293487 PRJNA369742 Illumina HiSeq 2000 Illumina HiSeq 2000 \n", "24 SAMN06293486 PRJNA369742 Illumina HiSeq 2000 Illumina HiSeq 2000 \n", "23 SAMN06293485 PRJNA369742 Illumina HiSeq 2000 Illumina HiSeq 2000 \n", "22 SAMN06293484 PRJNA369742 Illumina HiSeq 2000 Illumina HiSeq 2000 \n", "21 SAMN06293483 PRJNA369742 Illumina HiSeq 2000 Illumina HiSeq 2000 \n", ".. ... ... ... ... \n", "30 SAMN01766943 PRJNA177791 Illumina HiSeq 2000 Illumina HiSeq 2000 \n", "29 SAMN01766944 PRJNA177791 Illumina HiSeq 2000 Illumina HiSeq 2000 \n", "28 SAMN01766945 PRJNA177791 Illumina HiSeq 2000 Illumina HiSeq 2000 \n", "27 SAMN01766946 PRJNA177791 Illumina HiSeq 2000 Illumina HiSeq 2000 \n", "26 SAMN01766947 PRJNA177791 Illumina HiSeq 2000 Illumina HiSeq 2000 \n", "\n", " instrument_model_desc total_spots total_size run_accession \\\n", "25 ILLUMINA 42082855 916745706 SRR5227288 \n", "24 ILLUMINA 41657461 1360366732 SRR5227289 \n", "23 ILLUMINA 40462973 1287284933 SRR5227290 \n", "22 ILLUMINA 41143319 843881081 SRR5227291 \n", "21 ILLUMINA 60552437 1875910244 SRR5227292 \n", ".. ... ... ... ... \n", "30 ILLUMINA 18978066 562367072 SRR594522 \n", "29 ILLUMINA 26604280 931417024 SRR594523 \n", "28 ILLUMINA 25606436 986287075 SRR594524 \n", "27 ILLUMINA 24401708 1201671888 SRR594525 \n", "26 ILLUMINA 37423394 1980545796 SRR594526 \n", "\n", " run_total_spots run_total_bases \n", "25 42082855 2104142750 \n", "24 41657461 2082873050 \n", "23 40462973 2023148650 \n", "22 41143319 2057165950 \n", "21 60552437 3027621850 \n", ".. ... ... \n", "30 18978066 1366420752 \n", "29 26604280 1862299600 \n", "28 25606436 1792450520 \n", "27 24401708 1756922976 \n", "26 37423394 2993871520 \n", "\n", "[160 rows x 24 columns]" ] }, "execution_count": 8, "metadata": {}, "output_type": "execute_result" } ], "source": [ "df = db.sra_metadata([\"SRP016501\", \"SRP098789\"])\n", "df" ] }, { "cell_type": "markdown", "metadata": { "id": "UuKRorTWZoQQ" }, "source": [ "## Get metadata of a Run" ] }, { "cell_type": "code", "execution_count": 9, "metadata": { "colab": { "base_uri": "https://localhost:8080/", "height": 214 }, "execution": { "iopub.execute_input": "2025-11-01T13:07:28.118706Z", "iopub.status.busy": "2025-11-01T13:07:28.118442Z", "iopub.status.idle": "2025-11-01T13:07:32.510732Z", "shell.execute_reply": "2025-11-01T13:07:32.509474Z" }, "id": "V1bMg1W6ZqZL", "outputId": "9e6029ab-b0bf-4954-ada4-da4dc5ccb058" }, "outputs": [ { "data": { "text/html": [ "
\n", "\n", "\n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", "
run_accessionstudy_accessionstudy_titleexperiment_accessionexperiment_titleexperiment_descorganism_taxidorganism_namelibrary_namelibrary_strategy...host_diseaseisolation_sourcelat_lonbiosamplemodelena_fastq_httpena_fastq_http_1ena_fastq_http_2ena_fastq_ftpena_fastq_ftp_1ena_fastq_ftp_2
0SRR11085797SRP249482Bat coronavirus RaTG13 Genome sequencingSRX7724752RNA-Seq of Rhinolophus affinis:Fecal swabRNA-Seq of Rhinolophus affinis:Fecal swab694135unidentified coronavirusRaTG13RNA-Seq...not applicablefecal swabnot collectedPathogen.cl<NA>http://ftp.sra.ebi.ac.uk/vol1/fastq/SRR110/097...http://ftp.sra.ebi.ac.uk/vol1/fastq/SRR110/097...<NA>era-fasp@fasp.sra.ebi.ac.uk:vol1/fastq/SRR110/...era-fasp@fasp.sra.ebi.ac.uk:vol1/fastq/SRR110/...
\n", "

1 rows × 60 columns

\n", "
" ], "text/plain": [ " run_accession study_accession study_title \\\n", "0 SRR11085797 SRP249482 Bat coronavirus RaTG13 Genome sequencing \n", "\n", " experiment_accession experiment_title \\\n", "0 SRX7724752 RNA-Seq of Rhinolophus affinis:Fecal swab \n", "\n", " experiment_desc organism_taxid \\\n", "0 RNA-Seq of Rhinolophus affinis:Fecal swab 694135 \n", "\n", " organism_name library_name library_strategy ... \\\n", "0 unidentified coronavirus RaTG13 RNA-Seq ... \n", "\n", " host_disease isolation_source lat_lon biosamplemodel \\\n", "0 not applicable fecal swab not collected Pathogen.cl \n", "\n", " ena_fastq_http ena_fastq_http_1 \\\n", "0 http://ftp.sra.ebi.ac.uk/vol1/fastq/SRR110/097... \n", "\n", " ena_fastq_http_2 ena_fastq_ftp \\\n", "0 http://ftp.sra.ebi.ac.uk/vol1/fastq/SRR110/097... \n", "\n", " ena_fastq_ftp_1 \\\n", "0 era-fasp@fasp.sra.ebi.ac.uk:vol1/fastq/SRR110/... \n", "\n", " ena_fastq_ftp_2 \n", "0 era-fasp@fasp.sra.ebi.ac.uk:vol1/fastq/SRR110/... \n", "\n", "[1 rows x 60 columns]" ] }, "execution_count": 9, "metadata": {}, "output_type": "execute_result" } ], "source": [ "df = db.sra_metadata(\"SRR11085797\", detailed=True)\n", "df" ] }, { "cell_type": "markdown", "metadata": { "id": "cADqnvl0KcAn" }, "source": [ "## SRX to GSM" ] }, { "cell_type": "code", "execution_count": 10, "metadata": { "colab": { "base_uri": "https://localhost:8080/", "height": 80 }, "execution": { "iopub.execute_input": "2025-11-01T13:07:32.514680Z", "iopub.status.busy": "2025-11-01T13:07:32.514374Z", "iopub.status.idle": "2025-11-01T13:07:33.931846Z", "shell.execute_reply": "2025-11-01T13:07:33.930414Z" }, "id": "iCFhnY0FKcAp", "outputId": "7efff242-ca68-499a-ee9e-0ec1f1dff95a" }, "outputs": [ { "data": { "text/html": [ "
\n", "\n", "\n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", "
experiment_accessionexperiment_alias
0SRX1254413GSM1887643
\n", "
" ], "text/plain": [ " experiment_accession experiment_alias\n", "0 SRX1254413 GSM1887643" ] }, "execution_count": 10, "metadata": {}, "output_type": "execute_result" } ], "source": [ "df = db.srx_to_gsm(\"SRX1254413\")\n", "df" ] } ], "metadata": { "colab": { "collapsed_sections": [], "include_colab_link": true, "name": "01.Python-API_demo.ipynb", "provenance": [] }, "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.13.9" }, "widgets": { "application/vnd.jupyter.widget-state+json": { "state": {}, "version_major": 2, "version_minor": 0 } } }, "nbformat": 4, "nbformat_minor": 4 }