興味ある配列データ(特定の分類群の配列など)が指定したプライマーで増幅しうるかどうかをチェックするためのパッケージです。rentrez
を使って検索ワードにヒットした配列を Entrez (https://www.ncbi.nlm.nih.gov/Web/Search/entrezfs.html) からダウンロードし、seqkit amplicon
で指定したプライマーで増幅しうるかどうかチェックします。
macOS と Windows で動作確認しています。
seqkit
(https://bioinf.shenwei.me/seqkit/)tar -zxvf seqkit_darwin_amd64.tar.gz
でファイルを解凍sudo cp seqkit /usr/local/bin
でファイルをコピーseqkit version
でバージョン確認seqkit.exe
を C:\WINDOWS\system32
にコピーseqkit version
でバージョン確認rentrez
(https://github.com/ropensci/rentrez)ベータ版はRコンソール内で以下のコードを入力するとインストールできます。
# install.packages("devtools")
devtools::install_github("ong8181/rDoAMP")
Rで以下を入力すると検索ワードでヒットしてダウンロードされた配列の中で、指定したプライマーで増幅しうる配列が出力フォルダに保存されます。
# Load package
library(rDoAMP); packageVersion("rDoAMP")
# Display Help
?doamp_auto
?doamp_custom
?expand_degenerate_primer
# Load primer set
data(primer_set)
# Download sequence data and check whether MiFish primer set can amplify downloaded sequences
doamp_auto("Trachurus AND mitochondrion AND 1000:20000[SLEN]",
F_primer = primer_set$Animal12S_MiFish_U$forward, # MiFish-U-F
R_primer = primer_set$Animal12S_MiFish_U$reverse, # MiFish-U-R
n_mismatch = 3,
overwrite_output_dir = FALSE)
download.fa
: 指定した検索ワードによりダウンロードされた配列データamplified.fa
: プライマーとマッチした配列parameter_list.txt
: 解析に使用したパラメータリストexpanded_primer_list.tsv
: あり得るプライマーの組み合わせリスト (縮重プライマー使用時) stat.tsv
: ダウンロードした配列数、プライマーとマッチした配列数などの統計情報doamp_auto()
rentrez
により検索ワードにヒットした配列をダウンロードします。seqkit amplicon
により抽出します。seqkit amplicon
の --max-mismatch
も使用可能にします。doamp_auto(search_query,
F_primer,
R_primer,
n_retmax = 20,
n_retidmax = n_retmax * 10,
n_mismatch = 0,
random_sampling = TRUE,
random_sampling_seed = 1234,
output_dir = "rDoAMP_Out",
save_parameter = TRUE,
save_stat = TRUE,
overwrite_output_dir = FALSE)
search_query
: データベースの検索ワード (例. "Trachurus AND mitochondrion AND 1000:20000[SLEN]" など)F_primer
: フォワードプライマー配列R_primer
: リバースプライマー配列n_retmax
: 取得する配列の最大数。今の所、大きい値(だいたい > 500)を指定するとエラーとなります。n_retidmax
: 取得する配列 ID の数。デフォルトでは取得予定の配列数の10倍の ID を取得し、その中からランダムに配列をダウンロード。ダウンロードする配列の多様性を担保するためのオプション。n_mismatch
: 許容するプライマー - 鋳型間のミスマッチの数random_sampling
: 多めの配列 ID を取得して、その中からランダムに配列を取得するかどうかrandom_sampling_seed
: ランダムサンプリングのシード値output_dir
: 出力フォルダの名前。デフォルトは "rDoAMP_Out"。save_parameter
: 解析に使用したパラメータを保存するかどうかsave_stat
: 解析結果のサマリーを保存するかどうかoverwrite_output_dir
: 出力フォルダがすでに存在していた場合にフォルダを上書きするかどうか。上書きする場合は既存フォルダの中身は消去されるので注意。doamp_auto("Trachurus AND mitochondrion AND 1000:20000[SLEN]",
F_primer = "GTCGGTAAAACTCGTGCCAGC", # MiFish-U-F
R_primer = "CATAGTGGGGTATCTAATCCCAGTTTG", # MiFish-U-R
n_mismatch = 3)
doamp_custom()
seqkit amplicon
により抽出します。seqkit amplicon
の --max-mismatch
も使用可能にします。doamp_custom(target_fasta,
F_primer,
R_primer,
n_mismatch = 0,
output_dir = "rDoAMP_Out",
save_parameter = TRUE,
save_stat = TRUE,
overwrite_output_dir = FALSE)
farget_fasta
: ユーザ指定の配列データF_primer
: フォワードプライマー配列R_primer
: リバースプライマー配列n_mismatch
: 許容するプライマー - 鋳型間のミスマッチの数output_dir
: 出力フォルダの名前。デフォルトは "rDoAMP_Out"。save_parameter
: 解析に使用したパラメータを保存するかどうかsave_stat
: 解析結果のサマリーを保存するかどうかoverwrite_output_dir
: 出力フォルダがすでに存在していた場合にフォルダを上書きするかどうか。上書きする場合は既存フォルダの中身は消去されるので注意。doamp_custom("YOUR_FASTA.fasta",
F_primer = "GTCGGTAAAACTCGTGCCAGC", # MiFish-U-F
R_primer = "CATAGTGGGGTATCTAATCCCAGTTTG", # MiFish-U-R
n_mismatch = 3)
primer_set
data(primer_set)
と入力してロードして下さい。R functions to extract amplicons from target sequences using a user-specified primer set. - DOes my primer set AMPlify my targets? -
(Convenient wrapper functions for seqkit amplicon
)
Executable in macOS and Windows.
seqkit
(https://bioinf.shenwei.me/seqkit/)rentrez
(https://github.com/ropensci/rentrez)You can install the development version of rDoAMP from GitHub with:
# install.packages("devtools")
devtools::install_github("ong8181/rDoAMP")
# Load package
library(rDoAMP); packageVersion("rDoAMP")
# Display Help
?doamp_auto
?doamp_custom
?expand_degenerate_primer
# Load primer set
data(primer_set)
# Download sequence data and check whether MiFish primer set can amplify downloaded sequences
doamp_auto("Trachurus AND mitochondrion AND 1000:20000[SLEN]",
F_primer = primer_set$Animal12S_MiFish_U$forward, # MiFish-U-F
R_primer = primer_set$Animal12S_MiFish_U$reverse, # MiFish-U-R
n_mismatch = 3,
overwrite_output_dir = FALSE)
download.fa
: Downloaded sequence data using a user-specified search queryamplified.fa
: Sequence data that could be amplified by a specified primer setparameter_list.txt
: Parameter list used in the analysisexpanded_primer_list.tsv
: A list of primer combinations (only for degenerated primers)stat.tsv
: Statistical information such as the numbers of downloaded and amplified sequencesdoamp_auto()
rentrez
package of R.seqkit amplicon
.--max-mismatch
option of seqkit amplicon
for degenerated primers.doamp_auto(search_query,
F_primer,
R_primer,
n_retmax = 20,
n_retidmax = n_retmax * 10,
n_mismatch = 0,
random_sampling = TRUE,
random_sampling_seed = 1234,
output_dir = "rDoAMP_Out",
save_parameter = TRUE,
save_stat = TRUE,
overwrite_output_dir = FALSE)
search_query
: Search query for Entrez (e.g., "Trachurus AND mitochondrion AND 1000:20000[SLEN]")F_primer
: Forward primer sequenceR_primer
: Reverse primer sequencen_retmax
: The maximum number of sequences retrieved from Entrez. Current version does not accept a large number (e.g., > 500).n_retidmax
: The maximum number of IDs collected from Entrez. Among the IDs, n_retmax
sequences are retrieved. This option is set to increase the diversity of sequences retrieved.n_mismatch
: The maximum number of primer-template mismatches allowedrandom_sampling
: Logical. If TURE, n_retidmax IDs collected, and then n_retmax sequences are randomly collectedrandom_sampling_seed
: Random number seed for random_samplingoutput_dir
: Output directory namesave_parameter
: Logical. If TRUE, parameters used in the analysis savedsave_stat
: Logical. If TRUE, summary of the analysis savedoverwrite_output_dir
: Logical. If TRUE, overwrite the contents of output directory (the original contents of the output file will be deleted)doamp_auto("Trachurus AND mitochondrion AND 1000:20000[SLEN]",
F_primer = "GTCGGTAAAACTCGTGCCAGC", # MiFish-U-F
R_primer = "CATAGTGGGGTATCTAATCCCAGTTTG", # MiFish-U-R
n_mismatch = 3)
doamp_custom()
seqkit amplicon
.--max-mismatch
option of seqkit amplicon
for degenerated primers.doamp_custom(target_fasta,
F_primer,
R_primer,
n_mismatch = 0,
output_dir = "rDoAMP_Out",
save_parameter = TRUE,
save_stat = TRUE,
overwrite_output_dir = FALSE)
target_fasta
: FASTA file that contains target sequencesF_primer
: Forward primer sequenceR_primer
: Reverse primer sequencen_mismatch
: The maximum number of primer-template mismatches allowedoutput_dir
: Output directory namesave_parameter
: Logical. If TRUE, parameters used in the analysis savedsave_stat
: Logical. If TRUE, summary of the analysis savedoverwrite_output_dir
: Logical. If TRUE, overwrite the contents of output directory (the original contents of the output file will be deleted)doamp_custom("YOUR_FASTA.fasta",
F_primer = "GTCGGTAAAACTCGTGCCAGC", # MiFish-U-F
R_primer = "CATAGTGGGGTATCTAATCCCAGTTTG", # MiFish-U-R
n_mismatch = 3)
primer_set
data(primer_set)
.Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.