ASP.NET Core 7 / Blazor Server App / Dockerfile

 

GitHub의 qiime2 아래 linux-worker-docker 프로젝트를 참고한다.

https://github.com/qiime2/linux-worker-docker

 

GitHub - qiime2/linux-worker-docker

Contribute to qiime2/linux-worker-docker development by creating an account on GitHub.

github.com

위 프로젝트의 Dockerfile 내용을 Blazor Server App의 Dockerfile 에 추가한다.

#See https://aka.ms/customizecontainer to learn how to customize your debug container
# and how Visual Studio uses this Dockerfile to build your images for faster debugging.

FROM mcr.microsoft.com/dotnet/aspnet:7.0 AS base

WORKDIR /app
EXPOSE 80
EXPOSE 443

# Locale for click
ENV LC_ALL C.UTF-8
ENV LANG C.UTF-8

# Utilities
RUN apt-get update -q
RUN apt-get install -yq wget unzip bzip2 git build-essential

# Install conda
RUN wget -q https://repo.continuum.io/miniconda/Miniconda3-latest-Linux-x86_64.sh -O /tmp/miniconda3.sh
RUN /bin/bash /tmp/miniconda3.sh -bp /opt/miniconda3
RUN rm /tmp/miniconda3.sh

# Update conda and install conda-build
RUN /opt/miniconda3/bin/conda update -yq conda
RUN /opt/miniconda3/bin/conda install -yq conda-build wget

RUN wget -q https://data.qiime2.org/distro/core/qiime2-2023.5-py38-linux-conda.yml
RUN /opt/miniconda3/bin/conda env create -yq -n qiime2-2023.5 --file qiime2-2023.5-py38-linux-conda.yml

# Install any other goodies
#RUN /opt/miniconda3/bin/conda run pip install -q https://github.com/qiime2/q2lint/archive/master.zip
#RUN /opt/miniconda3/bin/conda install -yq -c conda-forge nodejs

# Set conda environment
RUN echo "export PATH=/opt/miniconda3/bin:$PATH" > /etc/profile
ENV PATH /opt/miniconda3/bin:$PATH


FROM mcr.microsoft.com/dotnet/sdk:7.0 AS build
WORKDIR /src
COPY ["TestBlazorServerApp/TestBlazorServerApp.csproj", "TestBlazorServerApp/"]
RUN dotnet restore "TestBlazorServerApp/TestBlazorServerApp.csproj"
COPY . .
WORKDIR "/src/TestBlazorServerApp"
RUN dotnet build "TestBlazorServerApp.csproj" -c Release -o /app/build

FROM build AS publish
RUN dotnet publish "TestBlazorServerApp.csproj" -c Release -o /app/publish /p:UseAppHost=false

FROM base AS final
WORKDIR /app
COPY --from=publish /app/publish .
ENTRYPOINT ["dotnet", "TestBlazorServerApp.dll"]

 

'BIO' 카테고리의 다른 글

C#에서 Linux 환경에 설치된 QIIME 2 실행하기  (0) 2023.08.02
FASTQ format in QIIME 2  (0) 2023.08.01
Installing the QIIME 2 Core 2023.5 distribution using WSL  (0) 2023.07.31
QIIME 2 Core concepts  (0) 2023.07.31
FASTAQ  (0) 2023.07.31

https://www.tutorialspoint.com/unix/unix-io-redirections.htm

 

Unix / Linux - Shell Input/Output Redirections

Unix Linux Shell Input Output Redirections - In this chapter, we will discuss in detail about the Shell input/output redirections. Most Unix system commands take input from your terminal and send the resulting output back to your terminal. A command normal

www.tutorialspoint.com

Output Redirection

$ who > users
$ cat users
user	tty01	Sep 12 07:30
:

Example

$ echo line 1 > lines
$ cat lines
line 1
$

$ echo line 2 >> lines
$ cat lines
line 1
line 2
$

 

Input Redirection

The commands that normally take their input from the standard input can have their input redirected from a file in this manner.

For example, to count the number of lines in the file lines generated above,
you can execute the command as follows -

$ wc -l lines
2 lines
$

$ wc -l < lines
2
$

$ wc -l << EOF
> This is a simple lookup program
> for good (and bad) restaurants
> in Cape Town.
> EOF
3
$

 

Here Document

A here document is used to redirect input into an interactive shell script or program.

We can run an interactive program within a shell script without user action by supplying the required input for the interactive program, or interactive shell script.

The general form for a here document is -

command << delimiter
document
delimiter

 

Here the shell interprets the << operator as an instruction to read input until it finds a line containing the specified delimiter. All the input lines up to the line containing the delimiter are then fed into the standard input of the command.

 

The delimiter tells the shell that the here document has completed.

Without it, the shell continues to read the input forever.

The delimiter must be a single word that does not contain spaces or tabs.

 

Follwing is the input to the command wc -l to count the total number of lines -

$ wc -l << EOF
> This is a simple lookup program
> for good (and bad) restaurants
> in Cape Town.
> EOF
3
$

You can use the here document to print multiple lines using your script as follows -

#!/bin/sh

cat << EOF
This is a simple lookup program 
for good (and bad) restaurants
in Cape Town.
EOF

Result

This is a simple lookup program
for good (and bad) restaurants
in Cape Town.

 

Discard the output

Sometimes you will need to execute a command, but you don't want the output displayed on the screen.

In such cases, you can discard the output by redirecting it to the file /dev/null -

$ command > /dev/null

The file /dev/null is a special file that automatically discards all its input.

 

To discard both output of a command and its error output,
use standard redirection to redirect STDERR to STDOUT -

$ command > /dev/null 2>&1

Here 2 represents STDERR and 1 represents STDOUT.

 

You can display a message on to STDERR by redirecting STDOUT into STDERR as follows

$ echo message 1>&2

 

Redirection Commands

Sequence Command Description
1 pgm > file Output of pgm is redirected to file
2 pgm >> file Output of pgm is appeded to file
3 pgm < file Program pgm read its input from file
4 n > file Output from stream with descriptor n redirected to file
5 n >> file Output from stream with descriptor n appended to file
6 n >& m Merges output from stream n with stream m
7 n <& m Merges input from stream n with stream m
8 << tag Standard input comes from here through next tag at the start of file
9 | Takes output from one program, or process, and sends it to another

the file descriptor

  • 0 = normally standard input (STDIN)
  • 1 = standard output (STDOUT)
  • 2 = standard error output (STDERR)

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

Linux Shell Script  (0) 2023.08.09
LD_LIBRARY_PATH  (0) 2022.12.21
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

에https://www.tutorialspoint.com/unix/shell_scripting.htm

 

Shell Scripting Tutorial

Shell Scripting Tutorial - A shell script is a computer program designed to be run by the Unix/Linux shell which could be one of the following:

www.tutorialspoint.com

 

기본 구조

파일명: test.sh

#!/bin/sh

echo "Hello, World"
  • 확장자: .sh
  • 첫 번째 행에 해당 쉘 명시
    • #!bin/sh
    • #!bin/bash
  • 쉘 스크립트 파일을 실행시키려면 실행 권한을 줘야 함
$ chmod 755 test.sh

실행

$ ./test.sh
or
$ sh test.sh
or
$ bash test.sh

 

기본 문법

주석(comment)

#으로 시작

 

입력/출력

  • 입력: read
  • 출력: echo
#!/bin/sh

read NAME
echo "Hello, $NAME!"

결과

$ ./test.sh
dozob
Hello, dozob!

 

※ Tip

Bash에서는 -e 플래그로 특수 문자를 escape 할 수 있음

#!bin/bash

echon -e "Hello\n$NAME!"	# 개행('\n')됨

 

Variables

  • 변수 이름으로 영문자, 숫자, 언더바('_') 사용
  • 변수에 값을 할당할 때 '='의 앞뒤에 공백이 없어야 함
  • 문자열인 경우 쌍따옴표(")로 감싸야 함
  • 변수를 사용할 때는 앞에 $를 붙임, 변수는 {}로 감쌀 수 있음
  • readonly 키워드를 앞에 붙여 읽기 전용 변수를 정의할 수 있음
  • 변수 삭제는 unset으로 가능하나 readonly 변수는 삭제 못함
#!/bin/sh

var1=1234
var2="text"

echo "var2=$var2"

readonly var3="initialized readonly variable"
var3="try to assign readonly variable"

unset var2

결과

$ ./test.sh
var2=text
./test.sh: 9: var3: is read only

 

Special Variables

변수 기능
$0 스크립트명
$1 ~ $9 N번째 인수
$# 스크립트에 전달된 인수 개수
$* 모든 인수를 모아 하나로 처리
$@ 모든 인수를 각각 처리
$? 직전에 실행한 명령(command)의 종료 값
(성공: 0, 실패: 1)
$$ 쉘 스크립트의 프로세스 ID
$! 마지막으로 실행한 백그라운드 프로세스 ID

 

Metacharacters (특수 문자)

* ? [ ] ' " \ $ ; & ( ) | ^ < > new-line space tab

문자열 내에 쓰일 때는 '\'를 앞에 붙여야 함

Sequence Quoting Description
1 Single quote All special characters between these quotes lose their special meaning.
2 Double quote Most special characters between these quotes lose their special meaning
with these exceptions -
 - $, `, \$, \', \", \\
3 Backslash Any character immediately following the backslash loses its special meaning.
4 Back quote Anything in between back quotes would be treated as a command and would be executed.

Example

#!/bin/bash

echo <-$1500.**>; (update?) [y|n]
# -bash: syntax error near unexpected token `;'
echo \<-\$1500.\*\*\>\; \(update\?\) \[y\|n\]
echo '<-$1500.**>; (update?) [y|n]'

echo 'It\'s Shell Programming
# It\s Shell Programming

echo 'It\'s Shell Programming'
# Syntax error: Unterminated quoted string

VAR=ZARA
echo "$VAR owes <-\$1500.**>; [ as of (`date +%m/%d`) ]"
# ZARA owes <-$1500.**>; [ as of (07/02) ]

 

변수 값의 치환

문법 설명
${var} 변수 값으로 치환
${var:-word} if var is null or unset, word is substitued for var.
The value of var does not change.
${var:=word} if var is null or unset, var is set to the value of word.
${var:+word} if var is set, word is substituted for var.
The value of var does not change.
${var:?message} If var is null or unset, message is printed to standard error.
This checks that variables are set correctly.
#/bin/sh

echo "1. \${var:-default value1}: \"${var:-default value1}\", var=${var}"
echo "2. \${var:=default value2}: \"${var:=default value2}\", var=${var}"

var="assigned value"
echo "var=\"assigned value\""
echo "3. \${var:+default value3}: \"${var:+default value3}\", var=${var}"
echo "4. \${var:?default value4}: \"${var:?default value4}\", var=${var}"

unset var
echo "unset var"
echo "5. \${var:+default value5}: \"${var:+default value5}\", var=${var}"
echo "6. \${var:?default value6}:"
echo " \"${var:?default value6}\", var=${var}"

결과

$ ./test.sh
1. ${var:-default value1}: "default value1", var=
2. ${var:=default value2}: "default value2", var=default value2
var="assigned value"
3. ${var:+default value3}: "default value3", var=assigned value
4. ${var:?default value4}: "assigned value", var=assigned value
unset var
5. ${var:+default value5}: "", var=
6. ${var:?default value6}:
./test.sh: line 15: var: default value6

 

Arrays

#!/bin/bash

# bash shell
ARRAY=(item item2 item3 item4)
ARRAY[0]="ITEM1"
ARRAY[2]="ITEM3"

echo "ARRAY[0]: ${ARRAY[0]}"
echo "ARRAY[2]: ${ARRAY[2]}"

echo "ARRAY[*]: ${ARRAY[*]}"
echo "ARRAY[@]: ${ARRAY[@]}"

결과

$ ./test.sh
ARRAY[0]: ITEM1
ARRAY[2]: ITEM3
ARRAY[*]: ITEM1 item2 ITEM3 item4
ARRAY[@]: ITEM1 item2 ITEM3 item4

 

Arithmetic Operators

Operator Description Example: a=10, b=20
+ Addition echo `expr $a + $b` → 30
- Substraction echo `expr $a - $b` → -10
\* (Multiplication) Multiplies values on either side of the operator echo `expr $a \* $b` → 200
/ (Division) Divide left hand operand by right hand operand echo `expr $b / $a` → 2
% (Modulus) evide left hand operand by right hand operand and returns remainder expr `expr $b % $a` → 0
= (Assignment) Aissigns right operand in left operand a=$b
== (Equality) Compares two numbers,
if both are same then returns true.
[ $a == $b ] → false
!= (Not Equality) Compares two numbers,
if both are different then return true.
[ $a != $b ] → true

※ Tip

for example, [ $a == $b ] is correct

whereas, [$a==$b] is incorrect

 

 

Relational / Boolean / String Operators

Operator Description Example
-eq equal [ $a -eq $b ]
-ne not equal [ $a -ne $b ]
-gt greater than [ $a -gt $b ]
-lt less than [ $a -lt $b ]
-ge greater than or equal to [ $a -ge $b ]
-le less than or equal to [ $a -le $b ]
Boolean Operators
! logical negation [ ! false ] → true
-o logical OR [ $a -lt 20 -o $b -gt 100 ] → true
-a logical AND [ $a -lt 20 $b -gt 100 ] → false
String Operators
= equal [ $a = $b ] → not true.
!= not equal [ $a != $b ] → true
-z Checks if the given string operand size is zero;
if it is zero length, then is returns true.
[ -z $a ] → not ture
-n Checks if the given string operand size is non-zero;
if it is nonzero length, then it returns true.
[ -n $a ] → not false
str Checks if str is not the empty string;
if it is empty, then it returns false.
[ $a ] → not false.

 

File Test Operators

Assume a variable file holds an existing file name "test" the size of which is 100 bytes and has read, write and execute permission on -

Operator Description: Checks if file ~ Example
-e file file exists; is true even if file is a directory but exists. [ -e $file ] → true
-s file file has size greater then 0 [ -s $file ] → true
     
-b file block special file [ -b $file ] → false
-c file character special file [ -c $file ] → false
-d file directory [ -d $file ] → not true
-p file named pipe [ -p $file ] → false
-f file an ordinary file as opposed to a directory or special file [ -f $file ] → true
-t file file descriptor is open and associated with a terminal [ -t $file ] → false
     
-g file has its Set Group ID (SGID) bit set [ -g $file ] → false
-k file has its Sticky bit set [ -k $file ] → false
-u file has its Set User ID (SUID) bit set [ -u $file ] → false
     
-r file readable [ -r $file ] → true
-w file writable [ -w $file ] → true
-x file executable [ -x $file ] → true

 

Decision Making

if ... else

  • if ... fi
  • if ... else ... fi
  • if ... elif ... else ... fi

 

case ... esac

  • case ... esac

case VARIABLE in CONDITION/VALUE) Command ;; esac

#!/bin/sh

DRINK="coffee"
case "$DRINK" in
    "beer") echo "맥주"
    ;;
    "juice") echo "주스"
    ;;
    "coffee") echo "커피"
    ;;
esac

 

 

Loops

  • while
  • for
  • until
  • select
while command1 ;	# this is loop1, the outer loop
do
    Statement(s) to be executed if command1 is true
    
    while command2 ;	# this is loop2, the inner loop
    do
        Statement(s) to be executed if command2 is ture
    done
    
    Statements(s) to be executed if command1 is true
done

 

Example

#!/bin/sh

a=0
while [ "$a" -lt 10 ]	# this is loop1
#until [ "$a" -ge 10 ]
do
    b="$a"
    
    while [ "$b" -ge 0 ]	# this is loop2
    #until [ "$b" -lt 0 ]
    do
        echo -n "$b "		# -n option lets echo avoid printing a new line character
        b=`expr $b - 1`
    done
    
    echo
    
    a=`expr $a + 1`
done

Result

0
1 0
2 1 0
3 2 1 0
4 3 2 1 0
5 4 3 2 1 0
6 5 4 3 2 1 0
7 6 5 4 3 2 1 0
8 7 6 5 4 3 2 1 0
9 8 7 6 5 4 3 2 1 0

 

Example

#!/bin/sh

for var1 in 1 2 3
do
   for var2 in 0 5
   do
      if [ $var1 -eq 2 -a $var2 -eq 0 ]
      then
         break 2
      else
         echo "$var1 $var2"
      fi
   done
done

Result

1 0
1 5

 

Example

#!/bin/sh

NUMS="1 2 3 4 5 6 7"

for NUM in $NUMS
do
   Q=`expr $NUM % 2`
   if [ $Q -eq 0 ]
   then
      echo "$NUM: Number is an even number!"
      continue
   fi
   echo "$NUM: Found odd number"
done

bash

#!/bin/bash

# using array
NUMS=(1 2 3 4 5 6 7)

for NUM in ${NUMS[*]}
do
   Q=`expr $NUM % 2`
   if [ $Q -eq 0 ]
   then
      echo "$NUM: Number is an even number!"
      continue
   fi
   echo "$NUM: Found odd number"
done

 

Result

1: Found odd number
2: Number is an even number!!
3: Found odd number
4: Number is an even number!!
5: Found odd number
6: Number is an even number!!
7: Found odd number

 

Substitution

Sequence Escape Description
1 \\ backslash
2 \a alert (BEL)
3 \b backspace
4 \c suppress trailing newline
5 \f form feed
6 \n new line
7 \r carriage return
8 \t horizontal tab
9 \v vertical tab

You can use the -E option to disable the interpretation of the backslash escapes (default).

You can use the -e option to enable the interpretation of the backslash escapes.

You can use the -n option to disable the insertion of a new line.

 

Command Substitution

Command substitution is the mechanism by which the shell performs a given set of commands

and then substitues their output in the place of the commands.

Syntax

`command`

When performing the command substitution make sure that you use the backquote, not the single quote character.

 

Example

#!/bin/sh

DATE=`date`
echo "Date is $DATE"

USERS=`who | wc -l`
echo "Logged in user are $USERS"

UP=`date ; uptime`
echo "Uptime is $UP"

Result

Date is Wed Aug  9 16:54:06 KST 2023
Logged in user are 0
Uptime is Wed Aug  9 16:54:06 KST 2023
 16:54:06 up 10 days, 14:15,  0 users,  load average: 0.03, 0.01, 0.00

 

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

Linux Shell - IO Redirections  (0) 2023.08.09
LD_LIBRARY_PATH  (0) 2022.12.21
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

Linux 상에서 bash 쉘 실행하기

public static class ShellHelper
{
    public static ShellOutput Bash(this string cmd, string sWorkingDir)
    {
        var sEscapedArgs = cmd.Replace("\"", "\\\"");
        var process = new Process
        {
            StartInfo = new ProcessStartInfo
            {
                FileName = "/bin/bash",
                Arguments = $"-c \"{sEscapedArgs}\"",
                RedirectStandardOutput = true,
                RedirectStandardError = true,
                UseShellExecute = false,
                CreateNoWindow = true,
                WorkingDirectory = sWorkingDir
            }
        };

        ShellOutput rv = null;
        try
        {
            process.Start();
            process.WaitForExit();

            rv = new ShellOutput(process);
        }
        catch (Exception ex)
        {
            rv = new ShellOutput(null, ex);
            LogEx.Logger.LogError(ex, nameof(ShellHelper));
        }
        return rv;
    }
}

public class ShellOutput
{
    public ShellOutput(Process process, Exception ex = null)
    {
        this.Process = process;
        m_sStdErr = ex?.Message;
    }

    #region Fields

    string m_sStdOut;
    string m_sStdErr;

    #endregion Fields

    public Process Process { get; }

    public bool IsSuccessful => this.Process?.ExitCode == 0;

    public string StdOutText => m_sStdOut ??= this.Process?.StandardOutput.ReadToEnd();

    public string StdErrText => m_sStdErr ??= this.Process?.StandardError.ReadToEnd();
}

 

qiime 2가 설치된 Python 가상환경에서 실행시키기 위한 스크립트 작성

#!/bin/bash

_CONDA_ROOT="/home/user/miniconda3"

export PATH=$_CONDA_ROOT/bin:$_CONDA_ROOT/condabin

source $_CONDA_ROOT/etc/profile.d/conda.sh

#echo conda activate qiime2-2023.5
conda activate qiime2-2023.5

if [ $# == 0 ]
then
    qiime info
then
    qiime $*
fi

#echo conda deactivate
conda deactivate

 

 

qiime 실행하고 결과 받기

string sResult = "Running...";
var rv = ShellHelper.Bash("~/qiime2/q2run.sh info", null);
//var rv = ShellHelper.Bash("~/qiime2/q2run.sh tools list-types", null);
//var rv = ShellHelper.Bash("~/qiime2/q2run.sh tools list-formats", null);
if (rv.IsSuccessful)
{
    sResult = rv.StdOutText;
}
else
{
    sResult = rv.StdErrText;
}

 

qiime 2가 설치된 Python 가상환경에서 여러 명령을 수행하는 스크립트

q2env.sh

#!/bin/bash

_CONDA_ROOT="/home/user/miniconda3"

export PATH=$_CONDA_ROOT/bin:$_CONDA_ROOT/condabin:$PATH

source $_CONDA_ROOT/etc/profile.d/conda.sh

#echo conda activate qiime2-2023.5
conda activate qiime2-2023.5

if [ $# == 0 ]
then
    qiime info
else
    tid=1
    for i
    do
        echo "### q2-task-$tid"
        echo "$i"
        echo ">>>"
        $i
        echo "<<<"
        tid=`expr $tid + 1`
    done
fi

#echo conda deactivate
conda deactivate

Example:

$ ./q2env.sh "qiime info" "qiime tools list-types"
### q2-task-1
qiime info
>>>
System versions
:
<<<
### q2-task-2
qiime tools list-types
>>>
Bowtie2Index
        No description
:
<<<
$

'BIO' 카테고리의 다른 글

ASP.NET Core Dockerfile에 QIIME 2 환경 추가하기  (0) 2023.08.11
FASTQ format in QIIME 2  (0) 2023.08.01
Installing the QIIME 2 Core 2023.5 distribution using WSL  (0) 2023.07.31
QIIME 2 Core concepts  (0) 2023.07.31
FASTAQ  (0) 2023.07.31

qiime tools

(qiime2-2023.5) user@user-DT:~/qiime2$ qiime tools --help
Usage: qiime tools [OPTIONS] COMMAND [ARGS]...

  Tools for working with QIIME 2 files.

Options:
  --help      Show this message and exit.

Commands:
  cache-create              Create an empty cache at the given location.
  cache-fetch               Fetches an artifact out of a cache into a .qza.
  cache-garbage-collection  Runs garbage collection on the cache at the
                            specified location.
  cache-remove              Removes a given key from a cache.
  cache-status              Checks the status of the cache.
  cache-store               Stores a .qza in the cache under a key.
  cast-metadata             Designate metadata column types.
  citations                 Print citations for a QIIME 2 result.
  export                    Export data from a QIIME 2 Artifact or a
                            Visualization
  extract                   Extract a QIIME 2 Artifact or Visualization
                            archive.
  import                    Import data into a new QIIME 2 Artifact.
  inspect-metadata          Inspect columns available in metadata.
  list-formats              List the available formats.
  list-types                List the available semantic types.
  peek                      Take a peek at a QIIME 2 Artifact or
                            Visualization.
  validate                  Validate data in a QIIME 2 Artifact.
  view                      View a QIIME 2 Visualization.
  • export
  • import
  • list-formats
  • list-types

 

qiime tools list-types

(qiime2-2023.5) user@user-DT:~/qiime2$ qiime tools list-types
Bowtie2Index
        No description

DeblurStats
        No description

DistanceMatrix
        A symmetric matrix representing distances between entities.

EMPPairedEndSequences
        No description

EMPSingleEndSequences
        No description

ErrorCorrectionDetails
        No description

FeatureData[AlignedProteinSequence]
        Aligned protein sequences associated with a set of feature
        identifiers. Exactly one sequence is associated with each
        feature identfiier.

FeatureData[AlignedRNASequence]
        Aligned RNA sequences associated with a set of feature
        identifiers. Exactly one sequence is associated with each
        feature identfiier.

FeatureData[AlignedSequence]
        Aligned DNA sequences associated with a set of feature
        identifiers (e.g., aligned ASV sequences or OTU representative
        sequence). Exactly one sequence is associated with each feature
        identfiier.

FeatureData[BLAST6]
        BLAST results associated with a set of feature identifiers.

FeatureData[DecontamScore]
        No description

FeatureData[DifferentialAbundance]
        No description

FeatureData[Differential]
        No description

FeatureData[Importance]
        No description

FeatureData[PairedEndRNASequence]
        No description

FeatureData[PairedEndSequence]
        No description

FeatureData[ProteinSequence]
        Unaligned protein sequences associated with a set of feature
        identifiers. Exactly one sequence is associated with each
        feature identfiier.

FeatureData[RNASequence]
        Unaligned RNA sequences associated with a set of feature
        identifiers. Exactly one sequence is associated with each
        feature identfiier.

FeatureData[Sequence]
        Unaligned DNA sequences associated with a set of feature
        identifiers (e.g., ASV sequences or OTU representative
        sequence). Exactly one sequence is associated with each feature
        identfiier.

FeatureData[Taxonomy]
        Hierarchical metadata or annotations associated with a set of
        features. This can contain one or more hierarchical levels, and
        annotations can be anything (e.g., taxonomy of organisms,
        functional categorization of gene families, ...) as long as it
        is strictly hierarchical.

FeatureTable[Balance]
        No description

FeatureTable[Composition]
        A feature table (e.g., samples by ASVs) where each value in the
        matrix is a whole number greater than 0 representing the
        frequency or count of a feature in the corresponding sample.
        These data are typically not raw counts, having been
        transformed in some way to exclude zero counts.

FeatureTable[Design]
        No description

FeatureTable[Frequency]
        A feature table (e.g., samples by ASVs) where each value in the
        matrix is a whole number greater than or equal to 0
        representing the frequency or count of a feature in the
        corresponding sample. These data should be raw (not normalized)
        counts.

FeatureTable[PercentileNormalized]
        No description

FeatureTable[PresenceAbsence]
        A feature table (e.g., samples by ASVs) where each value
        indicates is a boolean indication of whether the feature is
        observed in the sample or not.

FeatureTable[RelativeFrequency]
        A feature table (e.g., samples by ASVs) where each value in the
        matrix is a real number greater than or equal to 0.0 and less
        than or equal to 1.0 representing the proportion of the sample
        that is composed of that feature. The feature values for each
        sample should sum to 1.0.

Hierarchy
        No description

ImmutableMetadata
        Immutable sample or feature metadata.

MultiplexedPairedEndBarcodeInSequence
        Multiplexed sequences (i.e., representing multiple difference
        samples), which are paired-end reads, and which contain the
        barcode (i.e., index) indicating the source sample as part of
        the sequence read.

MultiplexedSingleEndBarcodeInSequence
        Multiplexed sequences (i.e., representing multiple difference
        samples), which are single-end reads, and which contain the
        barcode (i.e., index) indicating the source sample as part of
        the sequence read.

PCoAResults
        The results of running principal coordinate analysis (PCoA).

Phylogeny[Rooted]
        A phylogenetic tree containing a defined root.

Phylogeny[Unrooted]
        A phylogenetic tree not containing a defined root.

Placements
        No description

ProcrustesStatistics
        The results of running Procrustes analysis.

QualityFilterStats
        No description

RawSequences
        No description

SampleData[AlphaDiversity]
        Alpha diversity values, each associated with a single sample
        identifier.

SampleData[ArtificialGrouping]
        No description

SampleData[BooleanSeries]
        No description

SampleData[ClassifierPredictions]
        No description

SampleData[DADA2Stats]
        No description

SampleData[FirstDifferences]
        No description

SampleData[JoinedSequencesWithQuality]
        Collections of joined paired-end sequences with quality scores
        associated with specified samples (i.e., demultiplexed
        sequences).

SampleData[PairedEndSequencesWithQuality]
        Collections of unjoined paired-end sequences with quality
        scores associated with specified samples (i.e., demultiplexed
        sequences).

SampleData[Probabilities]
        No description

SampleData[RegressorPredictions]
        No description

SampleData[SequencesWithQuality]
        Collections of sequences with quality scores associated with
        specified samples (i.e., demultiplexed sequences).

SampleData[Sequences]
        Collections of sequences associated with specified samples
        (i.e., demultiplexed sequences).

SampleData[TrueTargets]
        No description

SampleEstimator[Classifier]
        No description

SampleEstimator[Regressor]
        No description

SeppReferenceDatabase
        No description

TaxonomicClassifier
        No description

UchimeStats
        No description
  • SampleData[PairedEndSequencesWithQuality]
    • Collections of unjoined paired-end sequences with quality scores
      associated with specified samples (i.e., demultiplexed sequences).

 

qiime tools list-formats --importable / --exportable

(qiime2-2023.5) user@user-DT:~/qiime2$ qiime tools list-formats --importable
AlignedDNAFASTAFormat
        No description

AlignedDNASequencesDirectoryFormat
        No description

AlignedProteinFASTAFormat
        No description

AlignedProteinSequencesDirectoryFormat
        No description

AlignedRNAFASTAFormat
        No description

AlignedRNASequencesDirectoryFormat
        No description

AlphaDiversityDirectoryFormat
        No description

AlphaDiversityFormat
        No description

ArtificialGroupingDirectoryFormat
        No description

ArtificialGroupingFormat
        No description

BIOMV100DirFmt
        No description

BIOMV100Format
        No description

BIOMV210DirFmt
        No description

BIOMV210Format
        No description

BLAST6DirectoryFormat
        No description

BLAST6Format
        No description

BooleanSeriesDirectoryFormat
        No description

BooleanSeriesFormat
        No description

Bowtie2IndexDirFmt
        No description

CasavaOneEightLanelessPerSampleDirFmt
        No description

CasavaOneEightSingleLanePerSampleDirFmt
        No description

DADA2StatsDirFmt
        No description

DADA2StatsFormat
        No description

DNAFASTAFormat
        No description

DNASequencesDirectoryFormat
        No description

DataLoafPackageDirFmt
        No description

DeblurStatsDirFmt
        No description

DeblurStatsFmt
        No description

DecontamScoreDirFmt
        No description

DecontamScoreFormat
        No description

DifferentialDirectoryFormat
        No description

DifferentialFormat
        No description

DistanceMatrixDirectoryFormat
        No description

EMPPairedEndCasavaDirFmt
        No description

EMPPairedEndDirFmt
        No description

EMPSingleEndCasavaDirFmt
        No description

EMPSingleEndDirFmt
        No description

ErrorCorrectionDetailsDirFmt
        No description

FastqGzFormat
        A gzipped fastq file.

FirstDifferencesDirectoryFormat
        No description

FirstDifferencesFormat
        No description

HeaderlessTSVTaxonomyDirectoryFormat
        No description

HeaderlessTSVTaxonomyFormat
        Format for a 2+ column TSV file without a header.

ImmutableMetadataDirectoryFormat
        No description

ImmutableMetadataFormat
        No description

ImportanceDirectoryFormat
        No description

ImportanceFormat
        No description

LSMatFormat
        No description

MixedCaseAlignedDNAFASTAFormat
        No description

MixedCaseAlignedDNASequencesDirectoryFormat
        No description

MixedCaseAlignedRNAFASTAFormat
        No description

MixedCaseAlignedRNASequencesDirectoryFormat
        No description

MixedCaseDNAFASTAFormat
        No description

MixedCaseDNASequencesDirectoryFormat
        No description

MixedCaseRNAFASTAFormat
        No description

MixedCaseRNASequencesDirectoryFormat
        No description

MultiplexedFastaQualDirFmt
        No description

MultiplexedPairedEndBarcodeInSequenceDirFmt
        No description

MultiplexedSingleEndBarcodeInSequenceDirFmt
        No description

NewickDirectoryFormat
        No description

NewickFormat
        No description

OrdinationDirectoryFormat
        No description

OrdinationFormat
        No description

PairedDNASequencesDirectoryFormat
        No description

PairedEndFastqManifestPhred33
        No description

PairedEndFastqManifestPhred33V2
        No description

PairedEndFastqManifestPhred64
        No description

PairedEndFastqManifestPhred64V2
        No description

PairedRNASequencesDirectoryFormat
        No description

PlacementsDirFmt
        No description

PlacementsFormat
        No description

PredictionsDirectoryFormat
        No description

PredictionsFormat
        No description

ProbabilitiesDirectoryFormat
        No description

ProbabilitiesFormat
        No description

ProcrustesStatisticsDirFmt
        No description

ProcrustesStatisticsFmt
        No description

ProteinFASTAFormat
        No description

ProteinSequencesDirectoryFormat
        No description

QIIME1DemuxDirFmt
        No description

QIIME1DemuxFormat
        QIIME 1 demultiplexed FASTA format.

QualityFilterStatsDirFmt
        No description

QualityFilterStatsFmt
        No description

RNAFASTAFormat
        No description

RNASequencesDirectoryFormat
        No description

SampleEstimatorDirFmt
        No description

SampleIdIndexedSingleEndPerSampleDirFmt
        Single-end reads in fastq.gz files where base filename is the
        sample id

SeppReferenceDirFmt
        No description

SingleEndFastqManifestPhred33
        No description

SingleEndFastqManifestPhred33V2
        No description

SingleEndFastqManifestPhred64
        No description

SingleEndFastqManifestPhred64V2
        No description

SingleLanePerSamplePairedEndFastqDirFmt
        No description

SingleLanePerSampleSingleEndFastqDirFmt
        No description

TSVTaxonomyDirectoryFormat
        No description

TSVTaxonomyFormat
        Format for a 2+ column TSV file with an expected minimal
        header.

TaxonomicClassiferTemporaryPickleDirFmt
        No description

TrueTargetsDirectoryFormat
        No description

UchimeStatsDirFmt
        No description

UchimeStatsFmt
        No description
  • PairedEndFastqManifestPhred33V2

 

qiime tools import

(qiime2-2023.5) user@user-DT:~/qiime2$ qiime tools import --help
Usage: qiime tools import [OPTIONS]

  Import data to create a new QIIME 2 Artifact. See https://docs.qiime2.org/
  for usage examples and details on the file types and associated semantic
  types that can be imported.

Options:
  --type TEXT             The semantic type of the artifact that will be
                          created upon importing. Use --show-importable-types
                          to see what importable semantic types are available
                          in the current deployment.                [required]
  --input-path PATH       Path to file or directory that should be imported.
                                                                    [required]
  --output-path ARTIFACT  Path where output artifact should be written.
                                                                    [required]
  --input-format TEXT     The format of the data to be imported. If not
                          provided, data must be in the format expected by the
                          semantic type provided via --type.
  --show-importable-types Show the semantic types that can be supplied to
                          --type to import data into an artifact.
  --show-importable-formats
                          Show formats that can be supplied to --input-format
                          to import data into an artifact.
  --help                  Show this message and exit.

 

$ qiime tools import \
    --type 'SampleData[PairedEndSequencesWithQuality]' \
    --input-path sample-metadata.tsv \
    --input-format PairedEndFastqManifestPhred33V2 \
    --output-path demux-paired-end.qza

 

qiime demux summarize

(qiime2-2023.5) user@user-DT:~/qiime2$ qiime demux summarize --help
Usage: qiime demux summarize [OPTIONS]

  Summarize counts per sample for all samples, and generate interactive
  positional quality plots based on `n` randomly selected sequences.

Inputs:
  --i-data ARTIFACT SampleData[SequencesWithQuality |
    PairedEndSequencesWithQuality | JoinedSequencesWithQuality]
                       The demultiplexed sequences to be summarized.
                                                                    [required]
Parameters:
  --p-n INTEGER        The number of sequences that should be selected at
                       random for quality score plots. The quality plots will
                       present the average positional qualities across all of
                       the sequences selected. If input sequences are paired
                       end, plots will be generated for both forward and
                       reverse reads for the same `n` sequences.
                                                              [default: 10000]
Outputs:
  --o-visualization VISUALIZATION
                                                                    [required]
Miscellaneous:
  --output-dir PATH    Output unspecified results to a directory
  --verbose / --quiet  Display verbose output to stdout and/or stderr during
                       execution of this action. Or silence output if
                       execution is successful (silence is golden).
  --example-data PATH  Write example data and exit.
  --citations          Show citations and exit.
  --help               Show this message and exit.

Examples:
  # ### example: demux
  qiime demux summarize \
    --i-data demux.qza \
    --o-visualization visualization.qzv

 

$ qiime demux summarize \
    --i-data demux-paired-end.qza \
    --o-visualization demux-paried-end.qzv

 

 

qiime dada2 denoise-paired

(qiime2-2023.5) user@user-DT:~/qiime2$ qiime dada2 denoise-paired --help
Usage: qiime dada2 denoise-paired [OPTIONS]

  This method denoises paired-end sequences, dereplicates them, and filters
  chimeras.

Inputs:
  --i-demultiplexed-seqs ARTIFACT SampleData[PairedEndSequencesWithQuality]
                         The paired-end demultiplexed sequences to be
                         denoised.                                  [required]
Parameters:
  --p-trunc-len-f INTEGER
                         Position at which forward read sequences should be
                         truncated due to decrease in quality. This truncates
                         the 3' end of the of the input sequences, which will
                         be the bases that were sequenced in the last cycles.
                         Reads that are shorter than this value will be
                         discarded. After this parameter is applied there must
                         still be at least a 12 nucleotide overlap between the
                         forward and reverse reads. If 0 is provided, no
                         truncation or length filtering will be performed
                                                                    [required]
  --p-trunc-len-r INTEGER
                         Position at which reverse read sequences should be
                         truncated due to decrease in quality. This truncates
                         the 3' end of the of the input sequences, which will
                         be the bases that were sequenced in the last cycles.
                         Reads that are shorter than this value will be
                         discarded. After this parameter is applied there must
                         still be at least a 12 nucleotide overlap between the
                         forward and reverse reads. If 0 is provided, no
                         truncation or length filtering will be performed
                                                                    [required]
  --p-trim-left-f INTEGER
                         Position at which forward read sequences should be
                         trimmed due to low quality. This trims the 5' end of
                         the input sequences, which will be the bases that
                         were sequenced in the first cycles.      [default: 0]
  --p-trim-left-r INTEGER
                         Position at which reverse read sequences should be
                         trimmed due to low quality. This trims the 5' end of
                         the input sequences, which will be the bases that
                         were sequenced in the first cycles.      [default: 0]
  --p-max-ee-f NUMBER    Forward reads with number of expected errors higher
                         than this value will be discarded.     [default: 2.0]
  --p-max-ee-r NUMBER    Reverse reads with number of expected errors higher
                         than this value will be discarded.     [default: 2.0]
  --p-trunc-q INTEGER    Reads are truncated at the first instance of a
                         quality score less than or equal to this value. If
                         the resulting read is then shorter than `trunc-len-f`
                         or `trunc-len-r` (depending on the direction of the
                         read) it is discarded.                   [default: 2]
  --p-min-overlap INTEGER
    Range(4, None)       The minimum length of the overlap required for
                         merging the forward and reverse reads.  [default: 12]
  --p-pooling-method TEXT Choices('independent', 'pseudo')
                         The method used to pool samples for denoising.
                         "independent": Samples are denoised indpendently.
                         "pseudo": The pseudo-pooling method is used to
                         approximate pooling of samples. In short, samples are
                         denoised independently once, ASVs detected in at
                         least 2 samples are recorded, and samples are
                         denoised independently a second time, but this time
                         with prior knowledge of the recorded ASVs and thus
                         higher sensitivity to those ASVs.
                                                      [default: 'independent']
  --p-chimera-method TEXT Choices('consensus', 'none', 'pooled')
                         The method used to remove chimeras. "none": No
                         chimera removal is performed. "pooled": All reads are
                         pooled prior to chimera detection. "consensus":
                         Chimeras are detected in samples individually, and
                         sequences found chimeric in a sufficient fraction of
                         samples are removed.           [default: 'consensus']
  --p-min-fold-parent-over-abundance NUMBER
                         The minimum abundance of potential parents of a
                         sequence being tested as chimeric, expressed as a
                         fold-change versus the abundance of the sequence
                         being tested. Values should be greater than or equal
                         to 1 (i.e. parents should be more abundant than the
                         sequence being tested). This parameter has no effect
                         if chimera-method is "none".           [default: 1.0]
  --p-allow-one-off / --p-no-allow-one-off
                         Bimeras that are one-off from exact are also
                         identified if the `allow-one-off` argument is TrueIf
                         True, a sequence will be identified as bimera if it
                         is one mismatch or indel away from an exact bimera.
                                                              [default: False]
  --p-n-threads INTEGER  The number of threads to use for multithreaded
                         processing. If 0 is provided, all available cores
                         will be used.                            [default: 1]
  --p-n-reads-learn INTEGER
                         The number of reads to use when training the error
                         model. Smaller numbers will result in a shorter run
                         time but a less reliable error model.
                                                            [default: 1000000]
  --p-hashed-feature-ids / --p-no-hashed-feature-ids
                         If true, the feature ids in the resulting table will
                         be presented as hashes of the sequences defining each
                         feature. The hash will always be the same for the
                         same sequence so this allows feature tables to be
                         merged across runs of this method. You should only
                         merge tables if the exact same parameters are used
                         for each run.                         [default: True]
Outputs:
  --o-table ARTIFACT FeatureTable[Frequency]
                         The resulting feature table.               [required]
  --o-representative-sequences ARTIFACT FeatureData[Sequence]
                         The resulting feature sequences. Each feature in the
                         feature table will be represented by exactly one
                         sequence, and these sequences will be the joined
                         paired-end sequences.                      [required]
  --o-denoising-stats ARTIFACT SampleData[DADA2Stats]
                                                                    [required]
Miscellaneous:
  --output-dir PATH      Output unspecified results to a directory
  --verbose / --quiet    Display verbose output to stdout and/or stderr
                         during execution of this action. Or silence output if
                         execution is successful (silence is golden).
  --example-data PATH    Write example data and exit.
  --citations            Show citations and exit.
  --help                 Show this message and exit.

Examples:
  # ### example: denoise paired
  qiime dada2 denoise-paired \
    --i-demultiplexed-seqs demux-paired.qza \
    --p-trunc-len-f 150 \
    --p-trunc-len-r 140 \
    --o-representative-sequences representative-sequences.qza \
    --o-table table.qza \
    --o-denoising-stats denoising-stats.qza

 

$ qiime dada2 denoise-paired \
    --i-demultiplexed-seqs demux-paired-end.qza \
    --p-trim-left-f 23 \
    --p-trim-left-r 23 \
    --p-trunc-len-f 240 \
    --p-trunc-len-r 226 \
    --o-representative-sequences rep-seqs-dada2.qza \
    --o-table table-dada2.qza \
    --o-denoising-stats stats-dada2.qza

 

 

qiime metadata tabulate

(qiime2-2023.5) user@user-DT:~/qiime2$ qiime metadata tabulate --help
Usage: qiime metadata tabulate [OPTIONS]

  Generate a tabular view of Metadata. The output visualization supports
  interactive filtering, sorting, and exporting to common file formats.

Parameters:
  --m-input-file METADATA...
    (multiple            The metadata to tabulate.
     arguments will be
     merged)                                                        [required]
  --p-page-size INTEGER  The maximum number of Metadata records to display
                         per page                               [default: 100]
Outputs:
  --o-visualization VISUALIZATION
                                                                    [required]
Miscellaneous:
  --output-dir PATH      Output unspecified results to a directory
  --verbose / --quiet    Display verbose output to stdout and/or stderr
                         during execution of this action. Or silence output if
                         execution is successful (silence is golden).
  --example-data PATH    Write example data and exit.
  --citations            Show citations and exit.
  --help                 Show this message and exit.

 

$ qiime metadata tabulate \
    --m-input-file stats-dada2.qza \
    --o-visualization stats-dada2.qzv

 

 

qiime feature-table summarize

(qiime2-2023.5) user@user-DT:~/qiime2$ qiime feature-table summarize --help
Usage: qiime feature-table summarize [OPTIONS]

  Generate visual and tabular summaries of a feature table.

Inputs:
  --i-table ARTIFACT FeatureTable[Frequency | RelativeFrequency |
    PresenceAbsence]   The feature table to be summarized.          [required]
Parameters:
  --m-sample-metadata-file METADATA...
    (multiple          The sample metadata.
     arguments will
     be merged)                                                     [optional]
Outputs:
  --o-visualization VISUALIZATION
                                                                    [required]
Miscellaneous:
  --output-dir PATH    Output unspecified results to a directory
  --verbose / --quiet  Display verbose output to stdout and/or stderr during
                       execution of this action. Or silence output if
                       execution is successful (silence is golden).
  --example-data PATH  Write example data and exit.
  --citations          Show citations and exit.
  --help               Show this message and exit.

Examples:
  # ### example: feature table summarize
  qiime feature-table summarize \
    --i-table feature-table.qza \
    --o-visualization table.qzv

 

$ qiime feature-table summarize \
    --i-table table-dada2.qza \
    --o-visualization table.qzv \
    --m-sample-metadata-file sample-metadata.tsv

 

 

qiime feature-table tabulate-seqs

(qiime2-2023.5) user@user-DT:~/qiime2$ qiime feature-table tabulate-seqs --help
Usage: qiime feature-table tabulate-seqs [OPTIONS]

  Generate tabular view of feature identifier to sequence mapping, including
  links to BLAST each sequence against the NCBI nt database.

Inputs:
  --i-data ARTIFACT FeatureData[Sequence | AlignedSequence]
                       The feature sequences to be tabulated.       [required]
Outputs:
  --o-visualization VISUALIZATION
                                                                    [required]
Miscellaneous:
  --output-dir PATH    Output unspecified results to a directory
  --verbose / --quiet  Display verbose output to stdout and/or stderr during
                       execution of this action. Or silence output if
                       execution is successful (silence is golden).
  --example-data PATH  Write example data and exit.
  --citations          Show citations and exit.
  --help               Show this message and exit.

Examples:
  # ### example: feature table tabulate seqs
  qiime feature-table tabulate-seqs \
    --i-data rep-seqs.qza \
    --o-visualization rep-seqs.qzv

 

$ qiime feature-table tabulate-seqs \
    --i-data rep-seqs-dada2.qza \
    --o-visualization rep-seqs.qzv

 

 

qiime phylogeny align-to-tree-mafft-fasttree

(qiime2-2023.5) user@user-DT:~/qiime2$ qiime phylogeny align-to-tree-mafft-fasttree --help
Usage: qiime phylogeny align-to-tree-mafft-fasttree [OPTIONS]

  This pipeline will start by creating a sequence alignment using MAFFT, after
  which any alignment columns that are phylogenetically uninformative or
  ambiguously aligned will be removed (masked). The resulting masked alignment
  will be used to infer a phylogenetic tree and then subsequently rooted at
  its midpoint. Output files from each step of the pipeline will be saved.
  This includes both the unmasked and masked MAFFT alignment from q2-alignment
  methods, and both the rooted and unrooted phylogenies from q2-phylogeny
  methods.

Inputs:
  --i-sequences ARTIFACT FeatureData[Sequence]
                          The sequences to be used for creating a fasttree
                          based rooted phylogenetic tree.           [required]
Parameters:
  --p-n-threads VALUE Int % Range(1, None) | Str % Choices('auto')
                          The number of threads. (Use `auto` to automatically
                          use all available cores) This value is used when
                          aligning the sequences and creating the tree with
                          fasttree.                               [default: 1]
  --p-mask-max-gap-frequency PROPORTION Range(0, 1, inclusive_end=True)
                          The maximum relative frequency of gap characters in
                          a column for the column to be retained. This
                          relative frequency must be a number between 0.0 and
                          1.0 (inclusive), where 0.0 retains only those
                          columns without gap characters, and 1.0 retains all
                          columns  regardless of gap character frequency. This
                          value is used when masking the aligned sequences.
                                                                [default: 1.0]
  --p-mask-min-conservation PROPORTION Range(0, 1, inclusive_end=True)
                          The minimum relative frequency of at least one
                          non-gap character in a column for that column to be
                          retained. This relative frequency must be a number
                          between 0.0 and 1.0 (inclusive). For example, if a
                          value of  0.4 is provided, a column will only be
                          retained  if it contains at least one character that
                          is present in at least 40% of the sequences. This
                          value is used when masking the aligned sequences.
                                                                [default: 0.4]
  --p-parttree / --p-no-parttree
                          This flag is required if the number of sequences
                          being aligned are larger than 1000000. Disabled by
                          default.                            [default: False]
Outputs:
  --o-alignment ARTIFACT FeatureData[AlignedSequence]
                          The aligned sequences.                    [required]
  --o-masked-alignment ARTIFACT FeatureData[AlignedSequence]
                          The masked alignment.                     [required]
  --o-tree ARTIFACT       The unrooted phylogenetic tree.
    Phylogeny[Unrooted]                                             [required]
  --o-rooted-tree ARTIFACT
    Phylogeny[Rooted]     The rooted phylogenetic tree.             [required]
Miscellaneous:
  --output-dir PATH       Output unspecified results to a directory
  --verbose / --quiet     Display verbose output to stdout and/or stderr
                          during execution of this action. Or silence output
                          if execution is successful (silence is golden).
  --recycle-pool TEXT     Use a cache pool for pipeline resumption. QIIME 2
                          will cache your results in this pool for reuse by
                          future invocations. These pool are retained until
                          deleted by the user. If not provided, QIIME 2 will
                          create a pool which is automatically reused by
                          invocations of the same action and removed if the
                          action is successful. Note: these pools are local to
                          the cache you are using.
  --no-recycle            Do not recycle results from a previous failed
                          pipeline run or save the results from this run for
                          future recycling.
  --parallel              Execute your action in parallel. This flag will use
                          your default parallel config.
  --parallel-config FILE  Execute your action in parallel using a config at
                          the indicated path.
  --use-cache DIRECTORY   Specify the cache to be used for the intermediate
                          work of this pipeline. If not provided, the default
                          cache under $TMP/qiime2/<uname> will be used.
                          IMPORTANT FOR HPC USERS: If you are on an HPC system
                          and are using parallel execution it is important to
                          set this to a location that is globally accessible
                          to all nodes in the cluster.
  --example-data PATH     Write example data and exit.
  --citations             Show citations and exit.
  --help                  Show this message and exit.

Examples:
  # ### example: align to tree mafft fasttree
  qiime phylogeny align-to-tree-mafft-fasttree \
    --i-sequences rep-seqs.qza \
    --o-alignment aligned-rep-seqs.qza \
    --o-masked-alignment masked-aligned-rep-seqs.qza \
    --o-tree unrooted-tree.qza \
    --o-rooted-tree rooted-tree.qza

 

$ qiime phylogeny align-to-tree-mafft-fasttree \
    --i-sequences rep-seqs-dada2.qza \
    --o-alignment aligned-rep-seqs.qza \
    --o-masked-alignment masked-aligned-rep-seqs.qza \
    --o-tree unrooted-tree.qza \
    --o-rooted-tree rooted-tree.qza

 

 

qiime feature-classifier classify-sklearn

(qiime2-2023.5) user@user-DT:~/qiime2$ qiime feature-classifier classify-sklearn --help
Usage: qiime feature-classifier classify-sklearn [OPTIONS]

  Classify reads by taxon using a fitted classifier.

Inputs:
  --i-reads ARTIFACT FeatureData[Sequence]
                         The feature data to be classified.         [required]
  --i-classifier ARTIFACT
    TaxonomicClassifier  The taxonomic classifier for classifying the reads.
                                                                    [required]
Parameters:
  --p-reads-per-batch VALUE Int % Range(1, None) | Str % Choices('auto')
                         Number of reads to process in each batch. If "auto",
                         this parameter is autoscaled to min( number of query
                         sequences / n-jobs, 20000).         [default: 'auto']
  --p-n-jobs INTEGER     The maximum number of concurrently worker processes.
                         If -1 all CPUs are used. If 1 is given, no parallel
                         computing code is used at all, which is useful for
                         debugging. For n-jobs below -1, (n_cpus + 1 + n-jobs)
                         are used. Thus for n-jobs = -2, all CPUs but one are
                         used.                                    [default: 1]
  --p-pre-dispatch TEXT  "all" or expression, as in "3*n_jobs". The number of
                         batches (of tasks) to be pre-dispatched.
                                                         [default: '2*n_jobs']
  --p-confidence VALUE Float % Range(0, 1, inclusive_end=True) | Str %
    Choices('disable')   Confidence threshold for limiting taxonomic depth.
                         Set to "disable" to disable confidence calculation,
                         or 0 to calculate confidence but not apply it to
                         limit the taxonomic depth of the assignments.
                                                                [default: 0.7]
  --p-read-orientation TEXT Choices('same', 'reverse-complement', 'auto')
                         Direction of reads with respect to reference
                         sequences. same will cause reads to be classified
                         unchanged; reverse-complement will cause reads to be
                         reversed and complemented prior to classification.
                         "auto" will autodetect orientation based on the
                         confidence estimates for the first 100 reads.
                                                             [default: 'auto']
Outputs:
  --o-classification ARTIFACT FeatureData[Taxonomy]
                                                                    [required]
Miscellaneous:
  --output-dir PATH      Output unspecified results to a directory
  --verbose / --quiet    Display verbose output to stdout and/or stderr
                         during execution of this action. Or silence output if
                         execution is successful (silence is golden).
  --example-data PATH    Write example data and exit.
  --citations            Show citations and exit.
  --help                 Show this message and exit.

 

$ qiime feature-classifier classify-sklearn \
    --i-reads rep-seqs.qza \
    --i-classifier silva-138-99-515-806-nb-classifier.qza \
    --o-classification taxonomy.qza

 

 

qiime diversity core-metrics-phylogenetic

(qiime2-2023.5) user@user-DT:~/qiime2$ qiime diversity core-metrics-phylogenetic --help
Usage: qiime diversity core-metrics-phylogenetic [OPTIONS]

  Applies a collection of diversity metrics (both phylogenetic and non-
  phylogenetic) to a feature table.

Inputs:
  --i-table ARTIFACT FeatureTable[Frequency]
                          The feature table containing the samples over which
                          diversity metrics should be computed.     [required]
  --i-phylogeny ARTIFACT  Phylogenetic tree containing tip identifiers that
    Phylogeny[Rooted]     correspond to the feature identifiers in the table.
                          This tree can contain tip ids that are not present
                          in the table, but all feature ids in the table must
                          be present in this tree.                  [required]
Parameters:
  --p-sampling-depth INTEGER
    Range(1, None)        The total frequency that each sample should be
                          rarefied to prior to computing diversity metrics.
                                                                    [required]
  --m-metadata-file METADATA...
    (multiple arguments   The sample metadata to use in the emperor plots.
     will be merged)                                                [required]
  --p-with-replacement / --p-no-with-replacement
                          Rarefy with replacement by sampling from the
                          multinomial distribution instead of rarefying
                          without replacement.                [default: False]
  --p-n-jobs-or-threads VALUE Int % Range(1, None) | Str % Choices('auto')
                          [beta/beta-phylogenetic methods only] - The number
                          of concurrent jobs or CPU threads to use in
                          performing this calculation. Individual methods will
                          create jobs/threads as implemented in
                          q2-diversity-lib dependencies. May not exceed the
                          number of available physical cores. If
                          n-jobs-or-threads = 'auto', one thread/job will be
                          created for each identified CPU core on the host.
                                                                  [default: 1]
Outputs:
  --o-rarefied-table ARTIFACT FeatureTable[Frequency]
                          The resulting rarefied feature table.     [required]
  --o-faith-pd-vector ARTIFACT SampleData[AlphaDiversity]
                          Vector of Faith PD values by sample.      [required]
  --o-observed-features-vector ARTIFACT SampleData[AlphaDiversity]
                          Vector of Observed Features values by sample.
                                                                    [required]
  --o-shannon-vector ARTIFACT SampleData[AlphaDiversity]
                          Vector of Shannon diversity values by sample.
                                                                    [required]
  --o-evenness-vector ARTIFACT SampleData[AlphaDiversity]
                          Vector of Pielou's evenness values by sample.
                                                                    [required]
  --o-unweighted-unifrac-distance-matrix ARTIFACT
    DistanceMatrix        Matrix of unweighted UniFrac distances between
                          pairs of samples.                         [required]
  --o-weighted-unifrac-distance-matrix ARTIFACT
    DistanceMatrix        Matrix of weighted UniFrac distances between pairs
                          of samples.                               [required]
  --o-jaccard-distance-matrix ARTIFACT
    DistanceMatrix        Matrix of Jaccard distances between pairs of
                          samples.                                  [required]
  --o-bray-curtis-distance-matrix ARTIFACT
    DistanceMatrix        Matrix of Bray-Curtis distances between pairs of
                          samples.                                  [required]
  --o-unweighted-unifrac-pcoa-results ARTIFACT
    PCoAResults           PCoA matrix computed from unweighted UniFrac
                          distances between samples.                [required]
  --o-weighted-unifrac-pcoa-results ARTIFACT
    PCoAResults           PCoA matrix computed from weighted UniFrac
                          distances between samples.                [required]
  --o-jaccard-pcoa-results ARTIFACT
    PCoAResults           PCoA matrix computed from Jaccard distances between
                          samples.                                  [required]
  --o-bray-curtis-pcoa-results ARTIFACT
    PCoAResults           PCoA matrix computed from Bray-Curtis distances
                          between samples.                          [required]
  --o-unweighted-unifrac-emperor VISUALIZATION
                          Emperor plot of the PCoA matrix computed from
                          unweighted UniFrac.                       [required]
  --o-weighted-unifrac-emperor VISUALIZATION
                          Emperor plot of the PCoA matrix computed from
                          weighted UniFrac.                         [required]
  --o-jaccard-emperor VISUALIZATION
                          Emperor plot of the PCoA matrix computed from
                          Jaccard.                                  [required]
  --o-bray-curtis-emperor VISUALIZATION
                          Emperor plot of the PCoA matrix computed from
                          Bray-Curtis.                              [required]
Miscellaneous:
  --output-dir PATH       Output unspecified results to a directory
  --verbose / --quiet     Display verbose output to stdout and/or stderr
                          during execution of this action. Or silence output
                          if execution is successful (silence is golden).
  --recycle-pool TEXT     Use a cache pool for pipeline resumption. QIIME 2
                          will cache your results in this pool for reuse by
                          future invocations. These pool are retained until
                          deleted by the user. If not provided, QIIME 2 will
                          create a pool which is automatically reused by
                          invocations of the same action and removed if the
                          action is successful. Note: these pools are local to
                          the cache you are using.
  --no-recycle            Do not recycle results from a previous failed
                          pipeline run or save the results from this run for
                          future recycling.
  --parallel              Execute your action in parallel. This flag will use
                          your default parallel config.
  --parallel-config FILE  Execute your action in parallel using a config at
                          the indicated path.
  --use-cache DIRECTORY   Specify the cache to be used for the intermediate
                          work of this pipeline. If not provided, the default
                          cache under $TMP/qiime2/<uname> will be used.
                          IMPORTANT FOR HPC USERS: If you are on an HPC system
                          and are using parallel execution it is important to
                          set this to a location that is globally accessible
                          to all nodes in the cluster.
  --example-data PATH     Write example data and exit.
  --citations             Show citations and exit.
  --help                  Show this message and exit.

 

$ qiime diversity core-metric-phylogenetic \
    --i-phylogeny rooted-tree.qza \
    --i-table table.qza \
    --p-sampling-depth 27,286.5 \
    --m-metadata-file sample-metadata.tsv \
    --output-dir core-metrics-results

 

 

qiime diversity alpha-group-significance

(qiime2-2023.5) user@user-DT:~/qiime2$ qiime diversity alpha-group-significance --help
Usage: qiime diversity alpha-group-significance [OPTIONS]

  Visually and statistically compare groups of alpha diversity values.

Inputs:
  --i-alpha-diversity ARTIFACT SampleData[AlphaDiversity]
                       Vector of alpha diversity values by sample.  [required]
Parameters:
  --m-metadata-file METADATA...
    (multiple          The sample metadata.
     arguments will
     be merged)                                                     [required]
Outputs:
  --o-visualization VISUALIZATION
                                                                    [required]
Miscellaneous:
  --output-dir PATH    Output unspecified results to a directory
  --verbose / --quiet  Display verbose output to stdout and/or stderr during
                       execution of this action. Or silence output if
                       execution is successful (silence is golden).
  --example-data PATH  Write example data and exit.
  --citations          Show citations and exit.
  --help               Show this message and exit.

Examples:
  # ### example: alpha group significance faith pd
  qiime diversity alpha-group-significance \
    --i-alpha-diversity alpha-div-faith-pd.qza \
    --m-metadata-file metadata.tsv \
    --o-visualization visualization.qzv

 

$ qiime diversity alpha-group-signifcance \
    --i-alpha-diversity core-metrics-results/faith_pd_vector.qza \
    --m-metadata-file sample-metadata.tsv \
    --o-visualization core-metrics-results/faith-pd-group-significance.qzv

$ qiime diversity alpha-group-signifcance \
    --i-alpha-diversity core-metrics-results/evenness_vector.qza \
    --m-metadata-file sample-metadata.tsv \
    --o-visualization core-metrics-results/evenness-group-significance.qzv

 

 

qiime diversity beta-group-significance

(qiime2-2023.5) user@user-DT:~/qiime2$ qiime diversity beta-group-significance --help
Usage: qiime diversity beta-group-significance [OPTIONS]

  Determine whether groups of samples are significantly different from one
  another using a permutation-based statistical test.

Inputs:
  --i-distance-matrix ARTIFACT
    DistanceMatrix     Matrix of distances between pairs of samples.
                                                                    [required]
Parameters:
  --m-metadata-file METADATA
  --m-metadata-column COLUMN  MetadataColumn[Categorical]
                       Categorical sample metadata column.          [required]
  --p-method TEXT Choices('permanova', 'anosim', 'permdisp')
                       The group significance test to be applied.
                                                        [default: 'permanova']
  --p-pairwise / --p-no-pairwise
                       Perform pairwise tests between all pairs of groups in
                       addition to the test across all groups. This can be
                       very slow if there are a lot of groups in the metadata
                       column.                                [default: False]
  --p-permutations INTEGER
                       The number of permutations to be run when computing
                       p-values.                                [default: 999]
Outputs:
  --o-visualization VISUALIZATION
                                                                    [required]
Miscellaneous:
  --output-dir PATH    Output unspecified results to a directory
  --verbose / --quiet  Display verbose output to stdout and/or stderr during
                       execution of this action. Or silence output if
                       execution is successful (silence is golden).
  --example-data PATH  Write example data and exit.
  --citations          Show citations and exit.
  --help               Show this message and exit.

 

$ qiime diversity beta-group-significance \
    --i-distance-matrix core-metrics-results/unweighted_unifrac_distance_matrix.qza \
    --m-metadata-file sample-metadata.tsv \
    --m-metadata-column Group \
    --o-visualization core-metrics-results/unweighted-unifrac-group-significance.qzv \
    --p-pairwise

 

 

qiime taxa filter-table

(qiime2-2023.5) user@user-DT:~/qiime2$ qiime taxa filter-table --help
Usage: qiime taxa filter-table [OPTIONS]

  This method filters features from a table based on their taxonomic
  annotations. Features can be retained in the resulting table by specifying
  one or more include search terms, and can be filtered out of the resulting
  table by specifying one or more exclude search terms. If both include and
  exclude are provided, the inclusion critera will be applied before the
  exclusion critera. Either include or exclude terms (or both) must be
  provided. Any samples that have a total frequency of zero after filtering
  will be removed from the resulting table.

Inputs:
  --i-table ARTIFACT FeatureTable[Frequency]
                         Feature table to be filtered.              [required]
  --i-taxonomy ARTIFACT FeatureData[Taxonomy]
                         Taxonomic annotations for features in the provided
                         feature table. All features in the feature table must
                         have a corresponding taxonomic annotation. Taxonomic
                         annotations for features that are not present in the
                         feature table will be ignored.             [required]
Parameters:
  --p-include TEXT       One or more search terms that indicate which taxa
                         should be included in the resulting table. If
                         providing more than one term, terms should be
                         delimited by the query-delimiter character. By
                         default, all taxa will be included.        [optional]
  --p-exclude TEXT       One or more search terms that indicate which taxa
                         should be excluded from the resulting table. If
                         providing more than one term, terms should be
                         delimited by the query-delimiter character. By
                         default, no taxa will be excluded.         [optional]
  --p-query-delimiter TEXT
                         The string used to delimit multiple search terms
                         provided to include or exclude. This parameter should
                         only need to be modified if the default delimiter (a
                         comma) is used in the provided taxonomic annotations.
                                                                [default: ',']
  --p-mode TEXT Choices('exact', 'contains')
                         Mode for determining if a search term matches a
                         taxonomic annotation. "contains" requires that the
                         annotation has the term as a substring; "exact"
                         requires that the annotation is a perfect match to a
                         search term.                    [default: 'contains']
Outputs:
  --o-filtered-table ARTIFACT FeatureTable[Frequency]
                         The taxonomy-filtered feature table.       [required]
Miscellaneous:
  --output-dir PATH      Output unspecified results to a directory
  --verbose / --quiet    Display verbose output to stdout and/or stderr
                         during execution of this action. Or silence output if
                         execution is successful (silence is golden).
  --example-data PATH    Write example data and exit.
  --citations            Show citations and exit.
  --help                 Show this message and exit.

 

$ qiime taxa filter-table \
    --i-table filtered-sequences/table-with-phyla-no-mitochondria-chloroplast.qza \
    --i-taxonomy taxonomy.qza \
    --p-exclude "k__Archaea" \
    --o-filtered-table filtered-sequences/table-with-phyla-no-mitochondria-chloroplasts-archaea.qza

 

 

qiime tools export

(qiime2-2023.5) user@user-DT:~/qiime2$ qiime tools export --help
Usage: qiime tools export [OPTIONS]

  Exporting extracts (and optionally transforms) data stored inside an
  Artifact or Visualization. Note that Visualizations cannot be transformed
  with --output-format

Options:
  --input-path ARTIFACT/VISUALIZATION
                        Path to file that should be exported        [required]
  --output-path PATH    Path to file or directory where data should be
                        exported to                                 [required]
  --output-format TEXT  Format which the data should be exported as. This
                        option cannot be used with Visualizations
  --help                Show this message and exit.

 

$ qiime tools export \
    --input-path rep-seqs.qza \
    --output-path rep-seqs.fna

$ qiime tools export \
    --input-path table.qza \
    --output-path feature-table.biom

 

 

 

 

 

 

 

 

 

+ Recent posts