Answers for "bash sort bed file by chrom start end"

1

bash sort bed file by chrom start end

# Basic syntax:
sort -V -k1,1 -k2,2 input_file.bed > sorted_file.bed
# This sorts alphanumerically by chromosome and then byvstart position 
#	and then by end position, producing a file order like:
chr1	1	10
chr1	2	5
chr2	1	10
.		.	.
.		.	.
.		.	.
chr10	1	10
.		.	.
.		.	.
.		.	.
chrX	1	10
chrY	1	10
Posted by: Guest on October-04-2020

Code answers related to "Shell/Bash"

Browse Popular Code Answers by Language