Friday, November 28, 2014

Create distribution plots for two bed files

If you want to use HOMER perl script to create distribution plots of two bed files you would need first to convert one of them into the bedgraph file (the one you want to plot the distribution of) using bedtools, see previous post

After you have finished this you would need to run script: file1.bed hg19 -size 400 -hist 1 -bedGraph > outputfile

The command above will calculate distribution of the regions in the bedgraph file ( within 400 bp centered on each peak in the bed file (file1.bed) with the resolution of 1 bp.

You can calculate distribution for as many bedgraph files as you need using the command below: file1.bed hg19 -size 400 -hist 1 -bedGraph > outputfile

How to convert bed to bedgraph

If you want to make bedgraph file starting from bed use bedtools:

bedtools genomecov -bg -i file.bed -g -bg > would be a file with sizes in bp for each chromosome,
e.g. for human genome hg19 make file and copy paste lines below

chr1    248956422
chr2    242193529
chr3    198295559
chr4    190214555
chr5    181538259
chr6    170805979
chr7    159345973
chr8    145138636
chr9    138394717
chr10   133797422
chr11   135086622
chr12   133275309
chr13   114364328
chr14   107043718
chr15   101991189
chr16   90338345
chr17   83257441
chr18   80373285
chr19   58617616
chr20   64444167
chr21   46709983
chr22   50818468
chrX    156040895
chrY    57227415

Tuesday, November 11, 2014

If Logitech K400r keyboard gets blocked

I bought Logitech K400r wireless keyboard with touchpad, and it gets blocked from time to time. Switching it off and on doesn't help.

But to get it back working press PC lock button to log off and then log in back again with your password and not sure why, but it works.