This is a test version of Biostars. For the public version, visit https://www.biostars.org.
Bamfile first step analysis

Hello everyone, I'm Patrizio and I'm new to R and in RNAseq.

I have a couple of small bam files that I'd like to compare. So far I've been able to reproduce examples online for the differential gene expression analysis, and to practice with biocompare working with bam files included in the package.

I want to analyze two bam files from an RNAseq but I can not find a way to convert this bam file in a package so that can be analyzed in R. How can I create a library containing my bam files?

Thank you

P

rna-seq

Hi, BAM files are obtained after quality filter of raw sequencing reads followed by alignment. Follow any RNA-seq analysis protocol/pipeline after alignment step. Example from below mentioned link to pipeline follow from Step 4 (check alignment quality),

A: Any One please provide protocol for Analysing long noncoding RNA illumina NGS da

Detailed tutorials for Step 6 (Differential expression analysis),

A: Differential gene expression using R studio

Hi EagleEye and thank you for your answer. I looked at many tutorials but what I want to know is, how can I load two bam files that I have on my desktop in R? once this is done maybe I can proceed with others steps.

for instance using this script: https ://gist.github.com/SamBuckberry/9914246

I can import one bam file, but in my case I have two of them which I want to use for the differential expression analysis.

can you help me with that?

thanks

Hi,

You do not have to load BAM file in R. Only Step 6 I mentioned in the above post need R, where you load simple text (matrix) file containing read counts of individual genes for your control and treatment sample.

Suggestion: I recommend you to discuss with some bioinformatician from your facility or take some course on RNA-seq analysis.

Here there is an example about how to analyze .bam files.

http://bioconductor.org/help/workflows/rnaseqGene/

I was able to follow the example after the installation of the required packages. In this example, there are 8 bam files in a package named "airway". This file are imported into R with a line

library("airway")

I thought I could do the same with my bam files after I create a package and use the same procedure. Is it possible to do that?

I wish I could know a bioinformatician to discuss about that but at the moment I don't know anybody available. If here there is somebody that can help me I would be glad and eventually I could pay his time.

Thank you

No, no, that's not how you typically do RNA-seq analysis. The 'Airway' package is just an example dataset for a tutorial.

Please use ADD COMMENT or ADD REPLY to answer to previous reactions, as such this thread remains logically structured and easy to follow. I have now moved your post but as you can see it's not optimal. Adding an answer should only be used for providing a solution to the question asked.

1 answer

I would recomend the R package Rsubread ( http://bioconductor.org/packages/Rsubread/ ) which allows you to quantify the genes in a BAM file thereby obtaining a count matrix for differential expression analysis. More specifically check the featureCounts() function.

esp featurecounts function

Log in to answer this question.