Skip to content

Commit

Permalink
adds scripts
Browse files Browse the repository at this point in the history
  • Loading branch information
Geert van Geest committed Nov 29, 2024
1 parent 1956fcb commit 2160d21
Show file tree
Hide file tree
Showing 7 changed files with 42 additions and 5 deletions.
10 changes: 10 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,13 @@
.DS_Store
site
env/
data/
.cache/
.bash_history
.bashrc
.conda/
.config/
.lesshst
.local/
.profile
extensions/
2 changes: 1 addition & 1 deletion Docker/environment.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,5 +8,5 @@ dependencies:
- snpeff>=5.0
- gatk4=4.5
- r-base
- cnvkit
- cnvkit>=0.9.10
- bcftools
4 changes: 3 additions & 1 deletion scripts/01_download_data.sh
Original file line number Diff line number Diff line change
Expand Up @@ -59,4 +59,6 @@ bcftools view -Oz -r chr6,chr17 af-only-gnomad.hg38.vcf.gz > af-only-gnomad.hg38
bcftools index --tbi af-only-gnomad.hg38.subset.vcf.gz

bcftools view -Oz -r chr6,chr17 1000g_pon.hg38.vcf.gz > 1000g_pon.hg38.subset.vcf.gz
bcftools index --tbi 1000g_pon.hg38.subset.vcf.gz
bcftools index --tbi 1000g_pon.hg38.subset.vcf.gz

wget https://hgdownload.soe.ucsc.edu/goldenPath/hg38/database/refFlat.txt.gz
4 changes: 2 additions & 2 deletions scripts/07_get_pileups.sh
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ for sample in tumor normal
do
gatk GetPileupSummaries \
-I "$ALIGNDIR"/"$sample".rg.md.bam \
-V "$RESOURCEDIR"/af-only-gnomad.hg38.vcf.gz \
-L "$RESOURCEDIR"/af-only-gnomad.hg38.vcf.gz \
-V "$RESOURCEDIR"/af-only-gnomad.hg38.subset.vcf.gz \
-L "$RESOURCEDIR"/af-only-gnomad.hg38.subset.vcf.gz \
-O "$VARIANTDIR"/"$sample".pileups.table
done
2 changes: 1 addition & 1 deletion scripts/08_calculate_contamination.sh
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,4 @@ RESOURCEDIR=/config/data/resources
gatk CalculateContamination \
-I "$VARIANTDIR"/tumor.pileups.table \
-matched "$VARIANTDIR"/normal.pileups.table \
-O "$VARIANTDIR"/ontamination.table
-O "$VARIANTDIR"/contamination.table
11 changes: 11 additions & 0 deletions scripts/09_filter_variants.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
#!/usr/bin/env bash

ALIGNDIR=/config/data/alignments
REFDIR=/config/data/reference
RESOURCEDIR=/config/data/resources
VARIANTDIR=/config/data/variants

gatk FilterMutectCalls \
-R "$REFDIR"/ref_genome.fa \
-V "$VARIANTDIR"/somatic.vcf.gz \
-O "$VARIANTDIR"/somatic.filtered.vcf.gz
14 changes: 14 additions & 0 deletions scripts/10_run_cnvkit.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
#!/usr/bin/env bash

ALIGNDIR=/config/data/alignments
REFDIR=/config/data/reference
RESOURCEDIR=/config/data/resources
VARIANTDIR=/config/data/variants

cnvkit.py batch "$ALIGNDIR"/tumor.rg.md.bam \
--normal "$ALIGNDIR"/normal.rg.md.bam \
--targets "$REFDIR"/exome_regions.bed.interval_list \
--fasta "$REFDIR"/ref_genome.fa \
--annotate "$RESOURCEDIR"/refFlat.txt.gz \
--output-reference "$VARIANTDIR"/reference.cnn \
--output-dir "$VARIANTDIR"/cnvkit/

0 comments on commit 2160d21

Please sign in to comment.