Native conda installation

Installing Miniconda

https://docs.conda.io/en/latest/miniconda.html

 

Miniconda — conda documentation

Miniconda is a free minimal installer for conda. It is a small, bootstrap version of Anaconda that includes only conda, Python, the packages they depend on, and a small number of other useful packages, including pip, zlib and a few others. Use the conda in

docs.conda.io

Miniconda3 Linux 64-bit

$ wget https://repo.anaconda.com/miniconda/Miniconda3-latest-Linux-x86_64.sh
:
$ chmod +x Miniconda3-latest-Linux-x86_64.sh
$ ./Miniconda3-latest-Linux-x86_64.sh
:
Miniconda3 will now be installed into this location:
/home/jylee/miniconda3

  - Press ENTER to confirm the location
  - Press CTRL-C to abort the installation
  - Or specify a different location below

[/home/user/miniconda3] >>>
PREFIX=/home/user/miniconda3
Unpacking payload ...

Installing base environment...

Downloading and Extracting Packages
Downloading and Extracting Packages

Preparing transaction: done
Executing transaction: done
installation finished.
Do you wish the installer to initialize Miniconda3
by running conda init? [yes|no]
[no] >>> yes
no change     /home/user/miniconda3/condabin/conda
no change     /home/user/miniconda3/bin/conda
no change     /home/user/miniconda3/bin/conda-env
no change     /home/user/miniconda3/bin/activate
no change     /home/user/miniconda3/bin/deactivate
no change     /home/user/miniconda3/etc/profile.d/conda.sh
no change     /home/user/miniconda3/etc/fish/conf.d/conda.fish
no change     /home/user/miniconda3/shell/condabin/Conda.psm1
no change     /home/user/miniconda3/shell/condabin/conda-hook.ps1
no change     /home/user/miniconda3/lib/python3.11/site-packages/xontrib/conda.xsh
no change     /home/user/miniconda3/etc/profile.d/conda.csh
modified      /home/user/.bashrc

==> For changes to take effect, close and re-open your current shell. <==

If you'd prefer that conda's base environment not be activated on startup,
   set the auto_activate_base parameter to false:

conda config --set auto_activate_base false

Thank you for installing Miniconda3!

Updating Miniconda

$ conda update conda

Installing wget

$ conda install wget

 

Install QIIME 2 within a conda environment

These instructions are identical to the Linux instructions and are intended for users of the Windows Subsystem for Linux.

$ wget https://data.qiime2.org/distro/core/qiime2-2023.5-py38-linux-conda.yml
$ conda env create -n qiime2-2023.5 --file qiime2-2023.5-py38-linux-conda.yml

OPTIONAL CLEANUP

$ rm qiime2-2023.5-py38-linux-conda.yml

 

Activate the conda environment

$ conda activate qiime2-2023.5
:
$ conda deactivate

Test your installation

$ qiime --help

 

 

How do I update to the newest version of QIIME 2?

In order to update/upgrade to the newest release, you simply install the newest version in a new conda environment by following the instructions above. Then you will have two conda environments, one with the older version of QIIME 2 and one with the newer version.

 

 

※ 터미널을 다시 켤 때마다 base 가상 환경이 기본으로 실행되는 것 해제

$ conda config --set auto_activate_base false

'BIO' 카테고리의 다른 글

ASP.NET Core Dockerfile에 QIIME 2 환경 추가하기  (0) 2023.08.11
C#에서 Linux 환경에 설치된 QIIME 2 실행하기  (0) 2023.08.02
FASTQ format in QIIME 2  (0) 2023.08.01
QIIME 2 Core concepts  (0) 2023.07.31
FASTAQ  (0) 2023.07.31

https://docs.qiime2.org/2023.5/concepts/#

 

Core concepts — QIIME 2 2023.5.1 documentation

Core concepts This page describes several core concepts in QIIME 2 that are important to understand before starting to use the software. The glossary may be helpful to refer to as you read through this page and other documentation on the site. Data files:

docs.qiime2.org

Data files: QIIME 2 artifacts

Data produced by QIMME 2 exist as QIIME 2 artifacts.

A QIIME 2 artifact contains data and metadata.

The metadata describes things about the data, such as its type, format and how it was generated (provenance).

A QIIME 2 artifact typically has the .qza file extension when stored in a file.

 

Since QIIME 2 works with artifacts instead of data files (e.g. FASTA files),

you must create a QIIME 2 artifact by importing data.

You can import data at any step in an analysis, though typically you will start by importing raw sequence data.

QIIME 2 also has tools to export data from an artifact.

 

By using QIIME 2 artifacts instead of simple data files, QIIME 2 can automatically track the type, format, and provenance of data for researchers. Using artifacts instead of data files enables researchers to focus on the analyses they want to perform, instead of the particular format the data needs to be in for an analysis.

 

Artifacts enable QIIME 2 to track, in addition to the data itself, the provenance of how the data came to be.

With an artifact's provenance, you can trace back to all previous analyses that were run to produce the artifact,
including the input data used at each step.

This automatic, integrated, and decentralized provenance tracking of data enables a researcher to archive artifacts, or for example, send an artifact to a collaborator, with the ability to understand exactly how the artifact was created.

This enables replicability(복제가능성) and reproducibility(재현성) of analyses, as well as generation of diagrams and text that can be used in the methods section of a paper.

Provenance also supports and encourages the paper attribution to underlying tools (e.g. FastTree to build a phylogenetic(계통 발생의) tree) used to generate the artifact.

 

Data files: Visualizations

Visualizations are another type of data generated by QIIME 2.

When written to disk, visualization files typically have the .qzv file extension.

Visualzations contain similar types of metadata as QIIME 2 artifacts, including provenance information.

Similar to QIIME 2 artifacts, visualizations are standalone information that can be archived or shared with collarborators.

 

In contrast to QIIME 2 artifacts, visualizations are terminal outputs of an analysis, and can represent, for example, a statistical results table, an interactive visualization, static images, or really any combination of visual data representations.

Since visualizations are terminal outputs, they cannot be used as input other analyses in QIIME 2.

 

Tip
Use https://view.qiime2.org to easily view QIIME 2 artifacts and visualizations files (generally .qza and .qzv files) without requiring a QIIME installation. This is helpful for sharing QIIME 2 data with collarborators who may not have QIIME 2 installed. https://view.qiime2.org also supports viewing data provenance.

 

Semantic types

Every artifact generated by QIIME 2 has a semantic type associated with it.

Semantic types enable QIIME 2 to identify artifacts that are suitable inputs to an analysis.

For example, if an analysis expects a distance matrix as input,
QIIME 2 can determine which artifacts have a distance matrix semantic type
and prevent incompatible artifacts from being used in the analysis
(e.g. an artifact representing a phylogenetic tree).

 

Semantic types also help users avoid semantically incorrect analyses.

For example, a feature table could contain presence/absence data
(i.e., a 1 to indicate that an OTU was observed at least one time in a given sample,
and a 0 to indicate that an OTU was not observed at least one time in a given sample).

However, if that feature table were provided to an analysis computing a quantitative diversity metric
where OTU abundances are included in the calculation (e.g., weighted UniFrac),
the analysis would complete successfully, but the result would not be meaningful.

 

Check out the semantic types page for more information about semantic types and what types are currently available.

 

Plugins

QIIME 2 microbiome(미생물) analyses are made available to users via plugins.

To perform analyses with QIIME 2, you will install one or more plugins
that provide the specific analyses you are interested in.

For example, if you want to demultiplex your raw sequence data, you might use the q2-demux QIIME 2 plugin,
or if you're wanting to perform alpha- or beta-deversity analyses, you could use the q2-diversity plugin.

 

Plugins are software packages that can be developed by anyone.

The QIIME 2 team has developed several plugins for an initial end-to-end microbiome analysis pipline,
but third-party developers are encouraged to create their own plugins to provide additional analyses.

Third-party developers will define these plugins in the same way that the QIIME 2 team has define the "official" plugins.

This decentralized development of microbiome analysis functionality means
that many more analyses and tools will be accessible to QIIME 2 users, including the latest techniques and protocols.

Plugins also allow users to choose and customize analysis pipeline for their specific needs.

 

Check out the plugin availability page to see what plugins are currently available
and the future plugins page for those that are being developed.

 

Methods and Visualizers

QIIME 2 plugins define methods and visualizers that are used to perform analyses.

 

A method accepts some combination of QIIME 2 artifacts and parameters as input,
and produces one or more QIIME 2 artifacts as output.

These output artifacts could subsequently be used as input to other QIIME 2 methods or visualizers.

Methods can produce intermediate or terminal outputs in a QIIME 2 analysis.

For example, the rarefy method defined in the q2-feature-table plugin
accepts a feature table artifact and sampling depth as input
and produces a rarefied feature table artifact as output.

This rarefied feature table artifact could then be used in another analysis,
such as alpha diversity calculations provided by the alpha method in q2-diversity.

 

A visualizer is similar to a mehtod in that it accepts some combination of QIIME 2 artifacts and parameters as input.

In contrast to a method, a visualizer produces exactly one visualization as output.

Visualizations, by definition, cannot be used as input to other QIIME 2 methods or visualizers.

Thus, visualizers can only produce terminal output in a QIIME 2 analysis.

https://github.com/tfussell/xlnt

 

GitHub - tfussell/xlnt: Cross-platform user-friendly xlsx library for C++11+

:bar_chart: Cross-platform user-friendly xlsx library for C++11+ - GitHub - tfussell/xlnt: Cross-platform user-friendly xlsx library for C++11+

github.com

 

Windows

> cd vcpkg
> ./vcpkg install xlnt:x64-windows

Linux

$ git clone https://github.com/microsoft/vcpkg.git
$ cd vcpkg
$ ./bootstrap-vcpkg.sh
$ sudo ./vcpkg integrate install
$ ./vcpkg install xlnt
...
-- Configuring x64-linux
-- Building x64-linux-dbg
-- Building x64-linux-rel
-- Installing: /home/jym/dev/vcpkg/packages/xlnt_x64-linux/share/xlnt/copyright
-- Fixing pkgconfig file: /home/jym/dev/vcpkg/packages/xlnt_x64-linux/lib/pkgconfig/xlnt.pc
-- Fixing pkgconfig file: /home/jym/dev/vcpkg/packages/xlnt_x64-linux/debug/lib/pkgconfig/xlnt.pc
...
xlnt provides CMake targets:

    # this is heuristically generated, and may not be correct
    find_package(Xlnt CONFIG REQUIRED)
    target_link_libraries(main PRIVATE xlnt::xlnt)

 

Specify the toolchain as a CMake option:

-DCMAKE_TOOLCHAIN_FILE=/home/jym/dev/vcpkg/scripts/buildsystems/vcpkg.cmake

But this won't work if you already specify a toolchain, such as when cross-compiling.

To avoid this problem, include it.

include(/home/jym/dev/vcpkg/scripts/buildsystems/vcpkg.cmake)

 

Example: CMakeLists.txt

cmake_minimum_required(VERSION 3.16)
project(test-xlnt CXX)

set(CMAKE_VERBOSE_MAKEFILE true)
set(CMAKE_CXX_STANDARD 14)

include(/home/jym/dev/vcpkg/scripts/buildsystems/vcpkg.cmake)

list(APPEND CMAKE_PREFIX_PATH "/home/jym/dev/vcpkg/installed/x64-linux/share")

find_package(Xlnt CONFIG REQUIRED)

message("XLNT_CMAKE_DIR:   ${XLNT_CMAKE_DIR}")
message("xlnt_INCLUDE_DIR: ${xlnt_INCLUDE_DIR}")

set(SRC_FILES main.cpp)

add_executable(${PROJECT_NAME} ${SRC_FILES})

target_include_directories(${PROJECT_NAME} PRIVATE
    ${xlnt_INCLUDE_DIR})
target_link_libraries(${PROJECT_NAME} PRIVATE
    xlnt::xlnt)

 

다른 방법:

Findxlnt.cmake

# Findxlnt.cmake
#
# Finds the xlnt library
#
# This will define the following variables
#
#   xlnt_FOUND
#   xlnt_LIBRARY
#   xlnt_LIBRARIES
#   xlnt_LIBRARY_DEBUG
#   xlnt_LIBRARY_RELEASE
#
# and the following imported targets
#
#   xlnt::xlnt
#
# Author: John Coffey - johnco3@gmail.com
#

find_path(xlnt_INCLUDE_DIR NAMES xlnt/xlnt.hpp)

if (NOT xlnt_LIBRARIES)
    find_library(xlnt_LIBRARY_RELEASE NAMES xlnt DOC "xlnt release library")
    find_library(xlnt_LIBRARY_DEBUG NAMES xlntd DOC "xlnt debug library")
    include(SelectLibraryConfigurations)
    select_library_configurations(xlnt)
endif()

include(FindPackageHandleStandardArgs)
find_package_handle_standard_args(xlnt
    REQUIRED_VARS xlnt_INCLUDE_DIR xlnt_LIBRARY)
mark_as_advanced(
    xlnt_INCLUDE_DIR
    xlnt_LIBRARY)

if(xlnt_FOUND AND NOT (TARGET xlnt::xlnt))
    # debug output showing the located libraries
    message(STATUS "xlnt_INCLUDE_DIR=${xlnt_INCLUDE_DIR}")
    message(STATUS "xlnt_LIBRARY=${xlnt_LIBRARY}")
    message(STATUS "xlnt_LIBRARIES=${xlnt_LIBRARIES}")
    message(STATUS "xlnt_LIBRARY_DEBUG=${xlnt_LIBRARY_DEBUG}")
    message(STATUS "xlnt_LIBRARY_RELEASE=${xlnt_LIBRARY_RELEASE}")
    # Add a blank imported library
    add_library(xlnt::xlnt UNKNOWN IMPORTED)

    # add the transitive includes property
    set_target_properties(xlnt::xlnt PROPERTIES
        INTERFACE_INCLUDE_DIRECTORIES "${xlnt_INCLUDE_DIR}")

    # Optimized library
    if(xlnt_LIBRARY_RELEASE)
        set_property(TARGET xlnt::xlnt APPEND PROPERTY
            IMPORTED_CONFIGURATIONS RELEASE)
        set_target_properties(xlnt::xlnt PROPERTIES
            IMPORTED_LOCATION_RELEASE "${xlnt_LIBRARY_RELEASE}")
    endif()

    # Debug library
    if(xlnt_LIBRARY_DEBUG)
        set_property(TARGET xlnt::xlnt APPEND PROPERTY
            IMPORTED_CONFIGURATIONS DEBUG)
        set_target_properties(xlnt::xlnt PROPERTIES
            IMPORTED_LOCATION_DEBUG "${xlnt_LIBRARY_DEBUG}")
    endif()

    # some other configuration
    if(NOT xlnt_LIBRARY_RELEASE AND NOT xlnt_LIBRARY_DEBUG)
        set_property(TARGET xlnt::xlnt APPEND PROPERTY
            IMPORTED_LOCATION "${xlnt_LIBRARY}")
    endif()
endif()

CMakeLists.txt 수정

...
# For finding Findxlnt.cmake
list(APPEND CMAKE_MODULE_PATH "${CMAKE_SOURCE_DIR}/../cmake")
find_package(xlnt REQUIRED)

message("xlnt_INCLUDE_DIR: ${xlnt_INCLUDE_DIR}")
message("xlnt_LIBRARY:     ${xlnt_LIBRARY}")
message("xlnt_LIBRARIES:   ${xlnt_LIBRARIES}")
...

 

 

 

'C, C++' 카테고리의 다른 글

To install the MinGW-w64 toolchain  (0) 2022.10.28
문자열 구분자로 분리  (0) 2021.10.20
VSCode + vcpkg  (0) 2021.10.19
Get DLL path at run time  (0) 2021.10.05
ticktock  (0) 2021.08.15

이 환경변수(environment variable)을 이용해 shared library 참조

 

$ export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:export LD_LIBRARY_PATH=${LD_LIBRARY_PATH}:/opt/nvidia/deepstream/deepstream-6.1/lib

이 설정은 터미널이 닫히면 사라진다.

따라서, "~/.bashrc" 파일을 직접 수정해 줘야 함

 

.bashrc

별칭(alias)과 bash가 수행될 때 실행되는 함수를 제어하는 지역적인 시스템 설정과 관련된 파일

모든 프로그램이 실행되기 전에 수행됨

적당한 위치에 LD_LIBRARY_PATH 설정문을 넣어둔다.

 

$ nano ~/.bashrc
...
export LD_LIBRARY_PATH=${LD_LIBRARY_PATH}:/opt/nvidia/deepstream/deepstream-6.1/lib
...

 

ldconfig

기본 설정 파일은 /etc/ld.so.conf

파일 내용은 아래와 같다.

include /etc/ld.so.conf.d/*.conf

추가하려는 경로는 ld.so.conf.d 디렉토리 안에 파일을 생성해서 넣으면 된다.

 

'OS > Linux' 카테고리의 다른 글

Linux Shell - IO Redirections  (0) 2023.08.09
Linux Shell Script  (0) 2023.08.09
CUDA 11.7.1 on WSL2  (0) 2022.11.13
Fastest way to check if a file exists  (0) 2022.11.10
Install libjpeg-turbo  (0) 2022.11.06

+ Recent posts