How to separate read 1 and read 2 in a bed file?
Hi, I am trying to separate the read 1 from read 2 in a combined bed file. Could someone tell me how to do that? The format of the bed file is as follow:
1 13813 13913 K00153:157:HCY5TBBXX:7:1118:27702:29378/1 10 +
1 13978 14078 K00153:157:HCY5TBBXX:7:1118:27702:29378/2 10 -
1 15737 15837 K00153:157:HCY5TBBXX:7:2116:31061:37202/2 10 +
1 15737 15837 K00153:157:HCY5TBBXX:7:2103:20070:16753/2 10 +
1 16015 16115 K00153:157:HCY5TBBXX:7:2228:3589:26213/1 10 -
Thanks a lot!
• 1,258 views
•
link
1 answer
grep '\/2' your_file > read_2_file
grep -v '\/2' your_file > read_1_file
• 1 views
•
link
Log in to answer this question.