Hi All,
I have a file only with start position and the read counts against it.
7890 5678
7892 678
7990 645
I know the reads are 35 bp long and they are perfect match. Now I would like to visualize this data on the genome.
In visualization I would like to see the coverage and also be able to set a threshold for the number of reads. I know this is almost possible in UCSC genome browser, but not sure how to start with. or any packages in R to do this?
The idea is to be able to see the reads in the context of gene annotations and also the read counts.
Thanks a lot in advance! Any suggestions welcome...
1 answer
You can convert your file into a bedgraph file easily but you will need the chromosome name besides the start position. You can visualize a bedgraph file for inspection in a genome browser. You may also want consider converting the bedgraph file in to a bigwig file wich contains the same information but is indexed and, hence, faster to manipulate for most programms. See http://genome.ucsc.edu/FAQ/FAQformat.html#format6.1
Something like this will produce a valid bedgraph file:
awk 'BEGIN {OFS="\t"}{print "chrName", $1, $1+35, "0", $2}' <your file> | mergeBed -scores sum > bedgraph.bg
mergeBed is part of BEDtools, is needed to avoid repeated regions in the bedgraph file which are not allowed.
Log in to answer this question.