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 / bismark.config
Created February 17, 2020 14:47
config for nf-core/methylseq
/*
* -------------------------------------------------
* Base Nextflow config file
* -------------------------------------------------
* This file contains basic process requirement setup
* It DOES NOT contain any config for cluster, so will run
* in default mode by itself. It should be used with
* the max_memory, max_cpus and max_time params for
* customising hardware limits
*/
@IsmailM
IsmailM / Directory_setup.sh
Last active September 26, 2019 19:11
GemBS Config
# Folder setup
# contains reference indexes
ref_indexes:
dbsnp.index ref_indexes/hg38.BS.gem ref_indexes/hg38.BS.info ref_indexes/hg38.contig.sizes
fastq:
- GM12878_1:
- GM12878_1_1.fastq.gz
- GM12878_1_2.fastq.gz
---
destination:
type: library
name: 'PGP-UK Open Access Data'
description: 'Open Access Genomic, Transcriptomic and Methylomic Data from the Personal
Genome Project UK. DOI: 10.1186/s12920-018-0423-1'
items:
- name: Genetic Data (WGS)
description: Open access WGS data from the PGP-UK Project
items:
@IsmailM
IsmailM / analysis.sh
Last active June 24, 2019 16:36
Running DeepCpG
#!/bin/bash
[ $# -eq 0 ] && { echo "Usage: $0 SAMPLE_NAME"; exit 1; }
set -ex
export THEANO_FLAGS='device=cuda,floatX=float32'
export CPLUS_INCLUDE_PATH=/usr/local/cuda-10.1/include
export KERAS_BACKEND=theano
ROOT_DIR=/home/ucbtmog/deepcpg

Bedtools Cheatsheet

General:

Tools Description
flank Create new intervals from the flanks of existing intervals.
slop Adjust the size of intervals.
shift Adjust the position of intervals.
subtract Remove intervals based on overlaps b/w two files.

Access macOS localhost from IE or Edge within Parallels Desktop

This issue is so infuriating that I'm going to take some time to write about it.

  1. MOST IMPORTANT. Your local development server must be bound to IP address 0.0.0.0. Some do this by default, but many don't. You need to make sure that you run your local server with correct IP bindings. You may need to provide additional flags to your serve commands e.g. polymer serve --hostname domain.local, hugo serve --bind 0.0.0.0. If you use a named domain like domain.local, it has to be defined in /etc/hosts and pointing at 0.0.0.0.

  2. My Parallels setting is using Shared Network, nothing special there.

  3. Open macOS Terminal and type ifconfig. Look for the value under vnic0 > inet. It is typically 10.211.55.2.

@IsmailM
IsmailM / pgp_download.sh
Last active August 24, 2018 19:25
Tutorial on how to download data from PGP-UK - https://www.personalgenomes.org.uk/data/
# Download PGP Data CSV
# Contains three columns:
# - PGP-UK Hex ID
# - Direct Link
# - Type of Data
wget https://www.personalgenomes.org.uk/data/data_file_links.csv
# Here we display the Types of Data that are available
cat data_file_links.csv | cut -d ',' -f 3 | sort | uniq -c
@IsmailM
IsmailM / pigzc.sh
Created August 20, 2018 22:48 — forked from olivierpierre/pigzc.sh
Compress a directory tree into a tarball using pigz
#!/bin/sh
if [ "$1" == "" ]; then
echo "Usage: $0 <folder to compress>"
exit
fi
NAME=`basename $1`
tar -c --use-compress-program=pigz -f $NAME.tar.gz $NAME
@IsmailM
IsmailM / Wgbs_analysis.r
Last active July 15, 2018 18:36
analysing WGBS data in R
# install.packages('data.table')
# install.packages('ggplot2')
# install.packages('GenomicRanges')
library('data.table')
library('ggplot2')
library(GenomicRanges)
# OUTPUT from GEMBS
read_filtered_cpg_file <- function(file, project_title) {
header <- c('contig', 'position', 'reference.genotype', 'called.genotype', 'genotype.score',

tmux cheatsheet

As configured in my dotfiles.

start new:

tmux

start new with session name: