Plotting average profiles
0
0
Entering edit mode
6.6 years ago
elisheva ▴ 120

Hi everyone! I have bed files of damage rates that I'd like to display graphically.
For example, I have these 2 files where column number 8 is the normalized damage rate:
File A:

chr1    1090351 1093351 1   0   -   11  0.00366667
chr1    1093351 1096351 1   0   +   15  0.005
chr1    1437425 1440425 1   0   -   8   0.00266667
chr1    1440425 1443425 1   0   +   13  0.00433333
chr1    1837483 1840483 1   0   -   13  0.00433333
chr1    1840483 1843483 1   0   +   11  0.00366667

File B:

chr1    1090351 1093351 1   0   -   13  0.00433333
chr1    1093351 1096351 1   0   +   16  0.00533333
chr1    1437425 1440425 1   0   -   19  0.00633333
chr1    1440425 1443425 1   0   +   7   0.00233333
chr1    1837483 1840483 1   0   -   13  0.00433333
chr1    1840483 1843483 1   0   +   15  0.005

I want to generate an average profile where x axis represents the genomic location and y axis the damage rate.
I did something like this before with "seqPattern" library for dinucleotides frequencies.
Like this profile: TSS profile

Does anyone have any suggestion for generating the kind of profile for the damage rates?

R Bioconductor • 1.9k views
ADD COMMENT
2
Entering edit mode

Hi,

Short answer to this question is deepTools. You can explore more example here from deeptools

ADD REPLY
0
Entering edit mode

This tool requires bigWig file.
How can I generate such file, if I have only the bed files? And how can I enter the damage level into it?
I tried to use bedGraphToBigWig command, But I get this error: "Overlapping regions in bedGraph line 17 of tmp_sorted.bedgraph" Although my 'tmp_sorted.bedgraph's line 17 doesn't overlap any regions: (line 17 is the line before the last line)

chr1    1090351 1093351 0.001
chr1    1093351 1096351 0.000
chr1    1437425 1440425 0.001
chr1    1440425 1443425 0.000
chr1    1837483 1840483 0.000
chr1    1840483 1843483 0.000
chr1    6792385 6795385 0.001
chr1    6795385 6798385 0.000
chr1    6800919 6803919 0.000
chr1    6803919 6806919 0.000
chr1    8011248 8014248 0.001
chr1    8014248 8017248 0.001
chr1    8061773 8064773 0.000
chr1    8064773 8067773 0.001
chr1    8097782 8100782 0.000
chr1    8100782 8103782 0.000
chr1    8103290 8106290 0.000
chr1    8104835 8107835 0.000
ADD REPLY
2
Entering edit mode

If you notice your file carefully, till line number 17 it covers continuous chromosomal positions. The chromosomal region from 8106290 to 8104835 is missing in the file. bedGraphToBigWig command require continuous chromosomal regions, (which i guess from error you mentioned). You can fix your .bdg file using bedtools genomecov. Generate your .bdg file using bedtools genomecov with options -bga -split. Hopefully it will be fixed.

ADD REPLY

Login before adding your answer.

Traffic: 1747 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