miRDeep2 tutorial

来源:https://drmirdeep.github.io/mirdeep2_tutorial.html

Extended miRDeep2 tutorial with step by step instructions. It will cover the mapper.pl for preprocessing and mapping, the miRDeep2.pl for de-novo prediction and the quantifier.pl for expression profiling.

Disclaimer

This tutorial comes with no warranty and demands common sense of the reader. I am not responsible for any damage that happens to your computer by using this tutorial. For comments or questions just create an 'issue' here

https://github.com/Drmirdeep/drmirdeep.github.io/issues

Apparently you will need a github account for that.

Preface

This is a step by step guide for a full small RNA sequencing data analysis using the miRDeep2 package and its patched files. The first part will describe the general workflow to do de-novo miRNA predictions based on a small RNAseq data seq and the second part will focus on expression analysis with the quantification module.

Installation instructions

If you haven't installed them yet you can obtain the main package frommiRDeep2and the patched files frompatchby clicking on 'Clone or download' and then on 'Download Zip'. Extract the zipped files and then open a command line window. If you have git installed you can obtain the packages also directly from the command line by typing

·git clone https://github.com/rajewsky-lab/mirdeep2.git·

and

git clone https://github.com/Drmirdeep/mirdeep2_patch.git

To install the miRDeep2 package enter the directory to which the package was extracted to. If you extracted the folder on the Desktop then typing

cd ~/Desktop/mirdeep2

will bring you to the mirdeep2 folder. Then typing

perl install.pl

will start the installer and download and install third party software. In particular. bowtie version 1, RNAfold, randfold and the perl packages PDF:API and TTF will be installed. Please follow the instructions on the screen. When mirdeep2 was installed successfully please open a new terminal window and just type

miRDeep2.pl

If you see the miRDeep2 usage instructions on the screen you can continue to install the patch. Otherwise something went wrong during the installation. In case everything worked fine you can now enter the directory of the mirdeep2_patch by typing

cd ~/Desktop/mirdeep2_patch

if you extracted the patched file to the Desktop. Typing

bash patchme.sh

will add the patched files to your mirdeep2 installation. After that we can start with some miRNA data analysis. Download the miRBase reference files for version 21 by typing

mirbase.pl 21

This will download the hairpin.fa.gz and mature.fa.gz for version 21 to directory ~/mirbase/21/

(The ~ sign will be expanded by your computer to your home directory).

If you want the gff files as well then you need to type

mirbase.pl 21 1

The second argument can be anything but 0 which will tell the script to also get the gff files from mirbase. For miRNA quantification we next extract the miRNAs for our species of interest. For that you need to know the 3-letter code of miRBase for your species. For humans this will be 'hsa' and mouse would be mmu. To extract the mature sequences from the mirbase file we downloaded before you just need to type

extract_miRNAs.pl ~/mirbase/21/mature.fa.gz hsa > mature_ref.fa

and to get the hairpin sequences by typing

extract_miRNAs.pl ~/mirbase/21/hairpin.fa.gz hsa > hairpin_ref.fa

For running miRDeep2 for de-novo miRNA prediction it is beneficial to supply also mature miRNAs from related species. You could for example use mouse 'mmu' and chimp 'ptr' as related species. For extracting those miRNAs you can type

extract_miRNAs.pl ~/mirbase/21/mature.fa.gz mmu,ptr > mature_other.fa

Tutorial files

In case you want to follow the tutorial with example data you can get the files from heretutorial_filesand type

unzip drmirdeep.github.io-master.zip

change to the unzipped directory with

cd drmirdeep.github.io-master

and continue with the tutorial.

The data and what else you will need

Usually you will have gotten a small RNA sequencing data file from a collaborator that wants you to analyze the data file. Before you can start with any kind of analysis you should either already know the small RNA sequencing adapter that was used for the sequencing of the sample or ask your collaborator to sent it to you. If you don't clip the adapter then the majority of the reads having an adapter are likely not to be aligned to anywhere.

Once you know the adapter sequence you should do a simple check to see how many of your sequences contain the adapter. This you can do by typing

grep -c TGGAATTC example_small_rna_file.fastq

where 'TGGAATTC' are the first 8 nucleotides of the adapter that has been used for this sample. Replace it with your own sequencing adapter. MicroRNAs have a mean length of 22 nucleotides in animals so if you have sequenced one of those it will likely have the sequencing adapter attached to it. If the resulting number of sequences with an adapter is around 70% of the number of your input sequences the data set can be considered as reasonably good. Note: In case that only adapters have been sequenced predominantly you will also get a high number which is obviously not good. If you only get 10% of sequences with an adpater then likely something went wrong during the sequnecing library preparation or your sample doesn't contain too many small RNAs. For novel miRNA prediction we need to map the reads against a reference database which has to be indexed by bowtie 1. For this we take a reference database file, lets call it refdb.fa (This can be a genome file or simply a file with scaffolds) and build a bowtie index by typing

bowtie-build refdb.fa refdb.fa

The first argument is here the actual file to index, the second argument is the prefix for the bowtie index files. You can name it differently but for ease of use I use the same name as my reference database file. Depending on the input file size it can take several hours (for the human genome for example) to be indexed. However, the bowtie website has already some prebuild index files for download. If you decide to download index files you will also need to download the fasta file with which the index was build. Otherwise the results in the miRDeep2 prediction will be not reliable.

Data preprocessing for novel miRNA prediction

Since the miRDeep2 package was designed as a complete solution for miRNA prediction and quantification it also contains data preprocessing routines that will also clip the sequencing adapter. The main function of the mapping module is the mapping of the preprocessed reads file to reference database. The reference database is typically an annotated genome sequence but can also be simply a scaffold assembly if no genome is available. The scaffolds itself however should be at least 200 nucleotides long so that a sane miRNA precursor plus some flanking region fits into it. Apart from clipping adapters the module does sanity checks on your sequencing reads and also collapse read sequences to reduce the file size which will save computing time.

mapper.pl example_small_rna_file.fastq -e -h -i -j -k TGGAATTC -l 18 -m -p refdb.fa -s reads_collapsed.fa -t reads_vs_refdb.arf -v -o 4

What does this command do? The first argument needs to be your sequencing file. Typically, this will be a fastq file. The format of the fastq file is designated by specifying option '-e'. If your file is in fasta format already you specify option '-c' instead. If your reads file is not in fasta format you need to specify option '-h' which advises the mapper module to parse your file to fasta format. Option -i will convert RNA to DNA and option '-j' will remove sequences that contain characters other than ACGTN.

Now comes the actual adapter clipping which is only done if a adapter sequence is given by option -k. Only the first 6 nucleotides of this sequence will be used to search for an exact match in the sequencing reads. Option '-m' will collapse the reads to remove redundancy and decrease the file size. A sequnecing read seen 10 times in your raw file will occur only once in the collapsed file and have a _x10 in its identifier.

After that the reads will be mapped to the given refence genome which index file was specified by option '-p'. Option -s indicates the preprocessed read file name which is output by the mapper module and option -t is the file name of the read mappings to the reference database ('refdb.fa') in miRDeep2's arf format. A mapping file in arf format can be easily obtained from a standard bowtie 1 output file (This is NOT in 'sam' format but a proprietary bowtie text file format) by typing

convert_bowtie_output.pl reads_vs_refdb.bwt > reads_vs_refdb.arf

However, if you used the mapping module then the mapped output file is already in arf format.

Identification of known and novel miRNAs

For predicting novel miRNAs the miRDeep2 module from the package is called with a collapsed reads file and a reference genome file in fasta format. For better prediction results reference files of miRNAs and related miRNAs should be given since miRDeep2 considers predicted miRNAs with conserved seeds in other species more reliable that miRNAs with non-conserved seeds.

miRDeep2.pl reads_collapsed.fa refdb.fa reads_vs_refdb.arf mature_ref.fa mature_other.fa hairpin_ref.fa -t hsa 2>report.log

Data preprocessing for miRNA expression profiling

最后编辑于
©著作权归作者所有,转载或内容合作请联系作者
  • 序言:七十年代末,一起剥皮案震惊了整个滨河市,随后出现的几起案子,更是在滨河造成了极大的恐慌,老刑警刘岩,带你破解...
    沈念sama阅读 204,530评论 6 478
  • 序言:滨河连续发生了三起死亡事件,死亡现场离奇诡异,居然都是意外死亡,警方通过查阅死者的电脑和手机,发现死者居然都...
    沈念sama阅读 86,403评论 2 381
  • 文/潘晓璐 我一进店门,熙熙楼的掌柜王于贵愁眉苦脸地迎上来,“玉大人,你说我怎么就摊上这事。” “怎么了?”我有些...
    开封第一讲书人阅读 151,120评论 0 337
  • 文/不坏的土叔 我叫张陵,是天一观的道长。 经常有香客问我,道长,这世上最难降的妖魔是什么? 我笑而不...
    开封第一讲书人阅读 54,770评论 1 277
  • 正文 为了忘掉前任,我火速办了婚礼,结果婚礼上,老公的妹妹穿的比我还像新娘。我一直安慰自己,他们只是感情好,可当我...
    茶点故事阅读 63,758评论 5 367
  • 文/花漫 我一把揭开白布。 她就那样静静地躺着,像睡着了一般。 火红的嫁衣衬着肌肤如雪。 梳的纹丝不乱的头发上,一...
    开封第一讲书人阅读 48,649评论 1 281
  • 那天,我揣着相机与录音,去河边找鬼。 笑死,一个胖子当着我的面吹牛,可吹牛的内容都是我干的。 我是一名探鬼主播,决...
    沈念sama阅读 38,021评论 3 398
  • 文/苍兰香墨 我猛地睁开眼,长吁一口气:“原来是场噩梦啊……” “哼!你这毒妇竟也来了?” 一声冷哼从身侧响起,我...
    开封第一讲书人阅读 36,675评论 0 258
  • 序言:老挝万荣一对情侣失踪,失踪者是张志新(化名)和其女友刘颖,没想到半个月后,有当地人在树林里发现了一具尸体,经...
    沈念sama阅读 40,931评论 1 299
  • 正文 独居荒郊野岭守林人离奇死亡,尸身上长有42处带血的脓包…… 初始之章·张勋 以下内容为张勋视角 年9月15日...
    茶点故事阅读 35,659评论 2 321
  • 正文 我和宋清朗相恋三年,在试婚纱的时候发现自己被绿了。 大学时的朋友给我发了我未婚夫和他白月光在一起吃饭的照片。...
    茶点故事阅读 37,751评论 1 330
  • 序言:一个原本活蹦乱跳的男人离奇死亡,死状恐怖,灵堂内的尸体忽然破棺而出,到底是诈尸还是另有隐情,我是刑警宁泽,带...
    沈念sama阅读 33,410评论 4 321
  • 正文 年R本政府宣布,位于F岛的核电站,受9级特大地震影响,放射性物质发生泄漏。R本人自食恶果不足惜,却给世界环境...
    茶点故事阅读 39,004评论 3 307
  • 文/蒙蒙 一、第九天 我趴在偏房一处隐蔽的房顶上张望。 院中可真热闹,春花似锦、人声如沸。这庄子的主人今日做“春日...
    开封第一讲书人阅读 29,969评论 0 19
  • 文/苍兰香墨 我抬头看了看天上的太阳。三九已至,却和暖如春,着一层夹袄步出监牢的瞬间,已是汗流浃背。 一阵脚步声响...
    开封第一讲书人阅读 31,203评论 1 260
  • 我被黑心中介骗来泰国打工, 没想到刚下飞机就差点儿被人妖公主榨干…… 1. 我叫王不留,地道东北人。 一个月前我还...
    沈念sama阅读 45,042评论 2 350
  • 正文 我出身青楼,却偏偏与公主长得像,于是被迫代替她去往敌国和亲。 传闻我的和亲对象是个残疾皇子,可洞房花烛夜当晚...
    茶点故事阅读 42,493评论 2 343

推荐阅读更多精彩内容

  • PLEASE READ THE FOLLOWING APPLE DEVELOPER PROGRAM LICENSE...
    念念不忘的阅读 13,432评论 5 6
  • 今天早上,才匆匆忙忙完成了2016年总结的第一部分——坚持篇。回首往事,要说话真的很多很多。除了坚持,更多的是感恩...
    巴山夜雨i阅读 196评论 2 2
  • 又到了年关了,逼婚催婚的话题又开始火热起来了,单身的男女们似乎都开始有点着急了。开始不断的参加相亲活动,不再拒绝某...
    何子姐阅读 155评论 0 1
  • 看着书 不知不觉的睡着
    Nicknamed阅读 202评论 0 0
  • 静静地 月亮挂在天边 我走在教室外的夜幕下 树影一点一点随着谁的脚步 编织起路灯暖暖 默默地 轻风飘在街口 你来到...
    一只走心的90single汪阅读 236评论 0 4