Question: how to get read density for the first 1000 nt of each transcript
0
gravatar for Sara
3.6 years ago by
Sara90
Sara90 wrote:

Hi,

I have 2 RNA-seq files for two samples and aligned them to the reference genome so I have BAM files. I would like to get the read density of the first 1000 nucleotides for all transcripts and then get the average of that in such a way I would get one value per sample (which is average read density for the first 1000 nt of all transcripts) . so far, in python I have got a dictionary containing one transcript per gene as a representative of gene (in this dictionary I have the gene name and transcript name). do you guys know how I can get the read density of the first 1000 nt for each transcript? the I can get the average of that.

Thanks

rna-seq next-gen sequence • 950 views
ADD COMMENTlink modified 20 months ago by Devon Ryan94k • written 3.6 years ago by Sara90

Why don't you create a bed file with first 1000bp of each transcript and get the coverage with bedtools or some other tool ? You can even get coverage at each base using genomecoverage function in bedtools. If you want it to be Python, there are many libraries in deeptools or HTseq packages.

ADD REPLYlink written 3.6 years ago by geek_y10k

then I would get the read density from the end of all transcripts and average them. at the end I am interested in the ratio of the average from the end and beginning of each transcript

ADD REPLYlink written 3.6 years ago by Sara90
1

The original question does not mention anything about "End" or "ratios".

ADD REPLYlink written 3.6 years ago by geek_y10k
0
gravatar for Devon Ryan
20 months ago by
Devon Ryan94k
Freiburg, Germany
Devon Ryan94k wrote:

About 22 months too late, but using deepTools:

  1. Use bamCoverage to get a bigWig of the files.
  2. Use computeMatrix reference-point -a 1000 on the bigWig files
  3. Use plotHeatmap --outFileNameMatrix with the output from above.

The last step will produce a text file with average density per bin per sample. You can then average that appropriately. You can change the bin sizes throughout (e.g., make it 1000 in step 2), but since you're averaging the heck out of everything anyway it's unlikely to make much of a difference.

ADD COMMENTlink modified 20 months ago • written 20 months ago by Devon Ryan94k
Please log in to add an answer.

Help
Access

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.
Powered by Biostar version 2.3.0
Traffic: 1225 users visited in the last hour