Friday, June 5, 2015

How to separate vcf file into separate chromosomes

Certain tools will need vcf files to be separated by chromosome.
You can do this with awk:
!/^#/ select all hte lines that are not comments
print>$1 separate by first column

cat file.vcf | awk '!/^#/{print>$1}'

No comments:

Post a Comment