Skip to content

Commit

Permalink
cre.gemini.get_variants4gene
Browse files Browse the repository at this point in the history
  • Loading branch information
naumenko-sa committed Mar 18, 2019
1 parent 4b29e81 commit 736e4ed
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 4 deletions.
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -172,6 +172,7 @@ vcf.platypus.getNV.sh ${family}-platypus-annotated-decomposed.vcf.gz
* cre.coverage.bamstats05.sh - calculate coverage
* cre.fixit.sh - fixes sample names
* cre.gemini_load.sh loads vep-annotated vcf to gemini db.
* cre.gemini.get_variants4gene.sh - pull all varaints for a specific gene.
* cre.gnomad_scores.R - download and parse gnomad scores.
* cre.immunopanels.R - annotates CRE report with 6 immunopanels.
* cre.kinship.R - to plot relatedness (kinship) diagram for a group of samples. Sometimes helps to detect and solve mislabelling.
Expand Down
5 changes: 2 additions & 3 deletions cre.bcbio.upgrade.star.sh
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#!/bin/bash
#PBS -l walltime=23:00:00,nodes=1:ppn=10
#PBS -l walltime=240:00:00,nodes=1:ppn=10
#PBS -joe .
#PBS -d .
#PBS -l vmem=31g,mem=31g
Expand All @@ -10,9 +10,8 @@ which bcbio_nextgen.py
hostname

# sometimes cannot upgrade STAR on data nodes - memory is low, or cannot take much CPUs
# can take more than a day
export PATH=/hpf/largeprojects/ccmbio/naumenko/tools/bcbio_testing/bin:$PATH && STAR \
--genomeDir /hpf/largeprojects/ccmbio/naumenko/tools/bcbio_testing/genomes/Hsapiens/GRCh37/star \
--genomeFastaFiles /hpf/largeprojects/ccmbio/naumenko/tools/bcbio_testing/genomes/Hsapiens/GRCh37/seq/GRCh37.fa \
--runThreadN 10 --limitGenomeGenerateRAM 30000000000 --genomeChrBinNbits 14 --runMode genomeGenerate --genomeSAindexNbases 14


14 changes: 13 additions & 1 deletion cre.gemini.get_variants4gene.sh
100644 → 100755
Original file line number Diff line number Diff line change
@@ -1,3 +1,15 @@
#!/bin/bash
# use case: when somebody wants to see all variants in a gene
# usage:
# cre.gemini.get_variants4gene.sh [db] [sample] [gene]
# output:
# gene.csv

db=$1
sample=$2
gene=$3

query="select chrom,start+1 as pos,ref,alt,type,sub_type,gene,exon,codon_change,impact,gts."$sample",dp,rs_ids,gnomad_af_popmax,clinvar_sig,cadd_phred,hgvsc from variants where gene='"$gene"'"
echo $query
gemini query --header -q "$query" $db | sed s/"\t"/","/g > $gene.csv

gemini query --header -q "select chrom,start+1,ref,alt,type,sub_type,gene,exon,codon_change,impact,gts.1247R_329260,depth,rs_ids,max_aaf_all,clinvar_sig,cadd_scaled,vep_hgvsc from variants where gene='NLRP3'" 1247R-ensemble.db > NLRP3.tsv

0 comments on commit 736e4ed

Please sign in to comment.