Skip to content

Instantly share code, notes, and snippets.

View adefelicibus's full-sized avatar

Alexandre Defelicibus adefelicibus

  • A.C.Camargo
  • Brazil
View GitHub Profile
@adefelicibus
adefelicibus / snakefile
Last active July 19, 2018 19:15
Snakemake log issue #912
# Create the directory fake/test and the file fake/test/sample.Mutect2.snpSift.vcf.gz
# Run on cluster, example:
# snakemake --cluster 'bash ' -j1 -p
rule all:
input:
expand(
"fake/test/{t}.Mutect2.snpSift.hardfilter.vcf.gz",
t=['sample']),
#!/usr/bin/env python3
import requests
import hashlib
import getpass
password = getpass.getpass()
hash = hashlib.sha1(password.encode("utf8")).hexdigest().upper()
head, rest = hash[:5], hash[5:]
r = requests.get("https://api.pwnedpasswords.com/range/%s" % head)
Download Google Drive files with WGET
Example Google Drive download link:
https://docs.google.com/open?id=[ID]
To download the file with WGET you need to use this link:
https://googledrive.com/host/[ID]
Example WGET command:
@adefelicibus
adefelicibus / ensembl_vep_86_with_offline_cache.md
Created October 30, 2017 10:16 — forked from ckandoth/ensembl_vep_86_with_offline_cache.md
Install Ensembl's VEP v86 with various caches for running offline

Ensembl's VEP (Variant Effect Predictor) is popular for how it picks a single effect per gene as detailed here, its CLIA-compliant HGVS variant format, and Sequence Ontology nomenclature for variant effects.

To follow these instructions, we'll assume you have these packaged essentials installed:

## For Debian/Ubuntu system admins ##
sudo apt-get install -y build-essential git libncurses-dev

## For RHEL/CentOS system admins ##
sudo yum groupinstall -y 'Development Tools'
sudo yum install -y git ncurses-devel
@adefelicibus
adefelicibus / split-vcf-by-sample.sh
Created January 31, 2017 18:29
Split a vcf file by samples
for file in *.vcf*; do
for sample in `bcftools view -h $file | grep "^#CHROM" | cut -f10-`; do
bcftools view -c1 -Oz -s $sample -o ${file/.vcf*/.$sample.vcf.gz} $file
done
done
@adefelicibus
adefelicibus / install-samtools-bcftools-and-htslib.md
Last active April 3, 2024 20:49
Install samtools, bcftools and htslib on linux

Install Samtools, BCFTools and htslib on linux

Install some build dependencies

sudo apt-get install autoconf automake make gcc perl zlib1g-dev libbz2-dev liblzma-dev libcurl4-gnutls-dev libssl-dev libncurses5-dev

[samtools]

@adefelicibus
adefelicibus / pvac-seq.md
Created September 21, 2016 20:36
Install pvac-seq on Ubuntu

Install dependecies

$ sudo apt-get install mysql-server mysql-client mysql-common libmysqlclient-dev
$ sudo apt-get install build-essential git-core cmake zlib1g-dev libncurses-dev patch
$ sudo apt-get install samtools

Create a new enviromnent to pvac-sec

@adefelicibus
adefelicibus / conda-caRpools.md
Last active August 18, 2016 19:17
Install caRpools on Linux using Conda

Create a conda environment to be used with caRpools

$ conda create -n carpools -y pip

Activate the new env

$ source activate carpools
@adefelicibus
adefelicibus / conda-r.md
Last active February 12, 2021 18:12
How to install R 3.2.2 using a conda environment on CentOS

Download Miniconda

  • Python 2.7
    # 32 bits
    $ wget https://repo.continuum.io/miniconda/Miniconda2-latest-Linux-x86.sh
    # 64 bits
    $ wget https://repo.continuum.io/miniconda/Miniconda2-latest-Linux-x86_64.sh
@adefelicibus
adefelicibus / gunicorn_start.bash
Created July 1, 2016 12:11 — forked from postrational/gunicorn_start.bash
Example of how to set up Django on Nginx with Gunicorn and supervisordhttp://michal.karzynski.pl/blog/2013/06/09/django-nginx-gunicorn-virtualenv-supervisor/
#!/bin/bash
NAME="hello_app" # Name of the application
DJANGODIR=/webapps/hello_django/hello # Django project directory
SOCKFILE=/webapps/hello_django/run/gunicorn.sock # we will communicte using this unix socket
USER=hello # the user to run as
GROUP=webapps # the group to run as
NUM_WORKERS=3 # how many worker processes should Gunicorn spawn
DJANGO_SETTINGS_MODULE=hello.settings # which settings file should Django use
DJANGO_WSGI_MODULE=hello.wsgi # WSGI module name