Entering edit mode
4.7 years ago
praasu
▴
40
I am looking for program to convert bedgraph file to bed file. Thanks a lot for you any help or suggestion in advance.
Bedgraph example input :
track type=bedGraph name="peaks_id76673" description="peaks in group_4271" db=mm9 color="120,101,172" priority="20" maxHeightPixels="100:50:0" altColor="200,120,59" visibility="full"
chr1 3016963 3016964 1
chr1 3016964 3016965 3
chr1 3204552 3204553 -2
chr1 3204659 3204660 -1
Output example: bed file with strand and score separated:
chr1 3016963 3016964 . + 1
chr1 3016964 3016965 . + 3
chr1 3204552 3204553 . - 2
chr1 3204659 3204660 . - 1
Something like this should work (not tested)
Thank you, It is just giving first 3 column. I want to information from 4th column as well. It contains score and strand. I want to them to be separate.
Your output example was different in the original thread, I though you wanted to merge side-by-side regions. Also, what's the point of making score signs (+/-) as a new column? You are converting a quantitative information into strand information.
I thought it was confusing, So I changed it. The input file consists of both strand information (+/-) and score (coverage value). I want to put strand (+/-) into a separate column and score into a separate column.