DiffEnrich Analysis Tutorial - Multiple Interface Edition¶
Introduction¶
In this tutorial you’ll use QIIME 2 to perform an analysis of some data.
Typical Run Time: 12 Minutes
Description¶
This guide is a preview of how you can use q2-autopepsirf’s diffEnrich module, along with how to use the individual modules of q2-pepsirf and q2-ps-plot to accomplish a diffEnrich analysis.
Sample Raw Data¶
Before starting the analysis, download the raw data and bin files. These
IM0032-pA_PV1_subset.qza
, pA_PV1.5_r1bins_IM25-26.qza
, and
samples_source.tsv
files are used throughout the rest of the tutorial.
from qiime2 import Artifact
from qiime2 import Metadata
from urllib import request
url = 'https://ladnerlab.github.io/pepsirf-q2-plugin-docs/data/tutorials/pepsirf-tutorial/IM0032-pA-PV1-subset.qza'
fn = 'IM0032-pA-PV1-subset.qza'
request.urlretrieve(url, fn)
IM0032_pA_PV1_subset = Artifact.load(fn)
url = 'https://ladnerlab.github.io/pepsirf-q2-plugin-docs/data/tutorials/pepsirf-tutorial/pA-PV1.5-r1bins-IM25-26.qza'
fn = 'pA-PV1.5-r1bins-IM25-26.qza'
request.urlretrieve(url, fn)
pA_PV1_5_r1bins_IM25_26 = Artifact.load(fn)
url = 'https://ladnerlab.github.io/pepsirf-q2-plugin-docs/data/tutorials/pepsirf-tutorial/samples-source.tsv'
fn = 'samples-source.tsv'
request.urlretrieve(url, fn)
samples_source_md = Metadata.load(fn)
library(reticulate)
Artifact <- import("qiime2")$Artifact
Metadata <- import("qiime2")$Metadata
request <- import("urllib")$request
url <- 'https://ladnerlab.github.io/pepsirf-q2-plugin-docs/data/tutorials/pepsirf-tutorial/IM0032-pA-PV1-subset.qza'
fn <- 'IM0032-pA-PV1-subset.qza'
request$urlretrieve(url, fn)
IM0032_pA_PV1_subset <- Artifact$load(fn)
url <- 'https://ladnerlab.github.io/pepsirf-q2-plugin-docs/data/tutorials/pepsirf-tutorial/pA-PV1.5-r1bins-IM25-26.qza'
fn <- 'pA-PV1.5-r1bins-IM25-26.qza'
request$urlretrieve(url, fn)
pA_PV1_5_r1bins_IM25_26 <- Artifact$load(fn)
url <- 'https://ladnerlab.github.io/pepsirf-q2-plugin-docs/data/tutorials/pepsirf-tutorial/samples-source.tsv'
fn <- 'samples-source.tsv'
request$urlretrieve(url, fn)
samples_source_md <- Metadata$load(fn)
wget \
-O 'IM0032-pA-PV1-subset.qza' \
'https://ladnerlab.github.io/pepsirf-q2-plugin-docs/data/tutorials/pepsirf-tutorial/IM0032-pA-PV1-subset.qza'
wget \
-O 'pA-PV1.5-r1bins-IM25-26.qza' \
'https://ladnerlab.github.io/pepsirf-q2-plugin-docs/data/tutorials/pepsirf-tutorial/pA-PV1.5-r1bins-IM25-26.qza'
wget \
-O 'samples-source.tsv' \
'https://ladnerlab.github.io/pepsirf-q2-plugin-docs/data/tutorials/pepsirf-tutorial/samples-source.tsv'
def raw_factory():
import qiime2
return qiime2.Artifact.load("source/data/IM0032-pA_PV1_subset.qza")
raw_data = use.init_artifact("IM0032-pA_PV1_subset", raw_factory)
def bin_factory():
import qiime2
return qiime2.Artifact.load("source/data/pA_PV1.5_r1bins_IM25-26.qza")
bin_data = use.init_artifact("pA_PV1.5_r1bins_IM25-26", bin_factory)
def metadata_factory():
import qiime2
return qiime2.Metadata.load("source/data/samples_source.tsv")
metadata = use.init_metadata('samples_source', metadata_factory)
- Using the
Upload Data
tool: On the first tab (Regular), press the
Paste/Fetch
data button at the bottom.Set “Name” (first text-field) to:
IM0032-pA-PV1-subset.qza
In the larger text-area, copy-and-paste: https://ladnerlab.github.io/pepsirf-q2-plugin-docs/data/tutorials/pepsirf-tutorial/IM0032-pA-PV1-subset.qza
(“Type”, “Genome”, and “Settings” can be ignored)
Press the
Start
button at the bottom.
- Using the
Upload Data
tool: On the first tab (Regular), press the
Paste/Fetch
data button at the bottom.Set “Name” (first text-field) to:
pA-PV1.5-r1bins-IM25-26.qza
In the larger text-area, copy-and-paste: https://ladnerlab.github.io/pepsirf-q2-plugin-docs/data/tutorials/pepsirf-tutorial/pA-PV1.5-r1bins-IM25-26.qza
(“Type”, “Genome”, and “Settings” can be ignored)
Press the
Start
button at the bottom.
- Using the
Upload Data
tool: On the first tab (Regular), press the
Paste/Fetch
data button at the bottom.Set “Name” (first text-field) to:
samples-source.tsv
In the larger text-area, copy-and-paste: https://ladnerlab.github.io/pepsirf-q2-plugin-docs/data/tutorials/pepsirf-tutorial/samples-source.tsv
(“Type”, “Genome”, and “Settings” can be ignored)
Press the
Start
button at the bottom.
All data that is used as input to QIIME 2 is in form of QIIME 2 artifacts, which contain information about the type of data and the source of the data.
Autopepsirf Automation¶
Once you have downloaded the file, you can automatically run q2-pepsirf and q2-ps-plot with q2-autopepsirf. This can be done by running the following command (replace pepsirf_binary with how you call pepsirf on your machine):
import qiime2.plugins.autopepsirf.actions as autopepsirf_actions
action_results = autopepsirf_actions.diffEnrich(
raw_data=IM0032_pA_PV1_subset,
bins=pA_PV1_5_r1bins_IM25_26,
negative_id='SB_',
exact_z_thresh='6,10',
pepsirf_tsv_dir='./testingTSV',
tsv_base_str='IM0032-pA_PV1_subset',
hdi=0.95,
pepsirf_binary='/home/runner/work/pepsirf-q2-plugin-docs/pepsirf-q2-plugin-docs/pepsirf',
)
colsum = action_results.col_sum
diff = action_results.diff
diff_ratio = action_results.diff_ratio
zscore = action_results.zscore
zscore_nan = action_results.zscore_nan
sample_names = action_results.sample_names
read_counts = action_results.read_counts
rcBoxplot_viz = action_results.rc_boxplot
enrich = action_results.enrich
enrichBoxplot_viz = action_results.enrich_count_boxplot
zScatter_viz = action_results.zscore_scatter
csScatter_viz = action_results.colsum_scatter
zenrich_viz = action_results.zenrich_scatter
autopepsirf_actions <- import("qiime2.plugins.autopepsirf.actions")
action_results <- autopepsirf_actions$diffEnrich(
raw_data=IM0032_pA_PV1_subset,
bins=pA_PV1_5_r1bins_IM25_26,
negative_id='SB_',
exact_z_thresh='6,10',
pepsirf_tsv_dir='./testingTSV',
tsv_base_str='IM0032-pA_PV1_subset',
hdi=0.95,
pepsirf_binary='/home/runner/work/pepsirf-q2-plugin-docs/pepsirf-q2-plugin-docs/pepsirf',
)
colsum <- action_results$col_sum
diff <- action_results$diff
diff_ratio <- action_results$diff_ratio
zscore <- action_results$zscore
zscore_nan <- action_results$zscore_nan
sample_names <- action_results$sample_names
read_counts <- action_results$read_counts
rcBoxplot_viz <- action_results$rc_boxplot
enrich <- action_results$enrich
enrichBoxplot_viz <- action_results$enrich_count_boxplot
zScatter_viz <- action_results$zscore_scatter
csScatter_viz <- action_results$colsum_scatter
zenrich_viz <- action_results$zenrich_scatter
qiime autopepsirf diffEnrich \
--i-raw-data IM0032-pA-PV1-subset.qza \
--i-bins pA-PV1.5-r1bins-IM25-26.qza \
--p-negative-id SB_ \
--p-exact-z-thresh 6,10 \
--p-pepsirf-tsv-dir ./testingTSV \
--p-tsv-base-str IM0032-pA_PV1_subset \
--p-hdi 0.95 \
--p-pepsirf-binary /home/runner/work/pepsirf-q2-plugin-docs/pepsirf-q2-plugin-docs/pepsirf \
--output-dir autopepsirf-diffEnrich
col_sum, diff, diff_ratio, zscore, zscore_nan, sample_names, read_counts, rcBoxplot, enriched, enrichBoxplot, zScatter, csScatter, zenrich = use.action(
use.UsageAction(plugin_id='autopepsirf', action_id='diffEnrich'),
use.UsageInputs(
raw_data = raw_data,
bins = bin_data,
negative_id = "SB_",
exact_z_thresh = "6,10",
pepsirf_tsv_dir = "./testingTSV",
tsv_base_str = "IM0032-pA_PV1_subset",
hdi = 0.95,
pepsirf_binary = "/home/runner/work/pepsirf-q2-plugin-docs/pepsirf-q2-plugin-docs/pepsirf"
),
use.UsageOutputNames(
col_sum = "colsum",
diff = "diff",
diff_ratio = "diff_ratio",
zscore = "zscore",
zscore_nan = "zscore_nan",
sample_names = "sample_names",
read_counts = "read_counts",
rc_boxplot = "rcBoxplot",
enrich = "enrich",
enrich_count_boxplot = "enrichBoxplot",
zscore_scatter = "zScatter",
colsum_scatter = "csScatter",
zenrich_scatter = "zenrich"
)
)
- Using the
qiime2 autopepsirf diffEnrich
tool: Set “raw_data” to
#: IM0032-pA-PV1-subset.qza
Set “bins” to
#: pA-PV1.5-r1bins-IM25-26.qza
Expand the
additional options
sectionSet “negative_id” to
SB_
Set “exact_z_thresh” to
6,10
Set “pepsirf_tsv_dir” to
./testingTSV
Set “tsv_base_str” to
IM0032-pA_PV1_subset
Leave “hdi” as its default value of
0.95
Set “pepsirf_binary” to
/home/runner/work/pepsirf-q2-plugin-docs/pepsirf-q2-plugin-docs/pepsirf
Press the
Execute
button.
- Once completed, for each new entry in your history, use the
Edit
button to set the name as follows: (Renaming is optional, but it will make any subsequent steps easier to complete.)
History Name
“Name” to set (be sure to press
Save
)#: qiime2 autopepsirf diffEnrich [...] : col_sum.qza
colsum.qza
#: qiime2 autopepsirf diffEnrich [...] : diff.qza
diff.qza
#: qiime2 autopepsirf diffEnrich [...] : diff_ratio.qza
diff-ratio.qza
#: qiime2 autopepsirf diffEnrich [...] : zscore.qza
zscore.qza
#: qiime2 autopepsirf diffEnrich [...] : zscore_nan.qza
zscore-nan.qza
#: qiime2 autopepsirf diffEnrich [...] : sample_names.qza
sample-names.qza
#: qiime2 autopepsirf diffEnrich [...] : read_counts.qza
read-counts.qza
#: qiime2 autopepsirf diffEnrich [...] : rc_boxplot.qzv
rcBoxplot.qzv
#: qiime2 autopepsirf diffEnrich [...] : enrich.qza
enrich.qza
#: qiime2 autopepsirf diffEnrich [...] : enrich_count_boxplot.qzv
enrichBoxplot.qzv
#: qiime2 autopepsirf diffEnrich [...] : zscore_scatter.qzv
zScatter.qzv
#: qiime2 autopepsirf diffEnrich [...] : colsum_scatter.qzv
csScatter.qzv
#: qiime2 autopepsirf diffEnrich [...] : zenrich_scatter.qzv
zenrich.qzv
Note
TSV/PNG outputs will not show up on this page. They are just duplicates of the .qza files in a .tsv format.
Pepsirf Normalization¶
You can also run q2-pepsirf and q2-ps-plot by themseleves to get individual files. Here we wil test q2-pepsirf’s norm module by running the following command (replace pepsirf_binary with how you call pepsirf on your machine):
import qiime2.plugins.pepsirf.actions as pepsirf_actions
IM0032_pA_PV1_subset_CS, = pepsirf_actions.norm(
peptide_scores=IM0032_pA_PV1_subset,
pepsirf_binary='/home/runner/work/pepsirf-q2-plugin-docs/pepsirf-q2-plugin-docs/pepsirf',
)
pepsirf_actions <- import("qiime2.plugins.pepsirf.actions")
action_results <- pepsirf_actions$norm(
peptide_scores=IM0032_pA_PV1_subset,
pepsirf_binary='/home/runner/work/pepsirf-q2-plugin-docs/pepsirf-q2-plugin-docs/pepsirf',
)
IM0032_pA_PV1_subset_CS <- action_results$qza_output
qiime pepsirf norm \
--i-peptide-scores IM0032-pA-PV1-subset.qza \
--p-pepsirf-binary /home/runner/work/pepsirf-q2-plugin-docs/pepsirf-q2-plugin-docs/pepsirf \
--o-qza-output IM0032-pA-PV1-subset-CS.qza
col_sum, = use.action(
use.UsageAction(plugin_id='pepsirf', action_id='norm'),
use.UsageInputs(
peptide_scores = raw_data,
pepsirf_binary = "/home/runner/work/pepsirf-q2-plugin-docs/pepsirf-q2-plugin-docs/pepsirf"
),
use.UsageOutputNames(
qza_output = "IM0032-pA_PV1_subset_CS"
)
)
- Using the
qiime2 pepsirf norm
tool: Set “peptide_scores” to
#: IM0032-pA-PV1-subset.qza
Expand the
additional options
sectionSet “pepsirf_binary” to
/home/runner/work/pepsirf-q2-plugin-docs/pepsirf-q2-plugin-docs/pepsirf
Press the
Execute
button.
- Once completed, for the new entry in your history, use the
Edit
button to set the name as follows: (Renaming is optional, but it will make any subsequent steps easier to complete.)
History Name
“Name” to set (be sure to press
Save
)#: qiime2 pepsirf norm [...] : qza_output.qza
IM0032-pA-PV1-subset-CS.qza
Pepsirf bin¶
Here we wil test q2-pepsirf’s bin module by running the following command (replace pepsirf_binary with how you call pepsirf on your machine):
IM0032_pA_PV1_subset_bin, = pepsirf_actions.bin(
scores=IM0032_pA_PV1_subset_CS,
bin_size=300,
round_to=0,
pepsirf_binary='/home/runner/work/pepsirf-q2-plugin-docs/pepsirf-q2-plugin-docs/pepsirf',
)
action_results <- pepsirf_actions$bin(
scores=IM0032_pA_PV1_subset_CS,
bin_size=300L,
round_to=0L,
pepsirf_binary='/home/runner/work/pepsirf-q2-plugin-docs/pepsirf-q2-plugin-docs/pepsirf',
)
IM0032_pA_PV1_subset_bin <- action_results$bin_output
qiime pepsirf bin \
--i-scores IM0032-pA-PV1-subset-CS.qza \
--p-bin-size 300 \
--p-round-to 0 \
--p-pepsirf-binary /home/runner/work/pepsirf-q2-plugin-docs/pepsirf-q2-plugin-docs/pepsirf \
--o-bin-output IM0032-pA-PV1-subset-bin.qza
pepsirf_bin, = use.action(
use.UsageAction(plugin_id='pepsirf', action_id='bin'),
use.UsageInputs(
scores = col_sum,
bin_size = 300,
round_to = 0,
pepsirf_binary = "/home/runner/work/pepsirf-q2-plugin-docs/pepsirf-q2-plugin-docs/pepsirf"
),
use.UsageOutputNames(
bin_output = "IM0032-pA_PV1_subset_bin"
)
)
- Using the
qiime2 pepsirf bin
tool: Set “scores” to
#: IM0032-pA-PV1-subset-CS.qza
Expand the
additional options
sectionLeave “bin_size” as its default value of
300
Leave “round_to” as its default value of
0
Set “pepsirf_binary” to
/home/runner/work/pepsirf-q2-plugin-docs/pepsirf-q2-plugin-docs/pepsirf
Press the
Execute
button.
- Once completed, for the new entry in your history, use the
Edit
button to set the name as follows: (Renaming is optional, but it will make any subsequent steps easier to complete.)
History Name
“Name” to set (be sure to press
Save
)#: qiime2 pepsirf bin [...] : bin_output.qza
IM0032-pA-PV1-subset-bin.qza
Pepsirf zscore¶
Here we wil test q2-pepsirf’s zscore module by running the following command (replace pepsirf_binary with how you call pepsirf on your machine):
IM0032_pA_PV1_Z_HDI95, IM0032_pA_PV1_Z_HDI95_nan = pepsirf_actions.zscore(
scores=diff,
bins=pA_PV1_5_r1bins_IM25_26,
hdi=0.95,
pepsirf_binary='/home/runner/work/pepsirf-q2-plugin-docs/pepsirf-q2-plugin-docs/pepsirf',
)
action_results <- pepsirf_actions$zscore(
scores=diff,
bins=pA_PV1_5_r1bins_IM25_26,
hdi=0.95,
pepsirf_binary='/home/runner/work/pepsirf-q2-plugin-docs/pepsirf-q2-plugin-docs/pepsirf',
)
IM0032_pA_PV1_Z_HDI95 <- action_results$zscore_output
IM0032_pA_PV1_Z_HDI95_nan <- action_results$nan_report
qiime pepsirf zscore \
--i-scores autopepsirf-diffEnrich/diff.qza \
--i-bins pA-PV1.5-r1bins-IM25-26.qza \
--p-hdi 0.95 \
--p-pepsirf-binary /home/runner/work/pepsirf-q2-plugin-docs/pepsirf-q2-plugin-docs/pepsirf \
--o-zscore-output IM0032-pA-PV1-Z-HDI95.qza \
--o-nan-report IM0032-pA-PV1-Z-HDI95-nan.qza
pepsirf_zscore, pepsirf_nan, = use.action(
use.UsageAction(plugin_id='pepsirf', action_id='zscore'),
use.UsageInputs(
scores = diff,
bins = bin_data,
hdi = 0.95,
pepsirf_binary = "/home/runner/work/pepsirf-q2-plugin-docs/pepsirf-q2-plugin-docs/pepsirf"
# TODO: maybe store a precompiled pepsirf executable in the PepSIRF repository?
#pepsirf_binary = "/mnt/c/Users/ANNAB/Documents/GitHub/PepSIRF/precompiled/linux_mint_19.3/pepsirf_1.4.0_linux"
),
use.UsageOutputNames(
zscore_output = "IM0032-pA_PV1_Z-HDI95",
nan_report = "IM0032-pA_PV1_Z-HDI95_nan"
)
)
- Using the
qiime2 pepsirf zscore
tool: Set “scores” to
#: diff.qza
Set “bins” to
#: pA-PV1.5-r1bins-IM25-26.qza
Expand the
additional options
sectionSet “hdi” to
0.95
Set “pepsirf_binary” to
/home/runner/work/pepsirf-q2-plugin-docs/pepsirf-q2-plugin-docs/pepsirf
Press the
Execute
button.
- Once completed, for each new entry in your history, use the
Edit
button to set the name as follows: (Renaming is optional, but it will make any subsequent steps easier to complete.)
History Name
“Name” to set (be sure to press
Save
)#: qiime2 pepsirf zscore [...] : zscore_output.qza
IM0032-pA-PV1-Z-HDI95.qza
#: qiime2 pepsirf zscore [...] : nan_report.qza
IM0032-pA-PV1-Z-HDI95-nan.qza
Pepsirf infoSNPN¶
Here we wil test q2-pepsirf’s infoSNPN module by running the following command (replace pepsirf_binary with how you call pepsirf on your machine):
IM0032_pA_PV1_SN, = pepsirf_actions.infoSNPN(
input=IM0032_pA_PV1_subset,
get='samples',
pepsirf_binary='/home/runner/work/pepsirf-q2-plugin-docs/pepsirf-q2-plugin-docs/pepsirf',
)
action_results <- pepsirf_actions$infoSNPN(
input=IM0032_pA_PV1_subset,
get='samples',
pepsirf_binary='/home/runner/work/pepsirf-q2-plugin-docs/pepsirf-q2-plugin-docs/pepsirf',
)
IM0032_pA_PV1_SN <- action_results$snpn_output
qiime pepsirf infoSNPN \
--i-input IM0032-pA-PV1-subset.qza \
--p-get samples \
--p-pepsirf-binary /home/runner/work/pepsirf-q2-plugin-docs/pepsirf-q2-plugin-docs/pepsirf \
--o-snpn-output IM0032-pA-PV1-SN.qza
pepsirf_sample_names, = use.action(
use.UsageAction(plugin_id='pepsirf', action_id='infoSNPN'),
use.UsageInputs(
input = raw_data,
get = "samples",
pepsirf_binary = "/home/runner/work/pepsirf-q2-plugin-docs/pepsirf-q2-plugin-docs/pepsirf"
),
use.UsageOutputNames(
snpn_output = "IM0032-pA_PV1_SN",
)
)
- Using the
qiime2 pepsirf infoSNPN
tool: Set “input” to
#: IM0032-pA-PV1-subset.qza
Set “get” to
samples
Expand the
additional options
sectionSet “pepsirf_binary” to
/home/runner/work/pepsirf-q2-plugin-docs/pepsirf-q2-plugin-docs/pepsirf
Press the
Execute
button.
- Once completed, for the new entry in your history, use the
Edit
button to set the name as follows: (Renaming is optional, but it will make any subsequent steps easier to complete.)
History Name
“Name” to set (be sure to press
Save
)#: qiime2 pepsirf infoSNPN [...] : snpn_output.qza
IM0032-pA-PV1-SN.qza
Pepsirf infoSumOfProbes¶
Here we wil test q2-pepsirf’s infoSumOfProbes module by running the following command (replace pepsirf_binary with how you call pepsirf on your machine):
IM0032_pA_PV1_RC, = pepsirf_actions.infoSumOfProbes(
input=IM0032_pA_PV1_subset,
pepsirf_binary='/home/runner/work/pepsirf-q2-plugin-docs/pepsirf-q2-plugin-docs/pepsirf',
)
action_results <- pepsirf_actions$infoSumOfProbes(
input=IM0032_pA_PV1_subset,
pepsirf_binary='/home/runner/work/pepsirf-q2-plugin-docs/pepsirf-q2-plugin-docs/pepsirf',
)
IM0032_pA_PV1_RC <- action_results$sum_of_probes_output
qiime pepsirf infoSumOfProbes \
--i-input IM0032-pA-PV1-subset.qza \
--p-pepsirf-binary /home/runner/work/pepsirf-q2-plugin-docs/pepsirf-q2-plugin-docs/pepsirf \
--o-sum-of-probes-output IM0032-pA-PV1-RC.qza
pepsirf_read_counts, = use.action(
use.UsageAction(plugin_id='pepsirf', action_id='infoSumOfProbes'),
use.UsageInputs(
input = raw_data,
pepsirf_binary = "/home/runner/work/pepsirf-q2-plugin-docs/pepsirf-q2-plugin-docs/pepsirf"
),
use.UsageOutputNames(
sum_of_probes_output = "IM0032-pA_PV1_RC",
)
)
- Using the
qiime2 pepsirf infoSumOfProbes
tool: Set “input” to
#: IM0032-pA-PV1-subset.qza
Expand the
additional options
sectionSet “pepsirf_binary” to
/home/runner/work/pepsirf-q2-plugin-docs/pepsirf-q2-plugin-docs/pepsirf
Press the
Execute
button.
- Once completed, for the new entry in your history, use the
Edit
button to set the name as follows: (Renaming is optional, but it will make any subsequent steps easier to complete.)
History Name
“Name” to set (be sure to press
Save
)#: qiime2 pepsirf infoSumOfProbes [...] : sum_of_probes_output.qza
IM0032-pA-PV1-RC.qza
Pepsirf enrich¶
Here we wil test q2-pepsirf’s enrich module by running the following command (replace pepsirf_binary with how you call pepsirf on your machine):
samples_col_mdc = samples_source_md.get_column('source')
_6_10Z_HDI95_20CS_300000raw, = pepsirf_actions.enrich(
source=samples_col_mdc,
zscores=zscore,
col_sum=IM0032_pA_PV1_subset_CS,
exact_z_thresh='6,10',
exact_cs_thresh='20',
enrichment_failure=True,
pepsirf_binary='/home/runner/work/pepsirf-q2-plugin-docs/pepsirf-q2-plugin-docs/pepsirf',
)
samples_col_mdc <- samples_source_md$get_column('source')
action_results <- pepsirf_actions$enrich(
source=samples_col_mdc,
zscores=zscore,
col_sum=IM0032_pA_PV1_subset_CS,
exact_z_thresh='6,10',
exact_cs_thresh='20',
enrichment_failure=TRUE,
pepsirf_binary='/home/runner/work/pepsirf-q2-plugin-docs/pepsirf-q2-plugin-docs/pepsirf',
)
_6_10Z_HDI95_20CS_300000raw <- action_results$dir_fmt_output
qiime pepsirf enrich \
--m-source-file samples-source.tsv \
--m-source-column source \
--i-zscores autopepsirf-diffEnrich/zscore.qza \
--i-col-sum IM0032-pA-PV1-subset-CS.qza \
--p-exact-z-thresh 6,10 \
--p-exact-cs-thresh 20 \
--p-enrichment-failure \
--p-pepsirf-binary /home/runner/work/pepsirf-q2-plugin-docs/pepsirf-q2-plugin-docs/pepsirf \
--o-dir-fmt-output 6-10Z-HDI95-20CS-300000raw.qza
samples_col = use.get_metadata_column('samples_col', 'source', metadata)
pepsirf_enrich_dir, = use.action(
use.UsageAction(plugin_id='pepsirf', action_id='enrich'),
use.UsageInputs(
source = samples_col,
zscores = zscore,
col_sum = col_sum,
exact_z_thresh = "6,10",
exact_cs_thresh = "20",
enrichment_failure = True,
pepsirf_binary = "/home/runner/work/pepsirf-q2-plugin-docs/pepsirf-q2-plugin-docs/pepsirf"
),
use.UsageOutputNames(
dir_fmt_output = "6-10Z-HDI95_20CS_300000raw",
)
)
- Using the
qiime2 pepsirf enrich
tool: For “source”:
Leave as
Metadata from TSV
Set “Metadata Source” to
samples-source.tsv
Set “Column Name” to
source
Expand the
additional options
sectionSet “zscores” to
#: zscore.qza
Set “col_sum” to
#: IM0032-pA-PV1-subset-CS.qza
Set “exact_z_thresh” to
6,10
Set “exact_cs_thresh” to
20
Set “enrichment_failure” to
Yes
Set “pepsirf_binary” to
/home/runner/work/pepsirf-q2-plugin-docs/pepsirf-q2-plugin-docs/pepsirf
Press the
Execute
button.
- Once completed, for the new entry in your history, use the
Edit
button to set the name as follows: (Renaming is optional, but it will make any subsequent steps easier to complete.)
History Name
“Name” to set (be sure to press
Save
)#: qiime2 pepsirf enrich [...] : dir_fmt_output.qza
6-10Z-HDI95-20CS-300000raw.qza
Ps-plot readCountsBoxplot¶
Here we will test q2-ps-plot’s readCountsBoxplot module by running the following command:
import qiime2.plugins.ps_plot.actions as ps_plot_actions
RCBoxplot_viz, = ps_plot_actions.readCountsBoxplot(
read_counts=read_counts,
)
ps_plot_actions <- import("qiime2.plugins.ps_plot.actions")
action_results <- ps_plot_actions$readCountsBoxplot(
read_counts=read_counts,
)
RCBoxplot_viz <- action_results$visualization
qiime ps-plot readCountsBoxplot \
--i-read-counts autopepsirf-diffEnrich/read_counts.qza \
--o-visualization RCBoxplot.qzv
zScatter, = use.action(
use.UsageAction(plugin_id='ps_plot', action_id='readCountsBoxplot'),
use.UsageInputs(
read_counts = read_counts
),
use.UsageOutputNames(
visualization = "RCBoxplot"
)
)
- Using the
qiime2 ps-plot readCountsBoxplot
tool: Set “read_counts” to
#: read-counts.qza
Press the
Execute
button.
- Once completed, for the new entry in your history, use the
Edit
button to set the name as follows: (Renaming is optional, but it will make any subsequent steps easier to complete.)
History Name
“Name” to set (be sure to press
Save
)#: qiime2 ps-plot readCountsBoxplot [...] : visualization.qzv
RCBoxplot.qzv
Ps-plot enrichmentRCBoxplot¶
Here we will test q2-ps-plot’s enrichmentRCBoxplot module by running the following command:
enrichedBoxplot_viz, = ps_plot_actions.enrichmentRCBoxplot(
enriched_dir=enrich,
)
action_results <- ps_plot_actions$enrichmentRCBoxplot(
enriched_dir=enrich,
)
enrichedBoxplot_viz <- action_results$visualization
qiime ps-plot enrichmentRCBoxplot \
--i-enriched-dir autopepsirf-diffEnrich/enrich.qza \
--o-visualization enrichedBoxplot.qzv
zScatter, = use.action(
use.UsageAction(plugin_id='ps_plot', action_id='enrichmentRCBoxplot'),
use.UsageInputs(
enriched_dir = enriched
),
use.UsageOutputNames(
visualization = "enrichedBoxplot"
)
)
- Using the
qiime2 ps-plot enrichmentRCBoxplot
tool: Set “enriched_dir” to
#: enrich.qza
Press the
Execute
button.
- Once completed, for the new entry in your history, use the
Edit
button to set the name as follows: (Renaming is optional, but it will make any subsequent steps easier to complete.)
History Name
“Name” to set (be sure to press
Save
)#: qiime2 ps-plot enrichmentRCBoxplot [...] : visualization.qzv
enrichedBoxplot.qzv
Ps-plot repScatters¶
Here we will test q2-ps-plot’s repScatters module by running the following command:
ZRepScatter_viz, = ps_plot_actions.repScatters(
zscore=zscore,
source=samples_col_mdc,
)
action_results <- ps_plot_actions$repScatters(
zscore=zscore,
source=samples_col_mdc,
)
ZRepScatter_viz <- action_results$visualization
qiime ps-plot repScatters \
--i-zscore autopepsirf-diffEnrich/zscore.qza \
--m-source-file samples-source.tsv \
--m-source-column source \
--o-visualization ZRepScatter.qzv
zScatter, = use.action(
use.UsageAction(plugin_id='ps_plot', action_id='repScatters'),
use.UsageInputs(
zscore = zscore,
source = samples_col,
),
use.UsageOutputNames(
visualization = "ZRepScatter"
)
)
- Using the
qiime2 ps-plot repScatters
tool: Expand the
additional options
sectionSet “zscore” to
#: zscore.qza
For “source”:
Leave as
Metadata from TSV
Set “Metadata Source” to
samples-source.tsv
Set “Column Name” to
source
Press the
Execute
button.
- Once completed, for the new entry in your history, use the
Edit
button to set the name as follows: (Renaming is optional, but it will make any subsequent steps easier to complete.)
History Name
“Name” to set (be sure to press
Save
)#: qiime2 ps-plot repScatters [...] : visualization.qzv
ZRepScatter.qzv
Ps-plot zenrich¶
Here we will test q2-ps-plot’s zenrich module by running the following command (replace pepsirf_binary with how you call pepsirf on your machine):
zenrich_scatter_viz, = ps_plot_actions.zenrich(
data=IM0032_pA_PV1_subset_CS,
zscores=zscore,
source=samples_col_mdc,
negative_controls=['SB_pA_A', 'SB_pA_B', 'SB_pA_D'],
pepsirf_binary='/home/runner/work/pepsirf-q2-plugin-docs/pepsirf-q2-plugin-docs/pepsirf',
)
action_results <- ps_plot_actions$zenrich(
data=IM0032_pA_PV1_subset_CS,
zscores=zscore,
source=samples_col_mdc,
negative_controls=list('SB_pA_A', 'SB_pA_B', 'SB_pA_D'),
pepsirf_binary='/home/runner/work/pepsirf-q2-plugin-docs/pepsirf-q2-plugin-docs/pepsirf',
)
zenrich_scatter_viz <- action_results$visualization
qiime ps-plot zenrich \
--i-data IM0032-pA-PV1-subset-CS.qza \
--i-zscores autopepsirf-diffEnrich/zscore.qza \
--m-source-file samples-source.tsv \
--m-source-column source \
--p-negative-controls SB_pA_A SB_pA_B SB_pA_D \
--p-pepsirf-binary /home/runner/work/pepsirf-q2-plugin-docs/pepsirf-q2-plugin-docs/pepsirf \
--o-visualization zenrich-scatter.qzv
zenrichScat, = use.action(
use.UsageAction(plugin_id='ps_plot', action_id='zenrich'),
use.UsageInputs(
data = col_sum,
zscores = zscore,
source = samples_col,
negative_controls = ["SB_pA_A","SB_pA_B","SB_pA_D"],
pepsirf_binary = "/home/runner/work/pepsirf-q2-plugin-docs/pepsirf-q2-plugin-docs/pepsirf"
),
use.UsageOutputNames(
visualization = "zenrich_scatter"
)
)
- Using the
qiime2 ps-plot zenrich
tool: Set “data” to
#: IM0032-pA-PV1-subset-CS.qza
Set “zscores” to
#: zscore.qza
Expand the
additional options
sectionFor “negative_controls”, use the
+ negative_controls
button to add the corresponding values:Add “element” set to
SB_pA_A
Add “element” set to
SB_pA_B
Add “element” set to
SB_pA_D
For “source”:
Leave as
Metadata from TSV
Set “Metadata Source” to
samples-source.tsv
Set “Column Name” to
source
Set “pepsirf_binary” to
/home/runner/work/pepsirf-q2-plugin-docs/pepsirf-q2-plugin-docs/pepsirf
Press the
Execute
button.
- Once completed, for the new entry in your history, use the
Edit
button to set the name as follows: (Renaming is optional, but it will make any subsequent steps easier to complete.)
History Name
“Name” to set (be sure to press
Save
)#: qiime2 ps-plot zenrich [...] : visualization.qzv
zenrich-scatter.qzv