Skip to content

Instantly share code, notes, and snippets.

Avatar

Alexandros Kanterakis kantale

View GitHub Profile
@kantale
kantale / do.py
Last active Jul 17, 2020
Create random VCXF file from 1000 Genomes Project
View do.py
import random
import re
import gzip
import glob
def get_chr(x):
return int(re.search(r'chr([\d]+)', x).group(1))
def fil(lg):
@kantale
kantale / Dockerfile
Last active Mar 23, 2020
netdata + nginx as proxy
View Dockerfile
FROM ubuntu:16.04
RUN apt-get update && \
apt-get install -y uuid-dev zlib1g-dev gcc make autoconf automake pkg-config libtool libpcre3-dev wget && \
wget -O "libuv-v1.35.0.tar.gz" https://github.com/libuv/libuv/archive/v1.35.0.tar.gz && \
tar zxvf libuv-v1.35.0.tar.gz && \
mkdir -p /libuv-build && \
(cd libuv-1.35.0/; sh autogen.sh; ./configure --prefix=/libuv-build; make; make install)
RUN mkdir -p /netdata-build && \
@kantale
kantale / lesson_1.ipynb
Created Oct 17, 2019
Μάθημα python 17 Οκτωβρίου 2019
View lesson_1.ipynb
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@kantale
kantale / notes.md
Last active Oct 17, 2019
Προγραμματισμός με τη γλώσσα python 2019-2020
View notes.md

Επικοινωνία

Πρόγραμμα

  • Week 1: Εισαγωγή στη python, γιατί python; anaconda installation, περιβάλλον ανάπτυξης jupyter, markdown, social coding, primitive data types and operations, strings, boolean logic, slicing
  • Week 2: Lists, tuples, for, while, if_then_else, continue, break. Whitespaces for indentation
  • Week 3: List comprehensions
  • Week 4: functions, variable scope, map/reduce, functional programming, recursive functions
  • Week 5: Dictionaries, complex data types, dictionary comprehensions, sets, set comprehensions
  • Week 6: Sorting, Counting, Filtering, lambda functions, generators, generator comprehensions
@kantale
kantale / lesson_1.ipynb
Created Oct 17, 2019
First lesson in python
View lesson_1.ipynb
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@kantale
kantale / scripts.md
Last active Jul 20, 2019
Useful scripts for installing tools
View scripts.md

hapgen2 2.1.2

Install

wget https://mathgen.stats.ox.ac.uk/genetics_software/hapgen/download/builds/macosx_intel/v2.1.2/hapgen2_macosx_intel.tar.gz
tar zxvf hapgen2_macosx_intel.tar.gz

validate

@kantale
kantale / notes.md
Last active Jun 15, 2019
TEI_assignments_notes
View notes.md

This is a list of common mistakes and bad practices seen in assignments submitted for the Bioinformatics lesson.

Note 1

Prefer using with instead of open/close

https://www.pythonforbeginners.com/files/reading-and-writing-files-in-python

One bonus of using this method is that any files opened will be closed automatically after you are done. This leaves less to worry about during cleanup.

Avoid:

@kantale
kantale / lesson_3.ipynb
Created Apr 8, 2019
lesson_TEI_8_apr_2019
View lesson_3.ipynb
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@kantale
kantale / lesson_2.ipynb
Created Apr 1, 2019
TEI lesson_2 1 April 2019
View lesson_2.ipynb
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View lesson_3.ipynb
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
You can’t perform that action at this time.