Pavlin
    • Create new note
    • Create a note from template
      • Sharing URL Link copied
      • /edit
      • View mode
        • Edit mode
        • View mode
        • Book mode
        • Slide mode
        Edit mode View mode Book mode Slide mode
      • Customize slides
      • Note Permission
      • Read
        • Only me
        • Signed-in users
        • Everyone
        Only me Signed-in users Everyone
      • Write
        • Only me
        • Signed-in users
        • Everyone
        Only me Signed-in users Everyone
      • Engagement control Commenting, Suggest edit, Emoji Reply
    • Invite by email
      Invitee

      This note has no invitees

    • Publish Note

      Share your work with the world Congratulations! 🎉 Your note is out in the world Publish Note

      Your note will be visible on your profile and discoverable by anyone.
      Your note is now live.
      This note is visible on your profile and discoverable online.
      Everyone on the web can find and read all notes of this public team.
      See published notes
      Unpublish note
      Please check the box to agree to the Community Guidelines.
      View profile
    • Commenting
      Permission
      Disabled Forbidden Owners Signed-in users Everyone
    • Enable
    • Permission
      • Forbidden
      • Owners
      • Signed-in users
      • Everyone
    • Suggest edit
      Permission
      Disabled Forbidden Owners Signed-in users Everyone
    • Enable
    • Permission
      • Forbidden
      • Owners
      • Signed-in users
    • Emoji Reply
    • Enable
    • Versions and GitHub Sync
    • Note settings
    • Note Insights New
    • Engagement control
    • Transfer ownership
    • Delete this note
    • Save as template
    • Insert from template
    • Import from
      • Dropbox
      • Google Drive
      • Gist
      • Clipboard
    • Export to
      • Dropbox
      • Google Drive
      • Gist
    • Download
      • Markdown
      • HTML
      • Raw HTML
Menu Note settings Note Insights Versions and GitHub Sync Sharing URL Create Help
Create Create new note Create a note from template
Menu
Options
Engagement control Transfer ownership Delete this note
Import from
Dropbox Google Drive Gist Clipboard
Export to
Dropbox Google Drive Gist
Download
Markdown HTML Raw HTML
Back
Sharing URL Link copied
/edit
View mode
  • Edit mode
  • View mode
  • Book mode
  • Slide mode
Edit mode View mode Book mode Slide mode
Customize slides
Note Permission
Read
Only me
  • Only me
  • Signed-in users
  • Everyone
Only me Signed-in users Everyone
Write
Only me
  • Only me
  • Signed-in users
  • Everyone
Only me Signed-in users Everyone
Engagement control Commenting, Suggest edit, Emoji Reply
  • Invite by email
    Invitee

    This note has no invitees

  • Publish Note

    Share your work with the world Congratulations! 🎉 Your note is out in the world Publish Note

    Your note will be visible on your profile and discoverable by anyone.
    Your note is now live.
    This note is visible on your profile and discoverable online.
    Everyone on the web can find and read all notes of this public team.
    See published notes
    Unpublish note
    Please check the box to agree to the Community Guidelines.
    View profile
    Engagement control
    Commenting
    Permission
    Disabled Forbidden Owners Signed-in users Everyone
    Enable
    Permission
    • Forbidden
    • Owners
    • Signed-in users
    • Everyone
    Suggest edit
    Permission
    Disabled Forbidden Owners Signed-in users Everyone
    Enable
    Permission
    • Forbidden
    • Owners
    • Signed-in users
    Emoji Reply
    Enable
    Import from Dropbox Google Drive Gist Clipboard
       Owned this note    Owned this note      
    Published Linked with GitHub
    1
    • Any changes
      Be notified of any changes
    • Mention me
      Be notified of mention me
    • Unsubscribe
    # uv and pixi on computer centers [TOC] ## `uv` - https://docs.astral.sh/uv/ > An extremely fast Python package and project manager, written in Rust. > A single tool to replace pip, pip-tools, pipx, poetry, pyenv, twine, virtualenv, and more. ### Install and configure uv ```bash # Install uv curl -LsSf https://astral.sh/uv/install.sh | sh # Redirect cache and tools in project folder export UV_CACHE_DIR=/crex/proj/uppmax-xxx/user/nobackup/.UV_CACHE_DIR export UV_TOOL_DIR=/crex/proj/uppmax-xxx/user/nobackup/.UV_TOOL_DIR # make the folders mkdir -p $UV_CACHE_DIR $UV_TOOL_DIR ``` ### Run python tools without installation ```bash # run python tool without installing it uvx nf-core ``` ### Install python tools Python modules (tools) that are executable will be installed in own environment and made available in your `$PATH` to run them directly. Example installation with `nf-core` ```bash # install nf-core uv tool install nf-core # list tools uv tool list # update tool uv tool update nf-core # update all tools uv tool update --all # uninstall tool uv tool uninstall nf-core ``` ### Maintaining uv ```bash # update uv uv self update # clean cache uv cache clean ``` For more details - follow the [documentation](https://docs.astral.sh/uv/) online. ## Offline installation with uv ### Examples ::: spoiler forest - https://github.com/onnela-lab/forest ```bash # Load uv on Rackham (or computer with uv installed and Internet) source /sw/generic/uv-tools/setup/source.me # Clone the repository git clone https://github.com/onnela-lab/forest.git cd forest mkdir cache # On Rackhama and Bianca you might need newer gcc and cmake module load gcc cmake # Create the .venv that will also download the required packages uv sync --cache-dir cache # Remove the .venv - it will be recreated on Bianca rm -r .venv # On Bianca # Load uv on Bianca source /sw/generic/uv-tools/setup/source.me # copy or move the forest folder in your project # collecting the folder in a .tar file is a good idea cd forest uv sync --cache-dir cache --offline source .venv/bin/activate (beiwe-forest) [user@sensXXXXXXX-bianca forest]$ python3 Python 3.13.3 (main, May 17 2025, 13:49:13) [Clang 20.1.4 ] on linux Type "help", "copyright", "credits" or "license" for more information. >>> import datetime >>> from forest.bonsai.simulate_log_data import sim_log_data >>> from forest.bonsai.simulate_gps_data import sim_gps_data, gps_to_csv ... from forest.jasmine.traj2stats import Frequency, gps_stats_main ... from forest.willow.log_stats import log_stats_main ... >>> deactivate ``` ::: --- ## `pixi` - https://pixi.sh/latest/ > Pixi is a package management tool for developers. It allows the developer to install libraries and applications in a reproducible way. Use pixi cross-platform, on Windows, Mac and Linux. ### Install and configure pixi ```bash # Install pixi curl -fsSL https://pixi.sh/install.sh | bash # Redirect cache and globals in project folder export PIXI_CACHE_DIR=/crex/proj/uppmax-xxx/user/nobackup/.PIXI_CACHE_DIR export PIXI_HOME=/crex/proj/uppmax-xxx/user/nobackup/.PIXI_HOME # make the folders mkdir -p $PIXI_CACHE_DIR $PIXI_HOME # add global bin to $PATH export PATH=$PATH:$PIXI_HOME/bin ``` ### Install tools globally ```bash pixi global install -c bioconda -c conda-forge samtools Global environments as specified in '/sw/apps/pixi/manifests/pixi-global.toml' └── samtools: 1.9 (installed) └─ exposes: ace2sam, blast2sam, bowtie2sam, export2sam, interpolate_sam, maq2sam-long, maq2sam-short, md5fa, md5sum-lite, novo2sam, plot-bamstats, psl2sam, sam2vcf, samtools, seq_cache_populate, soap2sam, wgsim, wgsim_eval, zoom2sam # list global tools pixi global list Global environments as specified in '/crex/proj/uppmax-xxx/user/nobackup/.PIXI_HOME/manifests/pixi-global.toml' └── samtools: 1.9 └─ exposes: ace2sam, blast2sam, bowtie2sam, export2sam, interpolate_sam, maq2sam-long, maq2sam-short, md5fa, md5sum-lite, novo2sam, plot-bamstats, psl2sam, sam2vcf, samtools, seq_cache_populate, soap2sam, wgsim, wgsim_eval, zoom2sam # Update global tool pixi global update samtools # Update all tools pixi global update ``` ### Maintain pixi ```bash # Update pixi pixi self-update # clean cache pixi clean cache ``` ## pixi-pack https://pixi.sh/latest/deployment/pixi_pack/ There is a convenient way to pack whole environment/project (*download all necessary packages and wrap them in a single file*) and unpack it on another machine into a new environment (*even without conda or pixi available on that machine*). ```bash! # Install pixi-pack as global tool pixi global install pixi-pack pixi-unpack # Init new project pixi init --platform linux-64 -c conda-forge -c bioturing -c bioconda CellTrek # Add packages cd CellTrek pixi add bioturing::r-celltrek "r-seurat<5.0" "r-seuratobject<5.0" bioconda::bioconductor-consensusclusterplus pixi-pack --use-cache ./cache # Then unpack on the other computer with pixi-unpack environment.tar # or create executable that can unpack itself pixi-pack --create-executable --use-cache ./cache # on the other machine create folder and run to unpack ./environment.sh # Use conda to activate the environment conda activate /full/path_to_env ``` ### Examples ::: spoiler gsMap ```bash pixi init --platform linux-64 -c conda-forge -c bioconda gsMap cd gsMap pixi add "python>=3.10" bioconda::gsmap # Test the setup pixi shell (gsMap) gsmap -v gsMap version 1.73.5 exit # then pixi-pack ... and so on... ``` ::: ## Contacts: - [Pavlin Mitev](https://katalog.uu.se/profile/?id=N3-1425) - [UPPMAX](https://www.uu.se/en/centre/uppmax) - [AE@UPPMAX - related documentation](/8sqXISVRRquPDSw9o1DizQ)

    Import from clipboard

    Paste your markdown or webpage here...

    Advanced permission required

    Your current role can only read. Ask the system administrator to acquire write and comment permission.

    This team is disabled

    Sorry, this team is disabled. You can't edit this note.

    This note is locked

    Sorry, only owner can edit this note.

    Reach the limit

    Sorry, you've reached the max length this note can be.
    Please reduce the content or divide it to more notes, thank you!

    Import from Gist

    Import from Snippet

    or

    Export to Snippet

    Are you sure?

    Do you really want to delete this note?
    All users will lose their connection.

    Create a note from template

    Create a note from template

    Oops...
    This template has been removed or transferred.
    Upgrade
    All
    • All
    • Team
    No template.

    Create a template

    Upgrade

    Delete template

    Do you really want to delete this template?
    Turn this template into a regular note and keep its content, versions, and comments.

    This page need refresh

    You have an incompatible client version.
    Refresh to update.
    New version available!
    See releases notes here
    Refresh to enjoy new features.
    Your user state has changed.
    Refresh to load new user state.

    Sign in

    Forgot password

    or

    By clicking below, you agree to our terms of service.

    Sign in via Facebook Sign in via Twitter Sign in via GitHub Sign in via Dropbox Sign in with Wallet
    Wallet ( )
    Connect another wallet

    New to HackMD? Sign up

    Help

    • English
    • 中文
    • Français
    • Deutsch
    • 日本語
    • Español
    • Català
    • Ελληνικά
    • Português
    • italiano
    • Türkçe
    • Русский
    • Nederlands
    • hrvatski jezik
    • język polski
    • Українська
    • हिन्दी
    • svenska
    • Esperanto
    • dansk

    Documents

    Help & Tutorial

    How to use Book mode

    Slide Example

    API Docs

    Edit in VSCode

    Install browser extension

    Contacts

    Feedback

    Discord

    Send us email

    Resources

    Releases

    Pricing

    Blog

    Policy

    Terms

    Privacy

    Cheatsheet

    Syntax Example Reference
    # Header Header 基本排版
    - Unordered List
    • Unordered List
    1. Ordered List
    1. Ordered List
    - [ ] Todo List
    • Todo List
    > Blockquote
    Blockquote
    **Bold font** Bold font
    *Italics font* Italics font
    ~~Strikethrough~~ Strikethrough
    19^th^ 19th
    H~2~O H2O
    ++Inserted text++ Inserted text
    ==Marked text== Marked text
    [link text](https:// "title") Link
    ![image alt](https:// "title") Image
    `Code` Code 在筆記中貼入程式碼
    ```javascript
    var i = 0;
    ```
    var i = 0;
    :smile: :smile: Emoji list
    {%youtube youtube_id %} Externals
    $L^aT_eX$ LaTeX
    :::info
    This is a alert area.
    :::

    This is a alert area.

    Versions and GitHub Sync
    Get Full History Access

    • Edit version name
    • Delete

    revision author avatar     named on  

    More Less

    Note content is identical to the latest version.
    Compare
      Choose a version
      No search result
      Version not found
    Sign in to link this note to GitHub
    Learn more
    This note is not linked with GitHub
     

    Feedback

    Submission failed, please try again

    Thanks for your support.

    On a scale of 0-10, how likely is it that you would recommend HackMD to your friends, family or business associates?

    Please give us some advice and help us improve HackMD.

     

    Thanks for your feedback

    Remove version name

    Do you want to remove this version name and description?

    Transfer ownership

    Transfer to
      Warning: is a public team. If you transfer note to this team, everyone on the web can find and read this note.

        Link with GitHub

        Please authorize HackMD on GitHub
        • Please sign in to GitHub and install the HackMD app on your GitHub repo.
        • HackMD links with GitHub through a GitHub App. You can choose which repo to install our App.
        Learn more  Sign in to GitHub

        Push the note to GitHub Push to GitHub Pull a file from GitHub

          Authorize again
         

        Choose which file to push to

        Select repo
        Refresh Authorize more repos
        Select branch
        Select file
        Select branch
        Choose version(s) to push
        • Save a new version and push
        • Choose from existing versions
        Include title and tags
        Available push count

        Pull from GitHub

         
        File from GitHub
        File from HackMD

        GitHub Link Settings

        File linked

        Linked by
        File path
        Last synced branch
        Available push count

        Danger Zone

        Unlink
        You will no longer receive notification when GitHub file changes after unlink.

        Syncing

        Push failed

        Push successfully