模拟一个简单计算器

Read simulators are widely being used within the research community to create synthetic and mock datasets for analysis. In this article, I will introduce some recently proposed, commonly used read simulators.

阅读模拟器在研究社区中被广泛使用,以创建用于分析的综合和模拟数据集。 在本文中,我将介绍一些最近提出的,常用的读取模拟器。

DNA测序和读取 (DNA Sequencing and Reads)

If you have come across my previous article on DNA Sequence Data Analysis, you may have read about DNA sequencing. Sequencing is the process that determines the precise order of nucleotides of a given DNA molecule. We can determine the order of the four bases adenineguaninecytosine and thymine, in a strand of DNA. DNA sequencing is used to determine the sequence of individual genes, full chromosomes or entire genomes of an organism.

如果您看过我以前有关DNA序列数据分析的文章,那么您可能已经阅读了有关DNA测序的信息。 测序是确定给定DNA分子核苷酸精确顺序的过程。 我们可以确定四个碱基的腺嘌呤 , 鸟嘌呤 , 胞嘧啶胸腺嘧啶的顺序, 在DNA链中。 DNA测序用于确定生物的单个基因,完整染色体或完整基因组的序列。

Special machines known as sequencing machines are used to extract short random DNA sequences from a particular genome we wish to determine (target genome). Current DNA sequencing technologies cannot read one whole genome at once. It reads small pieces of between 100 and 30,000 bases, depending on the technology used. These short pieces are called reads.

使用称为测序机的特殊机器从我们希望确定的特定基因组( 目标基因组 )中提取随机的短DNA序列。 当前的DNA测序技术无法一次读取一个完整的基因组。 根据所使用的技术,它可以读取100到30,000个碱基之间的小片段。 这些短片段称为读取 。

读模拟器 (Read Simulators)

Sequencing machines may not be available as we wish and we may not be able to get hold of real-world samples to sequence. This is where read simulators come in handy for research purposes. Read simulators can mimic sequencing machines to simulate reads. They have pre-defined statistical models to mimic the error rates relevant to the particular sequencing machines. Furthermore, we can provide our own error models as well (different rates of insertions, deletions and substitutions).

测序机器可能无法如我们所愿,并且我们可能无法掌握现实世界中的样品进行测序。 在这里,阅读模拟器可用于研究目的。 阅读模拟器可以模仿测序仪来模拟阅读。 他们具有预定义的统计模型,可以模拟与特定测序仪相关的错误率。 此外,我们还可以提供自己的错误模型(插入,删除和替换的比率不同)。

估计测序覆盖率 (Estimating sequencing coverage)

Sequencing coverage is defined as the average number of reads that covers each base of the reference genome. Estimating the sequencing coverage is very important when you are simulating datasets. The coverage equation is defined as follows.

测序覆盖率定义为覆盖参考基因组每个碱基的平均读取数。 模拟数据集时, 估计测序覆盖率非常重要。 覆盖方程定义如下。

C = LN / G

C = LN / G

  • C is the sequencing coverage
    C是测序覆盖率
  • G is the length of the genome
    G是基因组的长度
  • L is the read length
    L是读取长度
  • N is the number of reads
    N是读取次数

For example, if you have a genome of length 5Mbp and you simulate 1,000,000 HiSeq 2000 reads (read length is 100bp), then we will get a sequencing coverage of 20x as follows.

例如,如果您的基因组长度为5Mbp,并且模拟了1,000,000个HiSeq 2000读取(读取长度为100bp),那么我们将获得如下20x的测序覆盖率。

C = LN / G = 100 * 1,000,000 / 5,000,000 = 20x

Here, at least each position of the reference genome is covered by 20 reads.

在这里,参考基因组的至少每个位置被20个读数覆盖。

估计丰度 (Estimating Abundance)

The abundance of a species in a dataset is considered as the fraction of reads that belong to that species. For example, if there is a dataset with 10,000,000 reads and 1,000,000 of them belong to E. coli, then the abundance of E. coli will be 0.1.

数据集中物种的丰富度被视为属于该物种的读段的分数。 例如,如果存在具有10,000,000的数据集的读取和它们的百万属于大肠杆菌 ,然后大肠杆菌的丰度为0.1。

Note that coverage and abundance are not the same.

请注意,覆盖范围和丰度不同。

短读模拟器 (Short Read Simulators)

With the popularity of next-generation sequencing (NGS) technologies, many NGS read simulators have been developed. Currently, many of the popular short read simulators are designed to simulate reads mimicking many Illumina, 454 and SOLiD platforms. Listed below are some popular short read simulators. Links to their publications are provided as well.

随着下一代测序(NGS)技术的普及,已经开发了许多NGS读取模拟器。 当前,许多流行的短读模拟器被设计为模拟模仿许多Illumina,454和SOLiD平台的读。 下面列出了一些流行的简短阅读模拟器。 还提供了指向其出版物的链接。

  1. MetaSim

    MetaSim

  2. wgsim

    wgs​​im

  3. SimNGS

    SimNGS

  4. ArtificialFastqGenerator

    人工快速生成器

  5. InSilicoSeq

    InSilicoSeq

长读模拟器 (Long Read Simulators)

With the advancements in sequencing technologies, scientists have shown an increasing interest in using third-generation sequencing (TGS) technologies. Currently, many of the popular long read simulators are designed to simulate reads mimicking the two main TGS technologies; (1) Pacific Biosciences (PacBio) and (2) Oxford Nanopore (ONT). Listed below are some of the popular and recently introduced PacBio and ONT simulators. Links to their publications are provided as well.

随着测序技术的进步,科学家对使用第三代测序(TGS)技术的兴趣日益浓厚。 当前,许多流行的长读模拟器被设计为模拟模仿两种主要TGS技术的读操作。 (1) 太平洋生物科学(PacBio)和(2) 牛津纳米Kong(ONT) 。 下面列出的是一些最近流行的PacBio和ONT模拟器。 还提供了指向其出版物的链接。

PacBio模拟器 (PacBio Simulators)

  1. PBSIM

    PBSIM

  2. LongISLND

    长ISLND

  3. SimLoRD

    模拟神

  4. NPBSS

    全国公共广播电台

  5. PaSS

    通过

ONT模拟器 (ONT Simulators)

  1. NanoSim

    纳米模拟

  2. Nanopore SimulatION

    纳米Kong模拟

  3. DeepSimulator

    深度模拟器

  4. DeepSimulator1.5

    DeepSimulator1.5

InSilicoSeq (InSilicoSeq)

I have been using InSilicoSeq in my work a lot and I find it very intuitive and easy to use. I will walk you through some sample commands to simulate reads. You can easily install InSilicoSeq using conda or pip.

我在工作中经常使用InSilicoSeq ,发现它非常直观且易于使用。 我将引导您完成一些示例命令以模拟读取。 您可以使用轻松安装InSilicoSeq condapip 。

conda install -c bioconda insilicoseq
OR
pip install InSilicoSeq

Simulate reads by providing the number of reads

通过提供读取次数来模拟读取

Assume that you have a single reference genome and you want to simulate 1 million Illumina MiSeq reads. Given below is a sample command you can run using InSilicoSeq.

假设您有一个参考基因组,并且您想模拟一百万个Illumina MiSeq读数。 下面给出的是可以使用InSilicoSeq运行的示例命令。

iss generate --model miseq --genomes ref.fasta --n_reads 1M --cpus 8 --output reads

Simulate reads by providing the coverage

通过提供覆盖范围来模拟阅读

Assume that you have two reference genome files ref1.fasta and ref2.fasta. You want to simulate 30x coverage from ref1 and 10x coverage from ref2. You will need to create a tab-separated file named coverages.tsv and add the coverage details as follows.

假设您有两个参考基因组文件ref1.fastaref2.fasta 。 您要模拟ref1 30x覆盖率和ref2 10x覆盖率。 您将需要创建一个以制表符分隔的文件,名为coverages.tsv ,并按如下所示添加coverage的详细信息。

red1_id     30
ref2_id     10

ref1_id and ref2_id refer to the identifiers of the filesref1.fasta and ref2.fasta. If you download the reference genomes from NCBI, the identifies will consist of letters and numbers and for example, may look something like thisNC_007712.1 or CP001844.2. These identifiers are NCBI accession numbers provided for each reference genome.

ref1_idref2_id引用文件ref1.fastaref2.fasta 。 如果从NCBI下载参考基因组,则标识将由字母和数字组成,例如,看起来可能类似于NC_007712.1CP001844.2 。 这些标识符是为每个参考基因组提供的NCBI登录号。

Now you can simulate the reads using the following command.

现在,您可以使用以下命令模拟读取。

iss generate --model miseq --genomes ref1.fasta ref2.fasta --coverage coverages.tsv --cpus 8 --output reads

Simulate reads by providing the abundance

通过提供丰富的内容来模拟阅读

Assume that you have two reference genome files ref1.fasta and ref2.fasta. You want to simulate 0.4 abundance from ref1 and 0.6 abundance from ref2. Note that the sum of all the abundance values should be 1.0. Similar to coverage, you will need to create a tab-separated file named abundance.tsv and add the abundance details as follows.

假设您有两个参考基因组文件ref1.fastaref2.fasta 。 您要模拟ref1 0.4丰度和ref2 0.6丰度。 注意所有丰度值的总和应为1.0 。 与覆盖范围类似,您将需要创建一个制表符分隔的文件abundance.tsv ,并按如下所示添加丰度详细信息。

red1_id     0.4
ref2_id     0.6

Now you can simulate the reads using the following command.

现在,您可以使用以下命令模拟读取。

iss generate --model miseq --genomes ref1.fasta ref2.fasta --abundance abundance.txt --cpus 8 --output reads

You can read more details from the InSilicoSeq documentation.

您可以从InSilicoSeq文档中详细信息。

PBSIM (PBSIM)

PBSIM is a PacBio reads simulator which provides both sampling-based and model-based simulations. I will walk you through some sample commands to simulate reads using PBSIM.

PBSIM是PacBio读取模拟器,它提供基于采样和基于模型的模拟。 我将引导您完成一些示例命令,以使用PBSIM模拟读取。

基于模型的仿真 (Model-based simulation)

For model-based simulation, you can run the following command.

对于基于模型的仿真,可以运行以下命令。

pbsim --data-type CLR --depth 100 --length-min 10000 --length-max 20000 --prefix test --model_qc data/model_qc_clr ref.fasta

The model can be found in the PBSIM folder PBSIM-PacBio-Simulator/data/model_qc_clr. The data type CLR refers to Continuous Long Read which simulates long and high error rates. The other data type CCS refers to Circular consensus Read which simulates short and low error rates.

该模型可以在PBSIM文件夹PBSIM-PacBio-Simulator/data/model_qc_clr 。 数据类型CLR是指连续长读取 ,它模拟长错误率和高错误率。 另一种数据类型CCS指的是“ 循环共识读取” ,它可以模拟短错误率和低错误率。

基于采样的模拟 (Sampling-based simulation)

For sampling-based simulation, you can run the following command.

对于基于采样的模拟,可以运行以下命令。

pbsim --data-type CLR --depth 100 --sample-fastq sample/sample.fastq sample/sample.fasta

The sample FASTQ file can be found in the PBSIM folder PBSIM-PacBio-Simulator/sample/sample.fastq. You can use your own FASTQ file as well.

样本FASTQ文件可在PBSIM文件夹PBSIM-PacBio-Simulator/sample/sample.fastq 。 您也可以使用自己的FASTQ文件。

You can read more details from the PBSIM documentation.

您可以从PBSIM文档中详细信息。

模拟神 (SimLoRD)

SimLoRD is a TGS read simulator based on the Pacific Biosciences SMRT error model. I have frequently used SimLoRD to simulate PacBio datasets for my work. I will walk you through some sample commands to simulate reads using SimLoRD.

SimLoRD是基于Pacific Biosciences SMRT错误模型的TGS读取模拟器。 我经常使用SimLoRD为我的工作模拟PacBio数据集。 我将引导您完成一些示例命令,以使用SimLoRD模拟读取。

通过提供读取次数来模拟定长读取 (Simulate fixed-length reads by providing the number of reads)

Assume that you have a reference genome and you want to simulate fixed-length reads with 60x coverage. Given below is a sample command you can run using SimLoRD.

假设您有一个参考基因组,并且想要模拟覆盖率是60x固定长度读取。 下面给出的是可以使用SimLoRD运行的示例命令。

simlord --read-reference ref.fasta --coverage 60 --fixed-readlength 5000 output_prefix

通过提供覆盖范围来模拟定长读取 (Simulate fixed-length reads by providing the coverage)

Assume that you have a reference genome and you want to simulate 2000 fixed-length reads. Given below is a sample command you can run using SimLoRD.

假设您有一个参考基因组,并且想要模拟2000个固定长度的读取。 下面给出的是可以使用SimLoRD运行的示例命令。

simlord --read-reference ref.fasta --num-reads 2000 --fixed-readlength 5000 output_prefix

You can also set a minimum length for the reads using the --min-readlength parameter during the simulation. You can read more from the SimLoRD documentation.

您还可以在仿真过程中使用--min-readlength参数设置读取的最小长度。 您可以从SimLoRD文档中了解更多信息。

最后的想法 (Final Thoughts)

Read simulators have given us the opportunity to simulate reads ranging from zero errors to very high error rates. Also, they have allowed us to create synthetic and mock datasets mimicking different sequencing machines and different species compositions.

读取模拟器使我们有机会模拟从零错误到很高错误率的读取。 此外,它们还使我们能够创建模仿不同测序仪和不同物种组成的合成和模拟数据集。

Hope you found this article useful and informative as a starting point towards using read simulators. Feel free to use these tools for your projects and research work as they are freely available.

希望您发现本文对使用阅读模拟器有帮助,并为您提供了有益的信息。 您可以免费使用这些工具来进行项目和研究工作。

Cheers, and stay safe!

干杯,保持安全!

You can read my previous articles related to bioinformatics and DNA analysis.

您可以阅读我以前有关生物信息学和DNA分析的文章。

翻译自: https://medium.com/computational-biology/a-simple-introduction-to-read-simulators-bbeff4f0c0c6

模拟一个简单计算器

模拟一个简单计算器_阅读模拟器的简单介绍相关推荐

  1. java 一元稀疏多项式简单计算器_一元稀疏多项式简单的计算器

    共回答了25个问题采纳率:92% 一元稀疏多项式计算器设计程序代码 #include #include #include #include #define maxlen 10 #define larg ...

  2. java编写简单计算器_编写java程序简单计算器

    展开全部 主要涉及的知识点: 类的e69da5e887aa3231313335323631343130323136353331333365653863写法, 以及方法的调用 .建议多做练习. 如果有看 ...

  3. c语言程序 实现简单计算器功能,C语言实现简单计算器小项目

    昨天刚安装上devc++,半夜想着练练C语言吧 于是就看到实验楼有一个计算器的项目 之前做过一次,这次写的主要是思路 首先我们先从原理思考jia,实现简单的计算器就要具备加减乘除这些,看普通的计算器也 ...

  4. java swing 简单计算器_用java swing编写一个简单的计算器

    用java swing实现的一个简单的计算器:一些swing的基础应用. 注释里有详解,直接上代码: package 简易计算器; import java.awt.BorderLayout; impo ...

  5. python编写一个简单计算器_如何用Tkinter写个简单计算器

    上机实践课程开始了,嗯,老师来了之后念了下PPT,然后说:开始做吧......... 然后就开始了Python的GUI之路,以前没接触过PYthon的可视化界面(虽然这样很不明智) 但是现在做起来感觉 ...

  6. vb.net 模拟鼠标 失去焦点_健身房模拟器中文版 游戏攻略分享

    健身房模拟器是一款PC模拟器游戏,游戏中玩家将以第一人称视角,观看自己在健身房的锻炼,期间你可以选择各种训练项目,十分真实的场景与动作刻画,能够让玩家在这里体验更真实,铃锻炼.俯卧撑.仰卧起坐.卧推, ...

  7. python计算器简单代码_自学python之简单计算器

    前戏就不多啰嗦了,自爆一下基础,让想学python的朋友有个信心: 我是平面设计出身,现在主要从事的工作是前端狗,所以说我基础也是很弱的,套用一句世界杯期间的广告语: 我不是天生强大,我只是天生要强! ...

  8. win32api.sendmessage模拟鼠标点击_安卓模拟器一键宏设置教程

    一.什么是一键宏 一键宏是指宏指令,主要作用是一键触发多个点击事件:游戏玩家可以用来设置一键连招,一键发言等功能:因此成为一键宏. 二.如何设置一键宏 打开雷电模拟器,点击右侧栏按键按钮,找到&quo ...

  9. java模拟一个军队作战_战区级联合作战仿真推演系统

    联合作战模拟推演系统是国内第一套真正具有实战意义的对抗模拟推演系统.相较于传统兵棋推演,该系统在核心引擎.推演功能柔性重组.模型架构体系设计.推演机制符合实战.规则数据开放透明.战场环境辨识精细等方面 ...

最新文章

  1. tf.io.gfile.glob 遍历文件
  2. Javascript学习总结三(Array对象的用法)
  3. 将深度学习技术应用于基于情境感知的情绪识别
  4. 压缩base 64字符串_ftp下载多个文件,ftp下载多个文件打包成一个压缩包
  5. 替换url中的参数值
  6. [SimplePlayer] 2. 在屏幕上显示视频图像
  7. 微型计算机和接口技术考题,微型计算机接口技术以及应用考题
  8. 阿里达摩院提出新型优化方法,一行代码即可替换现有优化器
  9. 2017.4.26 组合数问题 思考记录
  10. 基准对象object中的基础类型----元组 (五)
  11. java版mc植物生长条件_植物生长三大必要条件
  12. ECMAScript6 新特性——“数组的扩展”
  13. 伺服电机转矩常数的标定方法
  14. z17刷机miui12教程_努比亚Z17 MIUI12开发版 匠心独特 完美ROOT 隐私升级 通知栏升级...
  15. 清明时节雨纷纷路-清明节习俗、诗词欣赏
  16. vtk 的vtkimagereslice实现三视图的显示
  17. epublib java_java中使用Epublib解析EPub文件
  18. UE4 4.26 Pixel Streaming 应用场景
  19. byteTrack数据集categories不规范带来的问题
  20. GEEer成长日记十三:Landsat_SR计算地表温度时间序列

热门文章

  1. 打破Transformer宿命,新秀VOLO开源!横扫CV多项记录,首个超越87%的模型
  2. 集员法对3D激光雷达和相机的外部校准
  3. 图像反光能被一键去除了?港科大开源RFC,仅用一个操作,强反光也能完美去除|CVPR2021...
  4. uNetXST:将多个车载摄像头转换为鸟瞰图语义分割图像
  5. 汇总| SLAM优秀开源工程
  6. linux可以远程装机吗,linux 远程装机
  7. numpy 中的 random.rand() 函数
  8. 解决: AttributeError: module 'cv2' has no attribute 'SURF'
  9. bazel源码编译Tensorflow
  10. 用seaborn 画出唯美的论文专用图片,自己定制python画图的数据集