Skip to content

Instantly share code, notes, and snippets.

View IsmailM's full-sized avatar
👋
Focusing

Ismail Moghul IsmailM

👋
Focusing
View GitHub Profile
@IsmailM
IsmailM / genevalidator_blast_db.md
Last active October 11, 2018 20:16
Setting Up BLAST Databases for GeneValidator

GeneValidator - Setting Up BLAST Databases

GeneValidator requires a protein BLAST database in order to fully analyse all sequences. The GeneValidator package includes the Swissprot BLAST database.

Choosing the right BLAST database is essential in order to obtain the best results with GeneValidator. For example, SwissProt contains high quality, manually curated genes, but is a lot smaller than a larger database such as Non-Redundant database. On the hand, the Non-Redundant database contains lower-quality genes. An alternative would be creating BLAST database from a database of a closely related species.

Download BLAST databases from NCBI

GeneValidator contains a script (ncbi-blast-dbs that downloads pre-formatted BLAST databases from NCBI.

So add the following two functions to your ~/.jq
# This one simply selects any variants below the value that you've selected
# echo 'def rare($k): select(.custom_annotations?[$k["db"]][]?.fields?[$k["key"]] < $k["val"]);' >> ~/.jq
# This one selects any variants with fewer custom annotations than the arg $v
# echo 'def no_annotation($v): select(.custom_annotations | length <= v);' >> ~/.jq
cat test.10.VEP.json | wc -l
# 1000
cat test.10.VEP.json | jq -c 'rare({db: "gnomad_genomes", val: 0.0001, key: "AF_raw"})' | wc -l
@IsmailM
IsmailM / sshd_config
Created February 5, 2018 19:05 — forked from kjellski/sshd_config
This is an example real-world sshd_config with a nice little example at the end. A match clause that enables different setting for specific ranges than general settings...
# This is the sshd server system-wide configuration file. See
# sshd_config(5) for more information.
# This sshd was compiled with PATH=/usr/bin:/bin:/usr/sbin:/sbin
# The strategy used for options in the default sshd_config shipped with
# OpenSSH is to specify options with their default value where
# possible, but leave them commented. Uncommented options change a
# default value.
@IsmailM
IsmailM / web-servers.md
Created February 3, 2018 19:23 — forked from willurd/web-servers.md
Big list of http static server one-liners

Each of these commands will run an ad hoc http static server in your current (or specified) directory, available at http://localhost:8000. Use this power wisely.

Discussion on reddit.

Python 2.x

$ python -m SimpleHTTPServer 8000
@IsmailM
IsmailM / analysis.sh
Last active April 4, 2018 15:03
VEP analysis
#!/usr/bin/env bash
[ $# -eq 0 ] && { echo "Usage: $0 VCF_file.vcf.gz CADD_file.tsv.gz"; exit 1; }
#set -ex
# DIRECTORIES
VEP=$HOME/d/.progz/ensembl-vep/vep
ANALYSIS_DIR=$HOME/d/analysis
@IsmailM
IsmailM / analysis.sh
Created December 4, 2017 15:38
VEP analysis
# DIRECTORIES
VEP=$HOME/data/.progz/ensembl-vep/vep.pl
ANALYSIS_DIR=$HOME/data/analysis
### VEP --ASSEMBLY param
ASSEMBLY_FASTA=${ANALYSIS_DIR}/reference/human_g1k_v37_decoy.fasta
### VEP Custom Annotation
DBSNP_DB=${ANALYSIS_DIR}/dbsnp/All_20161121.vcf.gz
KAVIAR_DB=${ANALYSIS_DIR}/kaviar/VEP_annotation.vcf.gz
GNOMAD_DIR=${ANALYSIS_DIR}/gnomad
@IsmailM
IsmailM / .Rprofile
Last active December 2, 2020 23:53
R profiles
if (!require("pacman")) install.packages("pacman")
p_load("glue")
options(width = 600) # wide display with multiple monitors
options(digits.secs = 3) # show sub-second time stamps
options(useFancyQuotes = FALSE)
options(datatable.print.class = TRUE)
options(datatable.print.keys = TRUE)
cran_repo <- "https://packagemanager.rstudio.com/all/__linux__/centos7/latest"
options(repos = c(REPO_NAME = cran_repo))
@IsmailM
IsmailM / geodiver.dockerfile
Created June 10, 2017 14:01
geodiver dockerfile
# GEODiver
# - http://geodiver.co.uk
# - Publication: https://doi.org/10.1101/127753
# VERSION 1.0.0
FROM ubuntu:16.04
MAINTAINER Ismail Moghul <[email protected]>
LABEL Description="GEODiver" Version="1.0.0"
#!/usr/bin/Rsript
# ---------------------------------------------------------
# Filename : DGEA.R
# Authors : IsmailM, Nazrath, Suresh, Marian, Anissa
# Description : Differential Gene Expression Analysis
# Run : Rscript download_GEO.R --accession GDS5093 --outrdata ~/Desktop/GDS5093.RData
# ---------------------------------------------------------
#############################################################################
# Gene Expression Analysis #
@IsmailM
IsmailM / ggmap.R
Last active May 11, 2017 18:32
create ggmaps schematic of users
# install.packages('devtools')
# library(devtools)
# devtools::install_github("dkahle/ggmap")
library(ggmap)
library(plyr)
# data <-read.csv("/home/ucbtmog/locations.csv", header = FALSE)
# Redone to use post code instead
data <- read.csv("/home/ucbtmog/locations_long.csv", header = TRUE)