Created
March 19, 2018 17:39
-
-
Save clintval/3d9d92a576d4b9eff7d73452f92783fe to your computer and use it in GitHub Desktop.
Grab karyotype assembly from a reference genome
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # Pipe in the karyotype chromosomes | |
| # Prefix each chromosome name with `chr` if necessary | |
| # Slice the contigs from the source indexed FASTA with samtools | |
| # Output to file | |
| build="${build}" | |
| echo {1..20} X Y M \ | |
| | xargs printf -- 'chr%s ' \ | |
| | xargs samtools faidx "${build}".fa \ | |
| > "${build}".karyotype.fa |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment