I have a following type of bed file and I would like to convert this giant bed file chromosome wise into number of files with each of its name like chromosome1.txt, chr2.txt etc..
I know that I can deal with the command line. But is there any specific tool that does this job.? New to bioinformatics.
chr1 3000362 3000437 HWI-D00249:1648:BHT7HFBCXX:1:1211:14232:51942 255 +
chr1 3000656 3000731 HWI-D00249:1648:BHT7HFBCXX:2:2111:6651:57733 255 +
I have the following commandline code but I need a tool
awk '{print $1 }' ./temp2.bed | uniq | while read chr
do
#isolate rows with each chr, and then write the rows on each chr files
.
sed -n /${chr}[[:blank:]]/p ./temp2.bed > ./BedFiles/${1}_${chr}.txt
done