-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
9bf2df8
commit 8d310af
Showing
4 changed files
with
71 additions
and
7 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
############################################################################### | ||
# Filter TCAG small variant report | ||
############################################################################### | ||
library(tidyverse) | ||
|
||
args = commandArgs(trailingOnly = T) | ||
input_table <- read_tsv(args[1]) | ||
panel <- read_csv(args[2]) | ||
filtered_table <- input_table %>% filter(FILTER=="PASS", gene_symbol %in% panel$external_gene_name) | ||
write_excel_csv(filtered_table, args[3]) |
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 |
---|---|---|
@@ -0,0 +1,54 @@ | ||
#!/bin/bash | ||
#PBS -l walltime=23:00:00,nodes=1:ppn=1 | ||
#PBS -joe . | ||
#PBS -d . | ||
#PBS -l vmem=50g,mem=50g | ||
|
||
# 50g is crucial -20,30 crashes sometimes | ||
|
||
# load annotated vcf to gemini.db | ||
# parameters: | ||
# vcf = file.vcf.gz, no tabix index is needed in the dir | ||
# project = case = family = S11 (example) | ||
|
||
# qsub ~/cre/cre.vcf2cre.sh -v vcf=file.vcf.gz,project=412 | ||
|
||
. /hpf/largeprojects/ccmbio/naumenko/tools/bcbio_1.1.5/.test_profile | ||
|
||
bname=`basename $vcf .vcf.gz` | ||
|
||
bcftools query -l $vcf > samples.txt | ||
> $project.ped | ||
for sample in `cat samples.txt` | ||
do | ||
echo -e "1\t"$sample"\t0\t0\t0\t0" >> $project.ped | ||
done | ||
ped=$project.ped | ||
|
||
vcf2db.py $vcf.vcf.gz $ped ${project}-ensemble.db | ||
|
||
mkdir $project | ||
|
||
mv ${project}-ensemble.db $project | ||
|
||
mv $project.sorted.decomposed.vepeffects.annotated.vcf.gz ${project}/${project}-ensemble-annotated-decomposed.vcf.gz | ||
mv $project.sorted.decomposed.vepeffects.annotated.vcf.gz.tbi ${project}/${project}-ensemble-annotated-decomposed.vcf.gz.tbi | ||
|
||
cd $project | ||
ln -s ${project}-ensemble-annotated-decomposed.vcf.gz ${project}-gatk-haplotype-annotated-decomposed.vcf.gz | ||
ln -s ${project}-ensemble-annotated-decomposed.vcf.gz.tbi ${project}-gatk-haplotype-annotated-decomposed.vcf.gz.tbi | ||
|
||
cd .. | ||
|
||
rm $bname.no_anno.vcf.gz | ||
rm $bname.no_anno.vcf.gz.tbi | ||
|
||
rm $project.vcf.gz | ||
rm $project.vcf.gz.tbi | ||
|
||
rm $project.sorted*.vcf.gz | ||
rm $project.sorted*.vcf.gz.tbi | ||
|
||
echo "#####################################################" | ||
echo `date` " DONE" | ||
echo "#####################################################" |