knitr::opts_chunk$set(echo = TRUE)
Help users to populate the RNA-Seq raw data processing commands in bash with little code, i.e. it can make your life easier if you frequently dowload and align RNA-Seq data from GEO.
Users only need to provide a collumn data, that means a table recording the design and names of the fastq files; The sample ids could directly be the RUN IDs from GEO.
devtools::install_github("ZhenWei10/RbashGEO")
GRanges
in R, the count is conducted by SummarizeOverlap
function in GenomicAlignment
package, which is transplanted from the HTSeq-count in python.library(RbashGEO) knitr::kable( Coldata_example[1:6,1:6] )
Only 2 collumns: SRR_RUN
and Lib
are neccessary to complete the work flow of this package, but addition collumns are valuable for their own good.
The design of the collumn table is summarized from this page on GEO.
library(RbashGEO) mapply(function(x,y) Rnohup(WgetQC(x,y),x), Coldata_example$SRR_RUN,Coldata_example$Lib == "Paired")
Rtrim_galore
before alignment.):library(RbashGEO) library(dplyr) mapply( function(x,y){ Rhisat2(Fastq_file_name = x, Paired = y, parallel_num = 1, Fastq_directory = getwd()) %>% Rnohup(.,paste0(x,"_hisat2"))}, Coldata_example$SRR_RUN, (Coldata_example$Lib == "Paired") )
hisat2_report <- RbashGEO::Check_hisat2_reports() knitr::kable(hisat2_report[1:6,-1*c(2,3,4)])
You should see a data.frame
with summarized outputs of hisat2.
library(RbashGEO) sapply( Coldata_example$SRR_RUN, function(x) Rnohup( Rsamtools_view(x,sam_end = ".sam",parallel_num = 1,flag_filter = 2820), x) )
SummarizedExperiment
object in R.At this step, we need to provide a GRanges
object for annotation, in this case we use Annotation_gr
as an example.
Count_SRRs(Coldata_example$SRR_RUN,"./",Annotation_gr,"Example_human_SE")
At last, the obtained SummarizedExperiment
object could be conveniently handeled with other QC, inference, and learning work flows.
If you are interested in MeRIP data, you could use meripQC;
if you are interested in the analysis of the RNA modification data, you could look m6ALogisticModel for more information.
sessionInfo()
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.