How can I split a VCF file by chromosome?

I have a VCF file (format = vcf_bgzip) and I would like to obtain multiple separate VCF files by chromosome. I would appreciate any help into how to achieve this using Galaxy. Here is a sample file:

##fileformat=VCFv4.2
##FILTER=<ID=PASS,Description="All filters passed">
##contig=<ID=1,length=249250621>
##contig=<ID=10,length=135534747>
## several other hashes and text
#CHROM	POS	ID	REF	ALT	QUAL	FILTER	INFO	FORMAT	SampleName
1	69869	rs548049170	A	.	.	.	.	GT	0/0
1	565508	rs9283150	T	.	.	.	.	GT	./.
1	727841	rs116587930	C	.	.	.	.	GT	0/0
1	752721	rs3131972	T	G	.	.	.	GT	1/1

Dear @anchor,
You can do this with Text reformatting with awk
using the following AWK Program: $0 ~ /^[1#]/ {print $0}

You can run this multiple times and just change the [1#] for chromosome 1 to [2#] for chromosome 2 and so on.

Cheers,
Florian

If you are searching for an effective and reliable solution to split large-sized VCF files? Then I would suggest you use the VCF Splitter tool. It splits the large-sized VCF items such as contacts etc., This tool supports all versions of vCard and maintained the data integrity throughout the conversion process. The free version of the VCF splitter tool splits VCF files per folder.

Visit at :https://www.osttopstapp.com/split-vcf.html