how to make a dendogram tree out of bam/sam files.
1
1
Entering edit mode
9.5 years ago
lahat.albert ▴ 60

Hello,

I am trying to compare similarities between four bam files. Ideally in a cluster plot, and normalized for library size.

Anything would be helpful.

Thank you,

sam dendogram bam • 2.0k views
ADD COMMENT
0
Entering edit mode

Similarities in what exactly? Are these RNAseq alignments where you want to cluster things by normalized counts, or DNAseq where you're interested in clustering things according to the variants, or ...?

ADD REPLY
0
Entering edit mode

Sorry,

I want to cluster things by normalized counts.

ADD REPLY
0
Entering edit mode

Do you have the counts already or do you need to generate those? If you need to generate them still, are the alignments to the genome or transcriptome?

ADD REPLY
0
Entering edit mode

I have them aligned to the genome. I don't have the counts yet.

ADD REPLY
0
Entering edit mode
9.5 years ago

Thanks for clarifying what you have and what your goals are, that makes providing a useful answer much easier :)

The first thing you'll want to do is to generate counts for each of your BAM files. The fastest method (that I know of at least) is to use featureCounts. For this, you'll need not only your BAM files but also an annotation file for the model organism you're using[1]. The most convenient place to find such annotation (GTF or GFF3) files is where ever you downloaded the reference fasta file you used for alignment (so, normally Ensembl or UCSC).

After you have the counts generated with featureCounts, you can use any of the standard RNAseq packages in R (in particular, edgeR or DESeq2) to aid in generating the plots. The tutorials for each of these packages will have examples of loading data and performing the clustering. Note that using one of these packages is somewhat necessary, since clustering the raw counts will lead to incorrect results (i.e., these packages will normalize things and then allow you to use the normalized counts). For DESeq2, have a look at section 2.2.2 of the vignette of the most recent version.

[1] N.B., if whatever organism you're using doesn't have an annotation file, you can use cufflinks to generate a useable one.

ADD COMMENT

Login before adding your answer.

Traffic: 1867 users visited in the last hour
Help About
FAQ
Access RSS
API
Stats

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6