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
# cleanup all docker files on your system | |
sudo docker stop $(docker ps -a -q) | |
sudo docker rm $(docker ps -a -q) | |
sudo docker rmi `docker images -a -q` | |
# build container from github | |
docker build -t eden github.com/philippmuench/eden | |
# bild container locally | |
docker build --rm=true -t eden . |
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
# add this line to your Dockerfile (you also need to install Rbase) | |
RUN R -e 'install.packages("packrat" , repos="http://cran.us.r-project.org"); packrat::restore()' |
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
__author__ = "Anand M" | |
''' | |
Takes output file generated by VarScan2 somatic programme and converts the formats. | |
''' | |
import argparse, math, re | |
parser = argparse.ArgumentParser( | |
description="Converts VarScan2 somatic vcf to native format and vice-versa.\nInput is automatically detected") |
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
### description to run EDEN without the GUI, please be aware that some check routines are implemented inside the GUI and thus will not applied to the data (for example the check for validity of input files) | |
### commands that must be executed inside the docker container are written as `eden@4d4a16919ce0:~$ command` | |
# 1. run docker using the interactive mode | |
sudo docker run -p 80:3838 -i -t --entrypoint /bin/bash philippmuench/eden | |
eden@4d4a16919ce0:~$ mkdir /home/eden/data/fasta | |
# now the console inside the docker container should be visible `eden@4d4a16919ce0:~$`. This contains also the number of the docker instance, you should use this number for the following commands. If you get the Error "docker: Error response from daemon: driver failed programming external connectivity on endpoint jovial_jenning" please shutdown the running docker instance first. You can do this by usind `sudo docker ps` followed by 'sudo docker stop 4d4a16919ce0' (the last number is the instance ID, please use the instance ID showed a |
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 | |
import random | |
import sys | |
# space sequence characteristics | |
setsize_min = 2 # min number of spacer | |
setsize_max = 8 # max number of spacer | |
minlength = 30 # min length of spacer | |
maxlength = 40 # max length of spacer |
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 xml.etree.ElementTree as ET | |
tree = ET.parse('all_crispr.xml') | |
root = tree.getroot() | |
offset = 1000 | |
for id in root.findall("./Taxons/Taxon/Sequences/Sequence"): | |
refseq = id.find('RefSeq').text | |
for crispr in id.findall("CRISPRs"): | |
crispr_num = crispr.find('CRISPRCount').text | |
if int(crispr_num) > 0: | |
for name in crispr.findall("CRISPR"): |
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/sh | |
rm -rf log.txt # file where the taxid of skipped taxa will written to | |
max_treshold=20000 | |
mkdir -p out | |
while read line; do | |
pyla_name=$(echo $line | awk -F';' '{print $1}' | tr -s ' ' | tr ' ' '_') | |
txid=$(echo $line | awk -F';' '{print $2}') | |
echo "processing $pyla_name" | |
num_found=$(esearch -db protein -query "txid$txid[Organism:exp]"\ |
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
# cleanup | |
rm(list=ls()) | |
# load packages | |
require(vegan) | |
require(pander) | |
require(ggplot2) | |
require(ape) | |
library(RColorBrewer) |
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
install.packages("BiocManager") | |
BiocManager::install("Biostrings", version = "3.8") | |
BiocManager::install("biomaRt", version = "3.8") | |
install.packages("biomartr", dependencies = TRUE) | |
library(biomartr) | |
getGenome(db = "genbank", organism = "GCA_003138775.1", reference = FALSE) |
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
n1 = 9196 # total number of lysis positive genomes | |
y1 = 830 # number of lyssis positive genemes among colicin B positive genomes | |
n2 = 303 # total number of lysis negative genomes | |
y2 = 20 # lysis negative genomes among colicin B positive genomes | |
# SIMULATION | |
I = 10000 # simulations | |
theta1 = rbeta(I, y1 + 1, (n1 - y1) + 1) | |
theta2 = rbeta(I, y2 + 1, (n2 - y2) + 1) | |
diff = theta1 - theta2 # simulated diffs |
OlderNewer