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
#!/usr/bin/python | |
# Run KING to generate sample QC and IBD summary stats | |
# ./king_1.9 -b <data>.bed --bysample --prefix <prefix_for_output> | |
# ./king_1.9 -b <data>.bed --kinship --related --degree 2 --prefix <prefix_for_output> | |
# | |
# Run this script to create a list of exclusions (member of pair with least data will be excluded) | |
# python king.py --prefix <prefix_for_output> --out <output_file_name> | |
# Add error if no samples in kinship file. |
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
import subprocess | |
from goatools.semantic import get_info_content | |
from goatools.base import get_godag | |
from goatools.semantic import TermCounts | |
from goatools.anno.factory import get_objanno | |
godag = get_godag("go-basic.obo") | |
return_code = subprocess.call("wget https://ftp.ebi.ac.uk/pub/databases/GO/goa/HUMAN/goa_human.gpa.gz && gunzip goa_human.gpa.gz", shell=True) | |
anno = get_objanno('goa_human.gpa', 'gpad', godag=godag) |
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
from pybiomart import Dataset | |
dataset = Dataset(name='hsapiens_gene_ensembl', host='http://www.ensembl.org') | |
df = dataset.query(attributes=['ensembl_gene_id', 'external_gene_name', 'ensembl_transcript_id', 'transcript_is_canonical']) |
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
#!/usr/bin/env python | |
# Author: Guillaume Bouvier -- guillaume.bouvier@pasteur.fr | |
# https://research.pasteur.fr/en/member/guillaume-bouvier/ | |
# 2016-08-26 13:20:35 (UTC+0200) | |
# DSSP_SECONCARY.PY | |
# Trajectories of Secondary Structure by DSSP | |
# The keys [" ","B","E","G","H","I","T","S"] |
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
#!/bin/bash | |
cd /opt | |
export VERSION=1.14.12 OS=linux ARCH=amd64 && \ | |
wget https://dl.google.com/go/go$VERSION.$OS-$ARCH.tar.gz && \ | |
sudo tar -C /usr/local -xzvf go$VERSION.$OS-$ARCH.tar.gz && \ | |
rm go$VERSION.$OS-$ARCH.tar.gz | |
echo 'export GOPATH=${HOME}/go' >> ~/.bashrc && \ |
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
--- | |
- hosts: all | |
user: root | |
vars: | |
users: | |
- username: data | |
groups: "" | |
shell: /bin/true | |
- username: "test" | |
groups: sudo, data, docker |
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
--- | |
- hosts: all | |
user: root | |
tasks: | |
- name: Install prerequisites | |
apt: | |
name: ['apt-transport-https', 'ca-certificates', 'curl', 'gnupg2' ,'software-properties-common'] | |
update_cache: yes | |
- name: Add Docker GPG key |
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
--- | |
- hosts: compute | |
vars: | |
singularity_version: 3.5.2 | |
become: yes | |
tasks: | |
- name: install prerequisites | |
apt: | |
update_cache: yes | |
autoclean: yes |
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
' Adapted from https://stackoverflow.com/questions/34280088/ms-word-macro-for-converting-track-changes-markup-into-text | |
Sub TrackChangesToMarkup() | |
Dim chgAdd As Word.Revision | |
If ActiveDocument.Revisions.Count = 0 Then | |
MsgBox "There are no revisions in this document", vbOKOnly | |
Else | |
ActiveDocument.TrackRevisions = False | |
For Each chgAdd In ActiveDocument.Revisions |
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
#!/bin/bash | |
# script to transfer the contents of a remote directory to a local machine | |
# the script use a brute force approach where the transfer is repeated if | |
# the return code of the rsync command is anything other than 0 (e.g. if an error occurs) | |
USERNAME=root | |
REMOTE_HOST=192.168.1.1 | |
REMOTE_DIR=/home/example | |
LOCAL_DIR=. |
NewerOlder