I'm a student and a beginner with R tool for RNA-seq analysis. I've some Fastq files that I want to (i) convert into BAM file using LIMMA package in R and (ii) make an alignment with genome reference using Tophat tool.
The problem is that, after reading the LIMMA user guide, I didn't catch what scripts use for those preliminary analysis.
I recommend you first extensively study this recent guide for RNA-seq analysis, published by some of the big names in the field of RNA-seq analysis. After than, please google around for tutorials on RNA-seq analysis. There are plenty of these both in the web, e.g.:
Also, Tophat itself is a very old tool, not recommended for alignment anymore. Read about more recent alternatives such as HISAT2 and STAR, or transcript quantifiers such as Salmon or Kallisto (manuals and tutorials can be found via google). It will take some time to get a proper background, but I definitely recommend spending quality time on reading before diving into the analysis.
Thanks lot, I already read documentation and workflow concerning packages. But they don't show how to convert fastq file to BAM file because maybe they thinks it's preliminary things and it's my big problem because I don't know to do that. What I need are the script using to do that with R.
You will not find any shortcut for doing literature stuff yourself. The guides suggest many tools for fastq conversion, e.g. HISAT2 for alignment. Next step, google hisat2 user guide, which includes all the commands to process a fastq file and get the final BAM. I know it is appealing to get spoon-feeding but eventually it will only harm you because you will not learn and realize where the pitfalls and limitations are for the different approaches and that means that you will not be able to stand up and make claims based on whatever result you get.
For a complete noob running your command line tools is not a simple task. I would recommend you get someone who has done this before to guide you through it the first time. You are going to need to download a genome, transcriptome annotation, and tools to do the alignments/sorting/indexing.
Do not bother yourself with BWA or Bowtie. Both are not suited for RNA-seq as they do not support spliced alignments. What are spliced alignments and why is this important => read the literature I linked above before jumping into any analysis =)
Generally, most people will do the very first steps, i.e. QC and alignment of the raw reads stored within the FASTQ files, outside of R, e.g. using STAR or Salmon/Kallisto as described in this workflow by Mike Love. If you want to do the alignment using an R package, you may want to give the Rsubread package a try.
I totally agree with the links above and the recommendation by Benformatics to try to find someone who's done this before. To read up on the details of the different file formats and the actual code you might need, you can read our course notes, but most likely it will go a lot smoother if you have someone you can turn to in person.
It is not possible to analyze the entire RNAseq data in R or even if it is, it is tedious. I would suggest this tutorial as they provide and use example data in tutorial: https://github.com/griffithlab/rnaseq_tutorial (from Griffith lab) and there are few blogs like https://digibio.blogspot.com/2017/10/rnaseq-data-analysis-tuxedo-new-protocol.html. If you want to use Limma, you should be looking at Limma-voom worfklow.