-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #210 from jeromekelleher/docs-more-docs
More docs infrastructure
- Loading branch information
Showing
5 changed files
with
34 additions
and
23 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,30 +1,33 @@ | ||
--- | ||
jupytext: | ||
formats: md:myst | ||
text_representation: | ||
extension: .md | ||
format_name: myst | ||
kernelspec: | ||
display_name: Bash | ||
language: bash | ||
name: bash | ||
--- | ||
(sec-vcfpartition)= | ||
# vcfpartition | ||
```{code-cell} | ||
:tags: [remove-cell] | ||
cp ../../tests/data/vcf/CEUTrio.20.21.gatk3.4.g.bcf* ./ | ||
``` | ||
|
||
## Overview | ||
|
||
Partition a given VCF file into (approximately) a give number of regions: | ||
|
||
``` | ||
vcf_partition 20201028_CCDG_14151_B01_GRM_WGS_2020-08-05_chr20.recalibrated_variants.vcf.gz -n 10 | ||
``` | ||
gives | ||
``` | ||
chr20:1-6799360 | ||
chr20:6799361-14319616 | ||
chr20:14319617-21790720 | ||
chr20:21790721-28770304 | ||
chr20:28770305-31096832 | ||
chr20:31096833-38043648 | ||
chr20:38043649-45580288 | ||
chr20:45580289-52117504 | ||
chr20:52117505-58834944 | ||
chr20:58834945- | ||
|
||
```{code-cell} | ||
vcfpartition CEUTrio.20.21.gatk3.4.g.bcf -n 3 | ||
``` | ||
|
||
These reqion strings can then be used to split computation of the VCF | ||
into chunks for parallelisation. | ||
|
||
**TODO give a nice example here using xargs** | ||
```{code-cell} | ||
vcfpartition CEUTrio.20.21.gatk3.4.g.bcf -n 3 \ | ||
| xargs -P 3 -I {} sh -c "bcftools view -Hr {} CEUTrio.20.21.gatk3.4.g.bcf | wc -l" | ||
``` | ||
|
||
**WARNING that this does not take into account that indels may overlap** |