View Single Post
Old 09-03-2012, 11:56 AM   #4
SES
Senior Member
 
Location: Vancouver, BC

Join Date: Mar 2010
Posts: 275
Default

Thanks for the information. What are you wanting to do with the 4 scores for each position? From this snippet it looks like the scores are the same and you could just remove the duplicate entries in the original file. Is this what you want? If so, you could just add one command to the original (assuming you are on a *nix machine).

Original file:
Code:
$ cat Chip-Seq.txt
chr1	3001356	3001381	U0	0	-
chr1	3001356	3001381	U0	0	-
chr1	3001356	3001381	U0	0	-
chr1	3001356	3001381	U0	0	-
chr1	3007329	3007354	U0	0	+
chr1	3013242	3013267	U0	0	-
chr1	3016493	3016518	U0	0	-
chr1	3016493	3016518	U0	0	-
chr1	3016493	3016518	U0	0	-
chr1	3053811	3053836	U0	0	+
chr1	3053930	3053955	U0	0	-
chr1	3053930	3053955	U0	0	-
chr1	3053930	3053955	U0	0	-
Command to create wiggle file:
Code:
$ uniq Chip-Seq.txt | grep "chr1" | cut -f1-3,5 > Chip-Seq_chr1_uniq.wig
chr1	3001356	3001381	0
chr1	3007329	3007354	0
chr1	3013242	3013267	0
chr1	3016493	3016518	0
chr1	3053811	3053836	0
chr1	3053930	3053955	0
Note that I'm not sure this is what you want, so let us know if there is a different output you had in mind.
SES is offline   Reply With Quote