diff --git "a/BSA (3).ipynb" "b/BSA (3).ipynb" new file mode 100644--- /dev/null +++ "b/BSA (3).ipynb" @@ -0,0 +1,4386 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "metadata": { + "id": "IHkzHMNH1wRW" + }, + "source": [ + "Downloading miniconda" + ] + }, + { + "cell_type": "code", + "source": [ + "pip install huggingface_hub" + ], + "metadata": { + "colab": { + "base_uri": "https://localhost:8080/" + }, + "id": "Lt27bHti_wfZ", + "outputId": "732c0a0f-3e6a-4908-b32e-73e644ecbc64" + }, + "execution_count": 21, + "outputs": [ + { + "output_type": "stream", + "name": "stdout", + "text": [ + "Collecting huggingface_hub\n", + " Downloading huggingface_hub-0.35.0-py3-none-any.whl.metadata (14 kB)\n", + "Collecting filelock (from huggingface_hub)\n", + " Downloading filelock-3.19.1-py3-none-any.whl.metadata (2.1 kB)\n", + "Collecting fsspec>=2023.5.0 (from huggingface_hub)\n", + " Downloading fsspec-2025.9.0-py3-none-any.whl.metadata (10 kB)\n", + "Requirement already satisfied: packaging>=20.9 in /usr/local/lib/python3.13/site-packages (from huggingface_hub) (25.0)\n", + "Collecting pyyaml>=5.1 (from huggingface_hub)\n", + " Downloading PyYAML-6.0.2-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.metadata (2.1 kB)\n", + "Requirement already satisfied: requests in /usr/local/lib/python3.13/site-packages (from huggingface_hub) (2.32.4)\n", + "Requirement already satisfied: tqdm>=4.42.1 in /usr/local/lib/python3.13/site-packages (from huggingface_hub) (4.67.1)\n", + "Requirement already satisfied: typing-extensions>=3.7.4.3 in /usr/local/lib/python3.13/site-packages (from huggingface_hub) (4.12.2)\n", + "Collecting hf-xet<2.0.0,>=1.1.3 (from huggingface_hub)\n", + " Downloading hf_xet-1.1.10-cp37-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.metadata (4.7 kB)\n", + "Requirement already satisfied: charset_normalizer<4,>=2 in /usr/local/lib/python3.13/site-packages (from requests->huggingface_hub) (3.3.2)\n", + "Requirement already satisfied: idna<4,>=2.5 in /usr/local/lib/python3.13/site-packages (from requests->huggingface_hub) (3.7)\n", + "Requirement already satisfied: urllib3<3,>=1.21.1 in /usr/local/lib/python3.13/site-packages (from requests->huggingface_hub) (2.5.0)\n", + "Requirement already satisfied: certifi>=2017.4.17 in /usr/local/lib/python3.13/site-packages (from requests->huggingface_hub) (2025.8.3)\n", + "Downloading huggingface_hub-0.35.0-py3-none-any.whl (563 kB)\n", + "\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m563.4/563.4 kB\u001b[0m \u001b[31m11.6 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n", + "\u001b[?25hDownloading hf_xet-1.1.10-cp37-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (3.2 MB)\n", + "\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m3.2/3.2 MB\u001b[0m \u001b[31m31.4 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n", + "\u001b[?25hDownloading fsspec-2025.9.0-py3-none-any.whl (199 kB)\n", + "Downloading PyYAML-6.0.2-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (759 kB)\n", + "\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m759.5/759.5 kB\u001b[0m \u001b[31m14.4 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n", + "\u001b[?25hDownloading filelock-3.19.1-py3-none-any.whl (15 kB)\n", + "Installing collected packages: pyyaml, hf-xet, fsspec, filelock, huggingface_hub\n", + "\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m5/5\u001b[0m [huggingface_hub]\n", + "\u001b[1A\u001b[2KSuccessfully installed filelock-3.19.1 fsspec-2025.9.0 hf-xet-1.1.10 huggingface_hub-0.35.0 pyyaml-6.0.2\n" + ] + } + ] + }, + { + "cell_type": "code", + "source": [ + "# Run this and follow the instructions\n", + "!huggingface-cli login" + ], + "metadata": { + "id": "ZjbEslpuynXh", + "outputId": "1846cead-5a76-4520-f785-0ce0bdad96cc", + "colab": { + "base_uri": "https://localhost:8080/" + } + }, + "execution_count": 22, + "outputs": [ + { + "output_type": "stream", + "name": "stdout", + "text": [ + "\u001b[33m⚠️ Warning: 'huggingface-cli login' is deprecated. Use 'hf auth login' instead.\u001b[0m\n", + "\n", + " _| _| _| _| _|_|_| _|_|_| _|_|_| _| _| _|_|_| _|_|_|_| _|_| _|_|_| _|_|_|_|\n", + " _| _| _| _| _| _| _| _|_| _| _| _| _| _| _| _|\n", + " _|_|_|_| _| _| _| _|_| _| _|_| _| _| _| _| _| _|_| _|_|_| _|_|_|_| _| _|_|_|\n", + " _| _| _| _| _| _| _| _| _| _| _|_| _| _| _| _| _| _| _|\n", + " _| _| _|_| _|_|_| _|_|_| _|_|_| _| _| _|_|_| _| _| _| _|_|_| _|_|_|_|\n", + "\n", + " To log in, `huggingface_hub` requires a token generated from https://huggingface.co/settings/tokens .\n", + "Enter your token (input will not be visible): \n", + "Add token as git credential? (Y/n) y\n", + "Token is valid (permission: fineGrained).\n", + "The token `QTL_seq` has been saved to /root/.cache/huggingface/stored_tokens\n", + "\u001b[1m\u001b[31mCannot authenticate through git-credential as no helper is defined on your machine.\n", + "You might have to re-authenticate when pushing to the Hugging Face Hub.\n", + "Run the following command in your terminal in case you want to set the 'store' credential helper as default.\n", + "\n", + "git config --global credential.helper store\n", + "\n", + "Read https://git-scm.com/book/en/v2/Git-Tools-Credential-Storage for more details.\u001b[0m\n", + "Token has not been saved to git credential helper.\n", + "Your token has been saved to /root/.cache/huggingface/token\n", + "Login successful.\n", + "The current active token is: `QTL_seq`\n" + ] + } + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "colab": { + "base_uri": "https://localhost:8080/" + }, + "id": "CYK9y72ex1UO", + "outputId": "53ca9d57-e72e-4c80-ed35-09c74598b928" + }, + "outputs": [ + { + "output_type": "stream", + "name": "stdout", + "text": [ + "--2025-09-18 04:17:33-- https://repo.anaconda.com/miniconda/Miniconda3-latest-Linux-x86_64.sh\n", + "Resolving repo.anaconda.com (repo.anaconda.com)... 104.16.32.241, 104.16.191.158, 2606:4700::6810:bf9e, ...\n", + "Connecting to repo.anaconda.com (repo.anaconda.com)|104.16.32.241|:443... connected.\n", + "HTTP request sent, awaiting response... 200 OK\n", + "Length: 162129736 (155M) [application/octet-stream]\n", + "Saving to: ‘Miniconda3-latest-Linux-x86_64.sh’\n", + "\n", + "Miniconda3-latest-L 100%[===================>] 154.62M 96.3MB/s in 1.6s \n", + "\n", + "2025-09-18 04:17:35 (96.3 MB/s) - ‘Miniconda3-latest-Linux-x86_64.sh’ saved [162129736/162129736]\n", + "\n", + "PREFIX=/usr/local\n", + "Unpacking bootstrapper...\n", + "Unpacking payload...\n", + "\n", + "Installing base environment...\n", + "\n", + "Preparing transaction: ...working... done\n", + "Executing transaction: ...working... done\n", + "installation finished.\n", + "WARNING:\n", + " You currently have a PYTHONPATH environment variable set. This may cause\n", + " unexpected behavior when running the Python interpreter in Miniconda3.\n", + " For best results, please verify that your PYTHONPATH only points to\n", + " directories of packages that are compatible with the Python interpreter\n", + " in Miniconda3: /usr/local\n" + ] + } + ], + "source": [ + "# Download Miniconda (fresh download to ensure no corruption)\n", + "!wget https://repo.anaconda.com/miniconda/Miniconda3-latest-Linux-x86_64.sh\n", + "\n", + "# Update existing installation\n", + "!bash Miniconda3-latest-Linux-x86_64.sh -b -u -p /usr/local" + ] + }, + { + "cell_type": "markdown", + "metadata": { + "id": "Vke8mD2N2AZ2" + }, + "source": [ + "checking path" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "colab": { + "base_uri": "https://localhost:8080/" + }, + "id": "ygg_6Hg62Bwg", + "outputId": "bdfdaf17-8091-48cb-9713-210de556b0af" + }, + "outputs": [ + { + "output_type": "stream", + "name": "stdout", + "text": [ + "/env/python\n" + ] + } + ], + "source": [ + "!echo $PYTHONPATH\n", + "\n", + "# Unset it for this session (safe; it resets on restart)\n", + "!unset PYTHONPATH" + ] + }, + { + "cell_type": "markdown", + "metadata": { + "id": "WoTLN6Ae2Dbm" + }, + "source": [ + "Initialising conda for bash" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "colab": { + "base_uri": "https://localhost:8080/" + }, + "id": "jtjd7fyQ2Hhk", + "outputId": "1fe0ceab-6660-4817-a652-a1e9856f2139" + }, + "outputs": [ + { + "output_type": "stream", + "name": "stdout", + "text": [ + "no change /usr/local/condabin/conda\n", + "no change /usr/local/bin/conda\n", + "no change /usr/local/bin/conda-env\n", + "no change /usr/local/bin/activate\n", + "no change /usr/local/bin/deactivate\n", + "no change /usr/local/etc/profile.d/conda.sh\n", + "no change /usr/local/etc/fish/conf.d/conda.fish\n", + "no change /usr/local/shell/condabin/Conda.psm1\n", + "no change /usr/local/shell/condabin/conda-hook.ps1\n", + "no change /usr/local/lib/python3.13/site-packages/xontrib/conda.xsh\n", + "no change /usr/local/etc/profile.d/conda.csh\n", + "modified /root/.bashrc\n", + "\n", + "==> For changes to take effect, close and re-open your current shell. <==\n", + "\n" + ] + } + ], + "source": [ + "# Initialize Conda for bash (adds to PATH)\n", + "!/usr/local/bin/conda init bash\n", + "\n", + "# Source the initialization script\n", + "!source /usr/local/etc/profile.d/conda.sh" + ] + }, + { + "cell_type": "markdown", + "metadata": { + "id": "JkSaxeNs2Mjl" + }, + "source": [ + "checking conda version and path" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "colab": { + "base_uri": "https://localhost:8080/" + }, + "id": "SGRsUj_F2PF6", + "outputId": "34e4bb8f-7794-4567-b03a-c846e9e46d23" + }, + "outputs": [ + { + "output_type": "stream", + "name": "stdout", + "text": [ + "conda 25.7.0\n", + "conda 25.7.0\n", + "/usr/local/bin/conda\n" + ] + } + ], + "source": [ + "!conda --version\n", + "!/usr/local/bin/conda --version\n", + "!which conda" + ] + }, + { + "cell_type": "markdown", + "metadata": { + "id": "qr5a8T2n2U2d" + }, + "source": [ + "Accepting channels" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "colab": { + "base_uri": "https://localhost:8080/" + }, + "id": "D2jC9286Q6hD", + "outputId": "085ae179-de7e-4fcd-e608-19d2c51ad945" + }, + "outputs": [ + { + "output_type": "stream", + "name": "stdout", + "text": [ + "accepted Terms of Service for \u001b[4;94mhttps://repo.anaconda.com/pkgs/main\u001b[0m\n", + "accepted Terms of Service for \u001b[4;94mhttps://repo.anaconda.com/pkgs/r\u001b[0m\n" + ] + } + ], + "source": [ + "# Accept ToS for both channels\n", + "!/usr/local/bin/conda tos accept --override-channels --channel https://repo.anaconda.com/pkgs/main\n", + "!/usr/local/bin/conda tos accept --override-channels --channel https://repo.anaconda.com/pkgs/r" + ] + }, + { + "cell_type": "markdown", + "metadata": { + "id": "BkTMEZZx2hsa" + }, + "source": [ + "Clearing misconfigured channels" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "colab": { + "base_uri": "https://localhost:8080/" + }, + "id": "GF7VYcbP2fA5", + "outputId": "f3a70d49-38ba-4399-9c0d-8183f87eabc9" + }, + "outputs": [ + { + "output_type": "stream", + "name": "stdout", + "text": [ + "\n", + "CondaKeyError: 'channels': value 'bioconda' not present in config\n", + "\n", + "\n", + "CondaKeyError: 'channels': value 'conda-forge' not present in config\n", + "\n" + ] + } + ], + "source": [ + "# Clear any misconfigured channels (optional, but ensures clean setup)\n", + "!/usr/local/bin/conda config --remove channels defaults --force\n", + "!/usr/local/bin/conda config --remove channels bioconda --force\n", + "!/usr/local/bin/conda config --remove channels conda-forge --force\n", + "\n", + "# Add channels in correct order\n", + "!/usr/local/bin/conda config --add channels defaults\n", + "!/usr/local/bin/conda config --add channels bioconda\n", + "!/usr/local/bin/conda config --add channels conda-forge" + ] + }, + { + "cell_type": "markdown", + "metadata": { + "id": "Bc0AEFHv2uvB" + }, + "source": [ + "Showing channels" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "colab": { + "base_uri": "https://localhost:8080/" + }, + "id": "ni9kLqlk2wP5", + "outputId": "8bafbc0d-348f-4b0a-9d0b-edc8687498cc" + }, + "outputs": [ + { + "output_type": "stream", + "name": "stdout", + "text": [ + "channels:\n", + " - conda-forge\n", + " - bioconda\n", + " - defaults\n" + ] + } + ], + "source": [ + "!/usr/local/bin/conda config --show channels" + ] + }, + { + "cell_type": "markdown", + "metadata": { + "id": "O3bqXlgz2yxk" + }, + "source": [ + "Avoiding conflicts" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "colab": { + "base_uri": "https://localhost:8080/" + }, + "id": "0U8xhHvw21mI", + "outputId": "bafc37c1-492a-4700-d9be-55db7f74e46a" + }, + "outputs": [ + { + "output_type": "stream", + "name": "stdout", + "text": [ + "\u001b[1;33mJupyter detected\u001b[0m\u001b[1;33m...\u001b[0m\n", + "\u001b[1;32m2\u001b[0m\u001b[1;32m channel Terms of Service accepted\u001b[0m\n", + "Retrieving notices: - \b\b\\ \b\b| \b\bdone\n", + "Channels:\n", + " - bioconda\n", + " - conda-forge\n", + " - defaults\n", + "Platform: linux-64\n", + "Collecting package metadata (repodata.json): - \b\b\\ \b\b| \b\b/ \b\b- \b\b\\ \b\b| \b\b/ \b\b- \b\b\\ \b\b| \b\b/ \b\b- \b\b\\ \b\b| \b\b/ \b\b- \b\b\\ \b\b| \b\b/ \b\b- \b\b\\ \b\b| \b\b/ \b\b- \b\b\\ \b\b| \b\b/ \b\b- \b\b\\ \b\b| \b\b/ \b\b- \b\b\\ \b\b| \b\b/ \b\b- \b\b\\ \b\b| \b\b/ \b\b- \b\b\\ \b\b| \b\b/ \b\b- \b\b\\ \b\b| \b\b/ \b\b- \b\b\\ \b\b| \b\b/ \b\b- \b\b\\ \b\b| \b\b/ \b\b- \b\b\\ \b\b| \b\b/ \b\b- \b\b\\ \b\b| \b\b/ \b\b- \b\b\\ \b\b| \b\b/ \b\b- \b\b\\ \b\b| \b\b/ \b\b- \b\b\\ \b\b| \b\b/ \b\b- \b\b\\ \b\b| \b\b/ \b\b- \b\b\\ \b\b| \b\bdone\n", + "Solving environment: - \b\bdone\n", + "\n", + "## Package Plan ##\n", + "\n", + " environment location: /usr/local/envs/qtlseq\n", + "\n", + " added / updated specs:\n", + " - qtlseq\n", + "\n", + "\n", + "The following packages will be downloaded:\n", + "\n", + " package | build\n", + " ---------------------------|-----------------\n", + " _libgcc_mutex-0.1 | conda_forge 3 KB conda-forge\n", + " _openmp_mutex-4.5 | 2_gnu 23 KB conda-forge\n", + " alsa-lib-1.2.14 | hb9d3cd8_0 553 KB conda-forge\n", + " bcftools-1.22 | h3a4d415_1 1.0 MB bioconda\n", + " brotli-1.1.0 | hb03c661_4 19 KB conda-forge\n", + " brotli-bin-1.1.0 | hb03c661_4 19 KB conda-forge\n", + " bwa-0.7.19 | h577a1d6_1 639 KB bioconda\n", + " bzip2-1.0.8 | hda65f42_8 254 KB conda-forge\n", + " c-ares-1.34.5 | hb9d3cd8_0 202 KB conda-forge\n", + " ca-certificates-2025.8.3 | hbd8a1cb_0 151 KB conda-forge\n", + " cairo-1.18.4 | h3394656_0 955 KB conda-forge\n", + " contourpy-1.3.3 | py313h7037e92_2 290 KB conda-forge\n", + " cycler-0.12.1 | pyhd8ed1ab_1 13 KB conda-forge\n", + " font-ttf-dejavu-sans-mono-2.37| hab24e00_0 388 KB conda-forge\n", + " font-ttf-inconsolata-3.000 | h77eed37_0 94 KB conda-forge\n", + " font-ttf-source-code-pro-2.038| h77eed37_0 684 KB conda-forge\n", + " font-ttf-ubuntu-0.83 | h77eed37_3 1.5 MB conda-forge\n", + " fontconfig-2.15.0 | h7e30c49_1 259 KB conda-forge\n", + " fonts-conda-ecosystem-1 | 0 4 KB conda-forge\n", + " fonts-conda-forge-1 | 0 4 KB conda-forge\n", + " fonttools-4.60.0 | py313h3dea7bd_0 2.8 MB conda-forge\n", + " freetype-2.14.1 | ha770c72_0 169 KB conda-forge\n", + " giflib-5.2.2 | hd590300_0 75 KB conda-forge\n", + " graphite2-1.3.14 | hecca717_2 97 KB conda-forge\n", + " gsl-2.7 | he838d99_0 3.2 MB conda-forge\n", + " harfbuzz-11.5.0 | h15599e2_0 2.0 MB conda-forge\n", + " htslib-1.22.1 | h566b1c6_0 3.1 MB bioconda\n", + " icu-75.1 | he02047a_0 11.6 MB conda-forge\n", + " keyutils-1.6.3 | hb9d3cd8_0 131 KB conda-forge\n", + " kiwisolver-1.4.9 | py313hc8edb43_1 75 KB conda-forge\n", + " krb5-1.21.3 | h659f571_0 1.3 MB conda-forge\n", + " lcms2-2.17 | h717163a_0 242 KB conda-forge\n", + " ld_impl_linux-64-2.44 | h1423503_1 660 KB conda-forge\n", + " lerc-4.0.0 | h0aef613_1 258 KB conda-forge\n", + " libblas-3.9.0 |35_h4a7cf45_openblas 17 KB conda-forge\n", + " libbrotlicommon-1.1.0 | hb03c661_4 68 KB conda-forge\n", + " libbrotlidec-1.1.0 | hb03c661_4 33 KB conda-forge\n", + " libbrotlienc-1.1.0 | hb03c661_4 283 KB conda-forge\n", + " libcblas-3.9.0 |35_h0358290_openblas 17 KB conda-forge\n", + " libcups-2.3.3 | hb8b1518_5 4.3 MB conda-forge\n", + " libcurl-8.14.1 | h332b0f4_0 439 KB conda-forge\n", + " libdeflate-1.24 | h86f0d12_0 71 KB conda-forge\n", + " libedit-3.1.20250104 | pl5321h7949ede_0 132 KB conda-forge\n", + " libev-4.33 | hd590300_2 110 KB conda-forge\n", + " libexpat-2.7.1 | hecca717_0 73 KB conda-forge\n", + " libffi-3.4.6 | h2dba641_1 56 KB conda-forge\n", + " libfreetype-2.14.1 | ha770c72_0 7 KB conda-forge\n", + " libfreetype6-2.14.1 | h73754d4_0 378 KB conda-forge\n", + " libgcc-15.1.0 | h767d61c_5 805 KB conda-forge\n", + " libgcc-ng-15.1.0 | h69a702a_5 29 KB conda-forge\n", + " libgfortran-15.1.0 | h69a702a_5 28 KB conda-forge\n", + " libgfortran5-15.1.0 | hcea5267_5 1.5 MB conda-forge\n", + " libglib-2.86.0 | h1fed272_0 3.8 MB conda-forge\n", + " libgomp-15.1.0 | h767d61c_5 437 KB conda-forge\n", + " libiconv-1.18 | h3b78370_2 772 KB conda-forge\n", + " libjpeg-turbo-3.1.0 | hb9d3cd8_0 614 KB conda-forge\n", + " liblapack-3.9.0 |35_h47877c9_openblas 17 KB conda-forge\n", + " liblzma-5.8.1 | hb9d3cd8_2 110 KB conda-forge\n", + " libmpdec-4.0.0 | hb9d3cd8_0 89 KB conda-forge\n", + " libnghttp2-1.67.0 | had1ee68_0 651 KB conda-forge\n", + " libopenblas-0.3.30 |pthreads_h94d23a6_2 5.7 MB conda-forge\n", + " libpng-1.6.50 | h421ea60_1 310 KB conda-forge\n", + " libsqlite-3.50.4 | h0c1763c_0 911 KB conda-forge\n", + " libssh2-1.11.1 | hcf80075_0 298 KB conda-forge\n", + " libstdcxx-15.1.0 | h8f9b012_5 3.7 MB conda-forge\n", + " libstdcxx-ng-15.1.0 | h4852527_5 29 KB conda-forge\n", + " libtiff-4.7.0 | h8261f1e_6 423 KB conda-forge\n", + " libuuid-2.41.1 | he9a06e4_0 36 KB conda-forge\n", + " libwebp-base-1.6.0 | hd42ef1d_0 419 KB conda-forge\n", + " libxcb-1.17.0 | h8a09558_0 387 KB conda-forge\n", + " libxcrypt-4.4.36 | hd590300_1 98 KB conda-forge\n", + " libzlib-1.3.1 | hb9d3cd8_2 60 KB conda-forge\n", + " matplotlib-base-3.10.6 | py313h683a580_1 8.1 MB conda-forge\n", + " munkres-1.0.7 | py_1 10 KB bioconda\n", + " ncurses-6.5 | h2d0b736_3 871 KB conda-forge\n", + " numpy-2.3.3 | py313hf6604e3_0 8.5 MB conda-forge\n", + " openjdk-24.0.2 | h5755bd7_0 111.0 MB conda-forge\n", + " openjpeg-2.5.3 | h55fea9a_1 349 KB conda-forge\n", + " openssl-3.5.3 | h26f9b46_0 3.0 MB conda-forge\n", + " packaging-25.0 | pyh29332c3_1 61 KB conda-forge\n", + " pandas-2.3.2 | py313h08cd8bf_0 14.4 MB conda-forge\n", + " pcre2-10.46 | h1321c63_0 1.2 MB conda-forge\n", + " perl-5.32.1 | 7_hd590300_perl5 12.7 MB conda-forge\n", + " pillow-11.3.0 | py313hf46931b_2 965 KB conda-forge\n", + " pip-25.2 | pyh145f28c_0 1.1 MB conda-forge\n", + " pixman-0.46.4 | h54a6638_1 440 KB conda-forge\n", + " pthread-stubs-0.4 | hb9d3cd8_1002 8 KB conda-forge\n", + " pyparsing-3.2.4 | pyhcf101f3_0 102 KB conda-forge\n", + " python-3.13.7 |h2b335a9_100_cp313 32.0 MB conda-forge\n", + " python-dateutil-2.9.0.post0| pyhe01879c_2 228 KB conda-forge\n", + " python-tzdata-2025.2 | pyhd8ed1ab_0 141 KB conda-forge\n", + " python_abi-3.13 | 8_cp313 7 KB conda-forge\n", + " pytz-2025.2 | pyhd8ed1ab_0 185 KB conda-forge\n", + " qhull-2020.2 | h434a139_5 540 KB conda-forge\n", + " qtlseq-2.2.9 | pyhdfd78af_0 34 KB bioconda\n", + " readline-8.2 | h8c095d6_2 276 KB conda-forge\n", + " samtools-1.22.1 | h96c455f_0 488 KB bioconda\n", + " scipy-1.16.2 | py313h11c21cd_0 16.2 MB conda-forge\n", + " seaborn-base-0.13.2 | pyhd8ed1ab_3 223 KB conda-forge\n", + " six-1.17.0 | pyhe01879c_1 18 KB conda-forge\n", + " snpeff-5.2 | hdfd78af_1 26.7 MB bioconda\n", + " tk-8.6.13 |noxft_hd72426e_102 3.1 MB conda-forge\n", + " trimmomatic-0.40 | hdfd78af_0 193 KB bioconda\n", + " tzdata-2025b | h78e105d_0 120 KB conda-forge\n", + " xorg-libice-1.1.2 | hb9d3cd8_0 57 KB conda-forge\n", + " xorg-libsm-1.2.6 | he73a12e_0 27 KB conda-forge\n", + " xorg-libx11-1.8.12 | h4f16b4b_0 816 KB conda-forge\n", + " xorg-libxau-1.0.12 | hb9d3cd8_0 14 KB conda-forge\n", + " xorg-libxdmcp-1.1.5 | hb9d3cd8_0 19 KB conda-forge\n", + " xorg-libxext-1.3.6 | hb9d3cd8_0 49 KB conda-forge\n", + " xorg-libxfixes-6.0.1 | hb9d3cd8_0 19 KB conda-forge\n", + " xorg-libxi-1.8.2 | hb9d3cd8_0 46 KB conda-forge\n", + " xorg-libxrandr-1.5.4 | hb9d3cd8_0 29 KB conda-forge\n", + " xorg-libxrender-0.9.12 | hb9d3cd8_0 32 KB conda-forge\n", + " xorg-libxt-1.3.1 | hb9d3cd8_0 371 KB conda-forge\n", + " xorg-libxtst-1.2.5 | hb9d3cd8_3 32 KB conda-forge\n", + " zlib-1.3.1 | hb9d3cd8_2 90 KB conda-forge\n", + " zstd-1.5.7 | hb8e6e7a_2 554 KB conda-forge\n", + " ------------------------------------------------------------\n", + " Total: 304.9 MB\n", + "\n", + "The following NEW packages will be INSTALLED:\n", + "\n", + " _libgcc_mutex conda-forge/linux-64::_libgcc_mutex-0.1-conda_forge \n", + " _openmp_mutex conda-forge/linux-64::_openmp_mutex-4.5-2_gnu \n", + " alsa-lib conda-forge/linux-64::alsa-lib-1.2.14-hb9d3cd8_0 \n", + " bcftools bioconda/linux-64::bcftools-1.22-h3a4d415_1 \n", + " brotli conda-forge/linux-64::brotli-1.1.0-hb03c661_4 \n", + " brotli-bin conda-forge/linux-64::brotli-bin-1.1.0-hb03c661_4 \n", + " bwa bioconda/linux-64::bwa-0.7.19-h577a1d6_1 \n", + " bzip2 conda-forge/linux-64::bzip2-1.0.8-hda65f42_8 \n", + " c-ares conda-forge/linux-64::c-ares-1.34.5-hb9d3cd8_0 \n", + " ca-certificates conda-forge/noarch::ca-certificates-2025.8.3-hbd8a1cb_0 \n", + " cairo conda-forge/linux-64::cairo-1.18.4-h3394656_0 \n", + " contourpy conda-forge/linux-64::contourpy-1.3.3-py313h7037e92_2 \n", + " cycler conda-forge/noarch::cycler-0.12.1-pyhd8ed1ab_1 \n", + " font-ttf-dejavu-s~ conda-forge/noarch::font-ttf-dejavu-sans-mono-2.37-hab24e00_0 \n", + " font-ttf-inconsol~ conda-forge/noarch::font-ttf-inconsolata-3.000-h77eed37_0 \n", + " font-ttf-source-c~ conda-forge/noarch::font-ttf-source-code-pro-2.038-h77eed37_0 \n", + " font-ttf-ubuntu conda-forge/noarch::font-ttf-ubuntu-0.83-h77eed37_3 \n", + " fontconfig conda-forge/linux-64::fontconfig-2.15.0-h7e30c49_1 \n", + " fonts-conda-ecosy~ conda-forge/noarch::fonts-conda-ecosystem-1-0 \n", + " fonts-conda-forge conda-forge/noarch::fonts-conda-forge-1-0 \n", + " fonttools conda-forge/linux-64::fonttools-4.60.0-py313h3dea7bd_0 \n", + " freetype conda-forge/linux-64::freetype-2.14.1-ha770c72_0 \n", + " giflib conda-forge/linux-64::giflib-5.2.2-hd590300_0 \n", + " graphite2 conda-forge/linux-64::graphite2-1.3.14-hecca717_2 \n", + " gsl conda-forge/linux-64::gsl-2.7-he838d99_0 \n", + " harfbuzz conda-forge/linux-64::harfbuzz-11.5.0-h15599e2_0 \n", + " htslib bioconda/linux-64::htslib-1.22.1-h566b1c6_0 \n", + " icu conda-forge/linux-64::icu-75.1-he02047a_0 \n", + " keyutils conda-forge/linux-64::keyutils-1.6.3-hb9d3cd8_0 \n", + " kiwisolver conda-forge/linux-64::kiwisolver-1.4.9-py313hc8edb43_1 \n", + " krb5 conda-forge/linux-64::krb5-1.21.3-h659f571_0 \n", + " lcms2 conda-forge/linux-64::lcms2-2.17-h717163a_0 \n", + " ld_impl_linux-64 conda-forge/linux-64::ld_impl_linux-64-2.44-h1423503_1 \n", + " lerc conda-forge/linux-64::lerc-4.0.0-h0aef613_1 \n", + " libblas conda-forge/linux-64::libblas-3.9.0-35_h4a7cf45_openblas \n", + " libbrotlicommon conda-forge/linux-64::libbrotlicommon-1.1.0-hb03c661_4 \n", + " libbrotlidec conda-forge/linux-64::libbrotlidec-1.1.0-hb03c661_4 \n", + " libbrotlienc conda-forge/linux-64::libbrotlienc-1.1.0-hb03c661_4 \n", + " libcblas conda-forge/linux-64::libcblas-3.9.0-35_h0358290_openblas \n", + " libcups conda-forge/linux-64::libcups-2.3.3-hb8b1518_5 \n", + " libcurl conda-forge/linux-64::libcurl-8.14.1-h332b0f4_0 \n", + " libdeflate conda-forge/linux-64::libdeflate-1.24-h86f0d12_0 \n", + " libedit conda-forge/linux-64::libedit-3.1.20250104-pl5321h7949ede_0 \n", + " libev conda-forge/linux-64::libev-4.33-hd590300_2 \n", + " libexpat conda-forge/linux-64::libexpat-2.7.1-hecca717_0 \n", + " libffi conda-forge/linux-64::libffi-3.4.6-h2dba641_1 \n", + " libfreetype conda-forge/linux-64::libfreetype-2.14.1-ha770c72_0 \n", + " libfreetype6 conda-forge/linux-64::libfreetype6-2.14.1-h73754d4_0 \n", + " libgcc conda-forge/linux-64::libgcc-15.1.0-h767d61c_5 \n", + " libgcc-ng conda-forge/linux-64::libgcc-ng-15.1.0-h69a702a_5 \n", + " libgfortran conda-forge/linux-64::libgfortran-15.1.0-h69a702a_5 \n", + " libgfortran5 conda-forge/linux-64::libgfortran5-15.1.0-hcea5267_5 \n", + " libglib conda-forge/linux-64::libglib-2.86.0-h1fed272_0 \n", + " libgomp conda-forge/linux-64::libgomp-15.1.0-h767d61c_5 \n", + " libiconv conda-forge/linux-64::libiconv-1.18-h3b78370_2 \n", + " libjpeg-turbo conda-forge/linux-64::libjpeg-turbo-3.1.0-hb9d3cd8_0 \n", + " liblapack conda-forge/linux-64::liblapack-3.9.0-35_h47877c9_openblas \n", + " liblzma conda-forge/linux-64::liblzma-5.8.1-hb9d3cd8_2 \n", + " libmpdec conda-forge/linux-64::libmpdec-4.0.0-hb9d3cd8_0 \n", + " libnghttp2 conda-forge/linux-64::libnghttp2-1.67.0-had1ee68_0 \n", + " libopenblas conda-forge/linux-64::libopenblas-0.3.30-pthreads_h94d23a6_2 \n", + " libpng conda-forge/linux-64::libpng-1.6.50-h421ea60_1 \n", + " libsqlite conda-forge/linux-64::libsqlite-3.50.4-h0c1763c_0 \n", + " libssh2 conda-forge/linux-64::libssh2-1.11.1-hcf80075_0 \n", + " libstdcxx conda-forge/linux-64::libstdcxx-15.1.0-h8f9b012_5 \n", + " libstdcxx-ng conda-forge/linux-64::libstdcxx-ng-15.1.0-h4852527_5 \n", + " libtiff conda-forge/linux-64::libtiff-4.7.0-h8261f1e_6 \n", + " libuuid conda-forge/linux-64::libuuid-2.41.1-he9a06e4_0 \n", + " libwebp-base conda-forge/linux-64::libwebp-base-1.6.0-hd42ef1d_0 \n", + " libxcb conda-forge/linux-64::libxcb-1.17.0-h8a09558_0 \n", + " libxcrypt conda-forge/linux-64::libxcrypt-4.4.36-hd590300_1 \n", + " libzlib conda-forge/linux-64::libzlib-1.3.1-hb9d3cd8_2 \n", + " matplotlib-base conda-forge/linux-64::matplotlib-base-3.10.6-py313h683a580_1 \n", + " munkres bioconda/noarch::munkres-1.0.7-py_1 \n", + " ncurses conda-forge/linux-64::ncurses-6.5-h2d0b736_3 \n", + " numpy conda-forge/linux-64::numpy-2.3.3-py313hf6604e3_0 \n", + " openjdk conda-forge/linux-64::openjdk-24.0.2-h5755bd7_0 \n", + " openjpeg conda-forge/linux-64::openjpeg-2.5.3-h55fea9a_1 \n", + " openssl conda-forge/linux-64::openssl-3.5.3-h26f9b46_0 \n", + " packaging conda-forge/noarch::packaging-25.0-pyh29332c3_1 \n", + " pandas conda-forge/linux-64::pandas-2.3.2-py313h08cd8bf_0 \n", + " pcre2 conda-forge/linux-64::pcre2-10.46-h1321c63_0 \n", + " perl conda-forge/linux-64::perl-5.32.1-7_hd590300_perl5 \n", + " pillow conda-forge/linux-64::pillow-11.3.0-py313hf46931b_2 \n", + " pip conda-forge/noarch::pip-25.2-pyh145f28c_0 \n", + " pixman conda-forge/linux-64::pixman-0.46.4-h54a6638_1 \n", + " pthread-stubs conda-forge/linux-64::pthread-stubs-0.4-hb9d3cd8_1002 \n", + " pyparsing conda-forge/noarch::pyparsing-3.2.4-pyhcf101f3_0 \n", + " python conda-forge/linux-64::python-3.13.7-h2b335a9_100_cp313 \n", + " python-dateutil conda-forge/noarch::python-dateutil-2.9.0.post0-pyhe01879c_2 \n", + " python-tzdata conda-forge/noarch::python-tzdata-2025.2-pyhd8ed1ab_0 \n", + " python_abi conda-forge/noarch::python_abi-3.13-8_cp313 \n", + " pytz conda-forge/noarch::pytz-2025.2-pyhd8ed1ab_0 \n", + " qhull conda-forge/linux-64::qhull-2020.2-h434a139_5 \n", + " qtlseq bioconda/noarch::qtlseq-2.2.9-pyhdfd78af_0 \n", + " readline conda-forge/linux-64::readline-8.2-h8c095d6_2 \n", + " samtools bioconda/linux-64::samtools-1.22.1-h96c455f_0 \n", + " scipy conda-forge/linux-64::scipy-1.16.2-py313h11c21cd_0 \n", + " seaborn-base conda-forge/noarch::seaborn-base-0.13.2-pyhd8ed1ab_3 \n", + " six conda-forge/noarch::six-1.17.0-pyhe01879c_1 \n", + " snpeff bioconda/noarch::snpeff-5.2-hdfd78af_1 \n", + " tk conda-forge/linux-64::tk-8.6.13-noxft_hd72426e_102 \n", + " trimmomatic bioconda/noarch::trimmomatic-0.40-hdfd78af_0 \n", + " tzdata conda-forge/noarch::tzdata-2025b-h78e105d_0 \n", + " xorg-libice conda-forge/linux-64::xorg-libice-1.1.2-hb9d3cd8_0 \n", + " xorg-libsm conda-forge/linux-64::xorg-libsm-1.2.6-he73a12e_0 \n", + " xorg-libx11 conda-forge/linux-64::xorg-libx11-1.8.12-h4f16b4b_0 \n", + " xorg-libxau conda-forge/linux-64::xorg-libxau-1.0.12-hb9d3cd8_0 \n", + " xorg-libxdmcp conda-forge/linux-64::xorg-libxdmcp-1.1.5-hb9d3cd8_0 \n", + " xorg-libxext conda-forge/linux-64::xorg-libxext-1.3.6-hb9d3cd8_0 \n", + " xorg-libxfixes conda-forge/linux-64::xorg-libxfixes-6.0.1-hb9d3cd8_0 \n", + " xorg-libxi conda-forge/linux-64::xorg-libxi-1.8.2-hb9d3cd8_0 \n", + " xorg-libxrandr conda-forge/linux-64::xorg-libxrandr-1.5.4-hb9d3cd8_0 \n", + " xorg-libxrender conda-forge/linux-64::xorg-libxrender-0.9.12-hb9d3cd8_0 \n", + " xorg-libxt conda-forge/linux-64::xorg-libxt-1.3.1-hb9d3cd8_0 \n", + " xorg-libxtst conda-forge/linux-64::xorg-libxtst-1.2.5-hb9d3cd8_3 \n", + " zlib conda-forge/linux-64::zlib-1.3.1-hb9d3cd8_2 \n", + " zstd conda-forge/linux-64::zstd-1.5.7-hb8e6e7a_2 \n", + "\n", + "\n", + "\n", + "Downloading and Extracting Packages:\n", + "openjdk-24.0.2 | 111.0 MB | : 0% 0/1 [00:00 -p -b1 \n", + " -b2 -n1 -n2 -o \n", + " [-F ] [-T] [-e ]\n", + "\n", + "QTL-seq version 2.2.9\n", + "\n", + "options:\n", + " -h, --help show this help message and exit\n", + " -r, --ref Reference FASTA file.\n", + " -p, --parent FASTQ or BAM file of the parent. If specifying\n", + " FASTQ, separate paired-end files with a comma,\n", + " e.g., -p fastq1,fastq2. This option can be\n", + " used multiple times.\n", + " -b1, --bulk1 FASTQ or BAM file of bulk 1. If specifying\n", + " FASTQ, separate paired-end files with a comma,\n", + " e.g., -b1 fastq1,fastq2. This option can be\n", + " used multiple times.\n", + " -b2, --bulk2 FASTQ or BAM file of bulk 2. If specifying\n", + " FASTQ, separate paired-end files with a comma,\n", + " e.g., -b2 fastq1,fastq2. This option can be\n", + " used multiple times.\n", + " -n1, --N-bulk1 Number of individuals in bulk 1.\n", + " -n2, --N-bulk2 Number of individuals in bulk 2.\n", + " -o, --out Output directory. The specified directory must not\n", + " already exist.\n", + " -F, --filial Filial generation. This parameter must be greater\n", + " than 1. [2]\n", + " -t, --threads Number of threads. If a value less than 1 is specified,\n", + " QTL-seq will use the maximum available threads. [2]\n", + " -w, --window Window size in kilobases (kb). [2000]\n", + " -s, --step Step size in kilobases (kb). [100]\n", + " -D, --max-depth Maximum depth of variants to be used. [250]\n", + " -d, --min-depth Minimum depth of variants to be used. [8]\n", + " -N, --N-rep Number of replicates for simulations to generate\n", + " null distribution. [5000]\n", + " -T, --trim Trim FASTQ files using Trimmomatic.\n", + " -a, --adapter FASTA file containing adapter sequences. This option\n", + " is used when \"-T\" is specified for trimming.\n", + " --trim-params Parameters for Trimmomatic. Input parameters\n", + " must be comma-separated in the following order:\n", + " Phred score, ILLUMINACLIP, LEADING, TRAILING,\n", + " SLIDINGWINDOW, MINLEN. To remove Illumina adapters,\n", + " specify the adapter FASTA file with \"--adapter\".\n", + " If not specified, adapter trimming will be skipped.\n", + " [33,:2:30:10,20,20,4:15,75]\n", + " -e, --snpEff Predict causal variants using SnpEff. Check\n", + " available databases in SnpEff.\n", + " --line-colors Colors for threshold lines in plots. Specify a\n", + " comma-separated list in the order of SNP-index,\n", + " p95, and p99. [\"#C3310F,#009E72,#FDB003\"]\n", + " --dot-colors Colors for dots in plots. Specify a\n", + " comma-separated list in the order of bulk1,\n", + " bulk2, and delta. [\"#74D3AE,#FFBE0B,#B3B8DD\"]\n", + " --mem Maximum memory per thread when sorting BAM files;\n", + " suffixes K/M/G are recognized. [1G]\n", + " -q, --min-MQ Minimum mapping quality for mpileup. [40]\n", + " -Q, --min-BQ Minimum base quality for mpileup. [18]\n", + " -C, --adjust-MQ Adjust the mapping quality for mpileup. The default\n", + " setting is optimized for BWA. [50]\n", + " -v, --version show program's version number and exit\n", + "\n" + ] + } + ], + "source": [ + "!/usr/local/bin/conda run -n qtlseq qtlseq -h\n", + "# Repeat for others" + ] + }, + { + "cell_type": "markdown", + "metadata": { + "id": "fIfrHLvt3fL_" + }, + "source": [ + "Installing java" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "colab": { + "base_uri": "https://localhost:8080/" + }, + "id": "UxCljZq7T4a1", + "outputId": "76ccc833-959b-44cb-9df5-491a41c2d84f" + }, + "outputs": [ + { + "output_type": "stream", + "name": "stdout", + "text": [ + "\u001b[1;33mJupyter detected\u001b[0m\u001b[1;33m...\u001b[0m\n", + "\u001b[1;32m2\u001b[0m\u001b[1;32m channel Terms of Service accepted\u001b[0m\n", + "Channels:\n", + " - conda-forge\n", + " - bioconda\n", + " - defaults\n", + "Platform: linux-64\n", + "Collecting package metadata (repodata.json): - \b\b\\ \b\b| \b\b/ \b\b- \b\b\\ \b\b| \b\b/ \b\b- \b\b\\ \b\b| \b\b/ \b\b- \b\b\\ \b\b| \b\b/ \b\b- \b\b\\ \b\b| \b\b/ \b\bdone\n", + "Solving environment: \\ \b\b| \b\bdone\n", + "\n", + "# All requested packages already installed.\n", + "\n", + "\n", + "CondaError: Run 'conda init' before 'conda activate'\n", + "\n", + "/bin/bash: line 1: snpEff: command not found\n", + "/bin/bash: line 1: trimmomatic: command not found\n", + "/bin/bash: line 1: bwa: command not found\n" + ] + } + ], + "source": [ + "# Install Java for snpEff/trimmomatic\n", + "!/usr/local/bin/conda install -n qtlseq -c conda-forge openjdk -y\n", + "\n", + "# Re-test (using direct activation)\n", + "!source /usr/local/etc/profile.d/conda.sh\n", + "!conda activate qtlseq\n", + "!snpEff --help | head -5\n", + "!trimmomatic --help | head -5\n", + "!bwa | head -5" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "colab": { + "base_uri": "https://localhost:8080/" + }, + "id": "CrxdmnOQVFc_", + "outputId": "2ce302b6-bfa4-4c7d-d406-338b0c69e395" + }, + "outputs": [ + { + "output_type": "stream", + "name": "stdout", + "text": [ + "\u001b[1;33mJupyter detected\u001b[0m\u001b[1;33m...\u001b[0m\n", + "\u001b[1;32m2\u001b[0m\u001b[1;32m channel Terms of Service accepted\u001b[0m\n", + "Channels:\n", + " - conda-forge\n", + " - bioconda\n", + " - defaults\n", + "Platform: linux-64\n", + "Collecting package metadata (repodata.json): - \b\b\\ \b\b| \b\b/ \b\b- \b\b\\ \b\b| \b\b/ \b\b- \b\b\\ \b\bdone\n", + "Solving environment: / \b\b- \b\bdone\n", + "\n", + "# All requested packages already installed.\n", + "\n", + "usage: qtlseq -r -p -b1 \n", + " -b2 -n1 -n2 -o \n", + " [-F ] [-T] [-e ]\n", + "\n", + "QTL-seq version 2.2.9\n", + "\n", + "options:\n", + " -h, --help show this help message and exit\n", + " -r, --ref Reference FASTA file.\n", + " -p, --parent FASTQ or BAM file of the parent. If specifying\n", + " FASTQ, separate paired-end files with a comma,\n", + " e.g., -p fastq1,fastq2. This option can be\n", + " used multiple times.\n", + " -b1, --bulk1 FASTQ or BAM file of bulk 1. If specifying\n", + " FASTQ, separate paired-end files with a comma,\n", + " e.g., -b1 fastq1,fastq2. This option can be\n", + " used multiple times.\n", + " -b2, --bulk2 FASTQ or BAM file of bulk 2. If specifying\n", + " FASTQ, separate paired-end files with a comma,\n", + " e.g., -b2 fastq1,fastq2. This option can be\n", + " used multiple times.\n", + " -n1, --N-bulk1 Number of individuals in bulk 1.\n", + " -n2, --N-bulk2 Number of individuals in bulk 2.\n", + " -o, --out Output directory. The specified directory must not\n", + " already exist.\n", + " -F, --filial Filial generation. This parameter must be greater\n", + " than 1. [2]\n", + " -t, --threads Number of threads. If a value less than 1 is specified,\n", + " QTL-seq will use the maximum available threads. [2]\n", + " -w, --window Window size in kilobases (kb). [2000]\n", + " -s, --step Step size in kilobases (kb). [100]\n", + " -D, --max-depth Maximum depth of variants to be used. [250]\n", + " -d, --min-depth Minimum depth of variants to be used. [8]\n", + " -N, --N-rep Number of replicates for simulations to generate\n", + " null distribution. [5000]\n", + " -T, --trim Trim FASTQ files using Trimmomatic.\n", + " -a, --adapter FASTA file containing adapter sequences. This option\n", + " is used when \"-T\" is specified for trimming.\n", + " --trim-params Parameters for Trimmomatic. Input parameters\n", + " must be comma-separated in the following order:\n", + " Phred score, ILLUMINACLIP, LEADING, TRAILING,\n", + " SLIDINGWINDOW, MINLEN. To remove Illumina adapters,\n", + " specify the adapter FASTA file with \"--adapter\".\n", + " If not specified, adapter trimming will be skipped.\n", + " [33,:2:30:10,20,20,4:15,75]\n", + " -e, --snpEff Predict causal variants using SnpEff. Check\n", + " available databases in SnpEff.\n", + " --line-colors Colors for threshold lines in plots. Specify a\n", + " comma-separated list in the order of SNP-index,\n", + " p95, and p99. [\"#C3310F,#009E72,#FDB003\"]\n", + " --dot-colors Colors for dots in plots. Specify a\n", + " comma-separated list in the order of bulk1,\n", + " bulk2, and delta. [\"#74D3AE,#FFBE0B,#B3B8DD\"]\n", + " --mem Maximum memory per thread when sorting BAM files;\n", + " suffixes K/M/G are recognized. [1G]\n", + " -q, --min-MQ Minimum mapping quality for mpileup. [40]\n", + " -Q, --min-BQ Minimum base quality for mpileup. [18]\n", + " -C, --adjust-MQ Adjust the mapping quality for mpileup. The default\n", + " setting is optimized for BWA. [50]\n", + " -v, --version show program's version number and exit\n", + "\n", + "Error :\tUnknown option '--help'\n", + "Command line :\tSnpEff --help \n", + "\n", + "snpEff version SnpEff 5.2 (build 2023-09-29 06:17), by Pablo Cingolani\n", + "Usage: snpEff [eff] [options] genome_version [input_file]\n", + "\n", + "\n", + "\tvariants_file : Default is STDIN\n", + "\n", + "\n", + "\n", + "Options:\n", + "\t-chr : Prepend 'string' to chromosome name (e.g. 'chr1' instead of '1'). Only on TXT output.\n", + "\t-classic : Use old style annotations instead of Sequence Ontology and Hgvs.\n", + "\t-csvStats : Create CSV summary file.\n", + "\t-download : Download reference genome if not available. Default: true\n", + "\t-i : Input format [ vcf, bed ]. Default: VCF.\n", + "\t-fileList : Input actually contains a list of files to process.\n", + "\t-o : Ouput format [ vcf, gatk, bed, bedAnn ]. Default: VCF.\n", + "\t-s , -stats, -htmlStats : Create HTML summary file. Default is 'snpEff_summary.html'\n", + "\t-noStats : Do not create stats (summary) file\n", + "\n", + "Results filter options:\n", + "\t-fi , -filterInterval : Only analyze changes that intersect with the intervals specified in this file (you may use this option many times)\n", + "\t-no-downstream : Do not show DOWNSTREAM changes\n", + "\t-no-intergenic : Do not show INTERGENIC changes\n", + "\t-no-intron : Do not show INTRON changes\n", + "\t-no-upstream : Do not show UPSTREAM changes\n", + "\t-no-utr : Do not show 5_PRIME_UTR or 3_PRIME_UTR changes\n", + "\t-no : Do not show 'EffectType'. This option can be used several times.\n", + "\n", + "Annotations options:\n", + "\t-cancer : Perform 'cancer' comparisons (Somatic vs Germline). Default: false\n", + "\t-cancerSamples : Two column TXT file defining 'oringinal \\t derived' samples.\n", + "\t-fastaProt : Create an output file containing the resulting protein sequences.\n", + "\t-formatEff : Use 'EFF' field compatible with older versions (instead of 'ANN').\n", + "\t-geneId : Use gene ID instead of gene name (VCF output). Default: false\n", + "\t-hgvs : Use HGVS annotations for amino acid sub-field. Default: true\n", + "\t-hgvsOld : Use old HGVS notation. Default: false\n", + "\t-hgvs1LetterAa : Use one letter Amino acid codes in HGVS notation. Default: false\n", + "\t-hgvsTrId : Use transcript ID in HGVS notation. Default: false\n", + "\t-lof : Add loss of function (LOF) and Nonsense mediated decay (NMD) tags.\n", + "\t-noHgvs : Do not add HGVS annotations.\n", + "\t-noLof : Do not add LOF and NMD annotations.\n", + "\t-noShiftHgvs : Do not shift variants according to HGVS notation (most 3prime end).\n", + "\t-oicr : Add OICR tag in VCF file. Default: false\n", + "\t-sequenceOntology : Use Sequence Ontology terms. Default: true\n", + "\n", + "Generic options:\n", + "\t-c , -config : Specify config file\n", + "\t-configOption name=value : Override a config file option\n", + "\t-d , -debug : Debug mode (very verbose).\n", + "\t-dataDir : Override data_dir parameter from config file.\n", + "\t-download : Download a SnpEff database, if not available locally. Default: true\n", + "\t-nodownload : Do not download a SnpEff database, if not available locally.\n", + "\t-h , -help : Show this help and exit\n", + "\t-noLog : Do not report usage statistics to server\n", + "\t-q , -quiet : Quiet mode (do not show any messages or errors)\n", + "\t-v , -verbose : Verbose mode\n", + "\t-version : Show version number and exit\n", + "\n", + "Database options:\n", + "\t-canon : Only use canonical transcripts.\n", + "\t-canonList : Only use canonical transcripts, replace some transcripts using the 'gene_id \t transcript_id' entries in .\n", + "\t-tag : Only use transcript having a tag 'tagName'. This option can be used multiple times.\n", + "\t-notag : Filter out transcript having a tag 'tagName'. This option can be used multiple times.\n", + "\t-interaction : Annotate using interactions (requires interaction database). Default: true\n", + "\t-interval : Use a custom intervals in TXT/BED/BigBed/VCF/GFF file (you may use this option many times)\n", + "\t-maxTSL : Only use transcripts having Transcript Support Level lower than .\n", + "\t-motif : Annotate using motifs (requires Motif database). Default: true\n", + "\t-nextProt : Annotate using NextProt (requires NextProt database).\n", + "\t-noGenome : Do not load any genomic database (e.g. annotate using custom files).\n", + "\t-noExpandIUB : Disable IUB code expansion in input variants\n", + "\t-noInteraction : Disable inteaction annotations\n", + "\t-noMotif : Disable motif annotations.\n", + "\t-noNextProt : Disable NextProt annotations.\n", + "\t-onlyReg : Only use regulation tracks.\n", + "\t-onlyProtein : Only use protein coding transcripts. Default: false\n", + "\t-onlyTr : Only use the transcripts in this file. Format: One transcript ID per line.\n", + "\t-reg : Regulation track to use (this option can be used add several times).\n", + "\t-ss , -spliceSiteSize : Set size for splice sites (donor and acceptor) in bases. Default: 2\n", + "\t-spliceRegionExonSize : Set size for splice site region within exons. Default: 3 bases\n", + "\t-spliceRegionIntronMin : Set minimum number of bases for splice site region within intron. Default: 3 bases\n", + "\t-spliceRegionIntronMax : Set maximum number of bases for splice site region within intron. Default: 8 bases\n", + "\t-strict : Only use 'validated' transcripts (i.e. sequence has been checked). Default: false\n", + "\t-ud , -upDownStreamLen : Set upstream downstream interval length (in bases)\n", + "\n", + "ERROR conda.cli.main_run:execute(127): `conda run snpEff --help` failed. (See above for error)\n", + "[0.001s][warning][os,container] Cgroup memory controller path at '/sys/fs/cgroup' seems to have moved to '/../../jupyter-children', detected limits won't be accurate\n", + "[0.001s][warning][os,container] Cgroup cpu controller path at '/sys/fs/cgroup' seems to have moved to '/../../jupyter-children', detected limits won't be accurate\n", + "\n", + "Usage: \n", + " PE [-version] [-threads ] [-phred33|-phred64] [-trimlog ] [-summary ] [-quiet] [-validatePairs] [-basein | ] [-baseout | ] ...\n", + " or: \n", + " SE [-version] [-threads ] [-phred33|-phred64] [-trimlog ] [-summary ] [-quiet] ...\n", + " or: \n", + " -version\n", + "\n", + "ERROR conda.cli.main_run:execute(127): `conda run trimmomatic --help` failed. (See above for error)\n", + "[0.001s][warning][os,container] Cgroup memory controller path at '/sys/fs/cgroup' seems to have moved to '/../../jupyter-children', detected limits won't be accurate\n", + "[0.001s][warning][os,container] Cgroup cpu controller path at '/sys/fs/cgroup' seems to have moved to '/../../jupyter-children', detected limits won't be accurate\n", + "\n", + "\n", + "Program: bwa (alignment via Burrows-Wheeler transformation)\n", + "Version: 0.7.19-r1273\n", + "Contact: Heng Li \n", + "\n", + "Usage: bwa [options]\n", + "\n", + "Command: index index sequences in the FASTA format\n", + " mem BWA-MEM algorithm\n", + " fastmap identify super-maximal exact matches\n", + " pemerge merge overlapping paired ends (EXPERIMENTAL)\n", + " aln gapped/ungapped alignment\n", + " samse generate alignment (single ended)\n", + " sampe generate alignment (paired ended)\n", + " bwasw BWA-SW for long queries (DEPRECATED)\n", + "\n", + " shm manage indices in shared memory\n", + " fa2pac convert FASTA to PAC format\n", + " pac2bwt generate BWT from PAC\n", + " pac2bwtgen alternative algorithm for generating BWT\n", + " bwtupdate update .bwt to the new format\n", + " bwt2sa generate SA from BWT and Occ\n", + "\n", + "Note: To use BWA, you need to first index the genome with `bwa index'.\n", + " There are three alignment algorithms in BWA: `mem', `bwasw', and\n", + " `aln/samse/sampe'. If you are not sure which to use, try `bwa mem'\n", + " first. Please `man ./bwa.1' for the manual.\n", + "\n", + "\n", + "ERROR conda.cli.main_run:execute(127): `conda run bwa` failed. (See above for error)\n", + "samtools 1.22.1\n", + "bcftools 1.22\n" + ] + } + ], + "source": [ + "# Install Java for snpEff and trimmomatic\n", + "!/usr/local/bin/conda install -n qtlseq -c conda-forge openjdk -y\n", + "\n", + "# Source Conda\n", + "!source /usr/local/etc/profile.d/conda.sh\n", + "\n", + "# Unset PYTHONPATH\n", + "!unset PYTHONPATH\n", + "\n", + "# Test all tools with conda run\n", + "!/usr/local/bin/conda run -n qtlseq qtlseq -h\n", + "!/usr/local/bin/conda run -n qtlseq snpEff --help | head -5\n", + "!/usr/local/bin/conda run -n qtlseq trimmomatic --help | head -5\n", + "!/usr/local/bin/conda run -n qtlseq bwa | head -5\n", + "!/usr/local/bin/conda run -n qtlseq samtools --version | head -1\n", + "!/usr/local/bin/conda run -n qtlseq bcftools --version | head -1" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "colab": { + "base_uri": "https://localhost:8080/" + }, + "id": "ZhFpD9U8Vh04", + "outputId": "fa65d320-cd0b-421f-ada0-89b58ee76d82" + }, + "outputs": [ + { + "output_type": "stream", + "name": "stdout", + "text": [ + "# packages in environment at /usr/local/envs/qtlseq:\n", + "bcftools 1.22 h3a4d415_1 bioconda\n", + "bwa 0.7.19 h577a1d6_1 bioconda\n", + "openjdk 24.0.2 h5755bd7_0 conda-forge\n", + "qtlseq 2.2.9 pyhdfd78af_0 bioconda\n", + "samtools 1.22.1 h96c455f_0 bioconda\n", + "snpeff 5.2 hdfd78af_1 bioconda\n", + "trimmomatic 0.40 hdfd78af_0 bioconda\n" + ] + } + ], + "source": [ + "!/usr/local/bin/conda list -n qtlseq | grep -E \"qtlseq|snpeff|trimmomatic|bwa|samtools|bcftools|openjdk\"" + ] + }, + { + "cell_type": "markdown", + "metadata": { + "id": "zfQE3CSf3zSX" + }, + "source": [ + "Uploading files" + ] + }, + { + "cell_type": "code", + "execution_count": 18, + "metadata": { + "colab": { + "base_uri": "https://localhost:8080/", + "height": 468 + }, + "id": "azmoPuru322e", + "outputId": "20659f2f-f611-42f4-b66d-a2b477101d65" + }, + "outputs": [ + { + "metadata": { + "tags": null + }, + "name": "stdout", + "output_type": "stream", + "text": [ + "Upload reference FASTA (e.g., reference.fasta)\n" + ] + }, + { + "data": { + "text/html": [ + "\n", + " \n", + " \n", + " Upload widget is only available when the cell has been executed in the\n", + " current browser session. Please rerun this cell to enable.\n", + " \n", + " " + ], + "text/plain": [ + "" + ] + }, + "metadata": {}, + "output_type": "display_data" + }, + { + "metadata": { + "tags": null + }, + "name": "stdout", + "output_type": "stream", + "text": [ + "Saving IRGSP-1.0_genome.zip to IRGSP-1.0_genome (1).zip\n", + "Reference uploaded: IRGSP-1.0_genome (1).zip\n", + "Upload parent.1 (e.g., parent.1.fastq.bz2)\n" + ] + }, + { + "data": { + "text/html": [ + "\n", + " \n", + " \n", + " Upload widget is only available when the cell has been executed in the\n", + " current browser session. Please rerun this cell to enable.\n", + " \n", + " " + ], + "text/plain": [ + "" + ] + }, + "metadata": {}, + "output_type": "display_data" + }, + { + "output_type": "error", + "ename": "MessageError", + "evalue": "TypeError: Cannot read properties of undefined (reading 'next')", + "traceback": [ + "\u001b[0;31m---------------------------------------------------------------------------\u001b[0m", + "\u001b[0;31mMessageError\u001b[0m Traceback (most recent call last)", + "\u001b[0;32m/tmp/ipython-input-706307598.py\u001b[0m in \u001b[0;36m\u001b[0;34m()\u001b[0m\n\u001b[1;32m 9\u001b[0m \u001b[0;31m# Upload parent.1\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 10\u001b[0m \u001b[0mprint\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0;34m\"Upload parent.1 (e.g., parent.1.fastq.bz2)\"\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0;32m---> 11\u001b[0;31m \u001b[0mparent1\u001b[0m \u001b[0;34m=\u001b[0m \u001b[0mfiles\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mupload\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0m\u001b[1;32m 12\u001b[0m \u001b[0mparent1_filename\u001b[0m \u001b[0;34m=\u001b[0m \u001b[0mlist\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mparent1\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mkeys\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m[\u001b[0m\u001b[0;36m0\u001b[0m\u001b[0;34m]\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 13\u001b[0m \u001b[0mprint\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0;34m\"Parent 1 uploaded:\"\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0mparent1_filename\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n", + "\u001b[0;32m/usr/local/lib/python3.12/dist-packages/google/colab/files.py\u001b[0m in \u001b[0;36mupload\u001b[0;34m(target_dir)\u001b[0m\n\u001b[1;32m 70\u001b[0m \"\"\"\n\u001b[1;32m 71\u001b[0m \u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0;32m---> 72\u001b[0;31m \u001b[0muploaded_files\u001b[0m \u001b[0;34m=\u001b[0m \u001b[0m_upload_files\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mmultiple\u001b[0m\u001b[0;34m=\u001b[0m\u001b[0;32mTrue\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0m\u001b[1;32m 73\u001b[0m \u001b[0;31m# Mapping from original filename to filename as saved locally.\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 74\u001b[0m \u001b[0mlocal_filenames\u001b[0m \u001b[0;34m=\u001b[0m \u001b[0mdict\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n", + "\u001b[0;32m/usr/local/lib/python3.12/dist-packages/google/colab/files.py\u001b[0m in \u001b[0;36m_upload_files\u001b[0;34m(multiple)\u001b[0m\n\u001b[1;32m 170\u001b[0m \u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 171\u001b[0m \u001b[0;32mwhile\u001b[0m \u001b[0mresult\u001b[0m\u001b[0;34m[\u001b[0m\u001b[0;34m'action'\u001b[0m\u001b[0;34m]\u001b[0m \u001b[0;34m!=\u001b[0m \u001b[0;34m'complete'\u001b[0m\u001b[0;34m:\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0;32m--> 172\u001b[0;31m result = _output.eval_js(\n\u001b[0m\u001b[1;32m 173\u001b[0m 'google.colab._files._uploadFilesContinue(\"{output_id}\")'.format(\n\u001b[1;32m 174\u001b[0m \u001b[0moutput_id\u001b[0m\u001b[0;34m=\u001b[0m\u001b[0moutput_id\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n", + "\u001b[0;32m/usr/local/lib/python3.12/dist-packages/google/colab/output/_js.py\u001b[0m in \u001b[0;36meval_js\u001b[0;34m(script, ignore_result, timeout_sec)\u001b[0m\n\u001b[1;32m 38\u001b[0m \u001b[0;32mif\u001b[0m \u001b[0mignore_result\u001b[0m\u001b[0;34m:\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 39\u001b[0m \u001b[0;32mreturn\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0;32m---> 40\u001b[0;31m \u001b[0;32mreturn\u001b[0m \u001b[0m_message\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mread_reply_from_input\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mrequest_id\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0mtimeout_sec\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0m\u001b[1;32m 41\u001b[0m \u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 42\u001b[0m \u001b[0;34m\u001b[0m\u001b[0m\n", + "\u001b[0;32m/usr/local/lib/python3.12/dist-packages/google/colab/_message.py\u001b[0m in \u001b[0;36mread_reply_from_input\u001b[0;34m(message_id, timeout_sec)\u001b[0m\n\u001b[1;32m 101\u001b[0m ):\n\u001b[1;32m 102\u001b[0m \u001b[0;32mif\u001b[0m \u001b[0;34m'error'\u001b[0m \u001b[0;32min\u001b[0m \u001b[0mreply\u001b[0m\u001b[0;34m:\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0;32m--> 103\u001b[0;31m \u001b[0;32mraise\u001b[0m \u001b[0mMessageError\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mreply\u001b[0m\u001b[0;34m[\u001b[0m\u001b[0;34m'error'\u001b[0m\u001b[0;34m]\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0m\u001b[1;32m 104\u001b[0m \u001b[0;32mreturn\u001b[0m \u001b[0mreply\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mget\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0;34m'data'\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0;32mNone\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 105\u001b[0m \u001b[0;34m\u001b[0m\u001b[0m\n", + "\u001b[0;31mMessageError\u001b[0m: TypeError: Cannot read properties of undefined (reading 'next')" + ] + } + ], + "source": [ + "from google.colab import files\n", + "\n", + "# Upload reference FASTA\n", + "print(\"Upload reference FASTA (e.g., reference.fasta)\")\n", + "ref_file = files.upload()\n", + "ref_filename = list(ref_file.keys())[0]\n", + "print(\"Reference uploaded:\", ref_filename)\n", + "\n", + "# Upload parent.1\n", + "print(\"Upload parent.1 (e.g., parent.1.fastq.bz2)\")\n", + "parent1 = files.upload()\n", + "parent1_filename = list(parent1.keys())[0]\n", + "print(\"Parent 1 uploaded:\", parent1_filename)\n", + "\n", + "# Upload parent.2\n", + "print(\"Upload parent.2 (e.g., parent.2.fastq.bz2)\")\n", + "parent2 = files.upload()\n", + "parent2_filename = list(parent2.keys())[0]\n", + "print(\"Parent 2 uploaded:\", parent2_filename)\n", + "\n", + "# Upload bulk\n", + "print(\"Upload bulk (e.g., bulk_1.1.fastq.bz2)\")\n", + "bulk = files.upload()\n", + "bulk_filename = list(bulk.keys())[0]\n", + "print(\"Bulk uploaded:\", bulk_filename)\n", + "\n", + "print(\"\\n✅ All files uploaded successfully:\")\n", + "print(\"Reference:\", ref_filename)\n", + "print(\"Parent 1:\", parent1_filename)\n", + "print(\"Parent 2:\", parent2_filename)\n", + "print(\"Bulk:\", bulk_filename)\n" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "colab": { + "background_save": true, + "base_uri": "https://localhost:8080/", + "height": 164 + }, + "id": "ZVRj9iI9-XLS", + "outputId": "5927cd62-e519-40c0-968a-b6008aac88a1" + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Upload reference genome (e.g., IRGSP-1.0_genome.zip)\n" + ] + }, + { + "data": { + "text/html": [ + "\n", + " \n", + " \n", + " Upload widget is only available when the cell has been executed in the\n", + " current browser session. Please rerun this cell to enable.\n", + " \n", + " " + ], + "text/plain": [ + "" + ] + }, + "metadata": {}, + "output_type": "display_data" + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Saving IRGSP-1.0_genome.zip to IRGSP-1.0_genome.zip\n", + "Reference genome extracted: reference_data/IRGSP-1.0_genome.fasta\n", + "Upload parent.1 (e.g., parent.1.fastq.bz2)\n" + ] + }, + { + "data": { + "text/html": [ + "\n", + " \n", + " \n", + " Upload widget is only available when the cell has been executed in the\n", + " current browser session. Please rerun this cell to enable.\n", + " \n", + " " + ], + "text/plain": [ + "" + ] + }, + "metadata": {}, + "output_type": "display_data" + } + ], + "source": [ + "from google.colab import files\n", + "import zipfile, os, shutil\n", + "import subprocess\n", + "\n", + "# --- Upload reference (ZIP) ---\n", + "print(\"Upload reference genome (e.g., IRGSP-1.0_genome.zip)\")\n", + "ref_file = files.upload()\n", + "ref_zip = list(ref_file.keys())[0]\n", + "\n", + "# Extract FASTA from ZIP\n", + "with zipfile.ZipFile(ref_zip, 'r') as zip_ref:\n", + " zip_ref.extractall(\"reference_data\")\n", + "\n", + "# Find extracted FASTA file\n", + "ref_extracted = [f for f in os.listdir(\"reference_data\") if f.endswith((\".fasta\", \".fa\"))]\n", + "if ref_extracted:\n", + " ref_filename = os.path.join(\"reference_data\", ref_extracted[0])\n", + " print(\"Reference genome extracted:\", ref_filename)\n", + "else:\n", + " raise ValueError(\"❌ No FASTA file found in the uploaded ZIP.\")\n", + "\n", + "# --- Upload parent.1 ---\n", + "print(\"Upload parent.1 (e.g., parent.1.fastq.bz2)\")\n", + "parent1 = files.upload()\n", + "parent1_filename = list(parent1.keys())[0]\n", + "\n", + "# Decompress parent.1\n", + "!bunzip2 -k \"{parent1_filename}\"\n", + "parent1_decompressed = parent1_filename.replace(\".bz2\", \"\")\n", + "print(\"Parent 1 decompressed:\", parent1_decompressed)\n", + "\n", + "# --- Upload parent.2 ---\n", + "print(\"Upload parent.2 (e.g., parent.2.fastq.bz2)\")\n", + "parent2 = files.upload()\n", + "parent2_filename = list(parent2.keys())[0]\n", + "\n", + "# Decompress parent.2\n", + "!bunzip2 -k \"{parent2_filename}\"\n", + "parent2_decompressed = parent2_filename.replace(\".bz2\", \"\")\n", + "print(\"Parent 2 decompressed:\", parent2_decompressed)\n", + "\n", + "# --- Upload bulk ---\n", + "print(\"Upload bulk (e.g., bulk_1.1.fastq.bz2)\")\n", + "bulk = files.upload()\n", + "bulk_filename = list(bulk.keys())[0]\n", + "\n", + "# Decompress bulk\n", + "!bunzip2 -k \"{bulk_filename}\"\n", + "bulk_decompressed = bulk_filename.replace(\".bz2\", \"\")\n", + "print(\"Bulk decompressed:\", bulk_decompressed)\n", + "\n", + "print(\"\\n✅ All files ready for QTL-seq:\")\n", + "print(\"Reference:\", ref_filename)\n", + "print(\"Parent 1:\", parent1_decompressed)\n", + "print(\"Parent 2:\", parent2_decompressed)\n", + "print(\"Bulk:\", bulk_decompressed)\n" + ] + } + ], + "metadata": { + "colab": { + "provenance": [] + }, + "kernelspec": { + "display_name": "Python 3", + "name": "python3" + }, + "language_info": { + "name": "python" + } + }, + "nbformat": 4, + "nbformat_minor": 0 +} \ No newline at end of file