Skip to content

Instantly share code, notes, and snippets.

View Tabea-K's full-sized avatar

Tabea Kischka Tabea-K

  • Münster, Germany
View GitHub Profile
@Tabea-K
Tabea-K / pip_list.sh
Created February 26, 2019 13:11
Command to list all installed pip packages and their location
pip list -v
@Tabea-K
Tabea-K / correct_WhatsApp_picture_exifdate.sh
Last active February 19, 2019 12:34
This is a small script to modify the JPEG metadata of photos downloaded from WhatsApp. Usually, the downlaoded pictures will have set the "DateTimeOriginal" to the date they were downloaded, not when they were taken. This is unfortunate, if you for example want to upload them to google photos as they will be sorted incorrectly by date. To fix th…
#!/bin/bash
# This small script can set the exif metadata of a jpeg file
# to the date and time given in the file name assigned by WhatsApp
# when downloading the image.
# The filename needs to be in a format like this (the automatically assigned
# format as of 2019-02-12):
# "WhatsApp Image 2018-09-20 at 17.18.42.jpeg"
# In order to modify all jpeg files in a folder,
# run the command like this:
@Tabea-K
Tabea-K / pycharm_cheatsheet.md
Created February 11, 2019 10:36
Cheatsheet with some useful pycharm shortcuts for Mac

Replace all

crtl + shift + R

@Tabea-K
Tabea-K / download_refseq.sh
Last active February 7, 2019 14:58
To download the latest refGene info file from the UCSC via command line
CURRDATE=`date +%Y-%m-%d`
ASSEMBLY=hg38
mysql --user=genome --host=genome-mysql.cse.ucsc.edu -A -D "${ASSEMBLY}" -e "select * \
from refGene" > "${CURRDATE}_${ASSEMBLY}_refGene.txt"
@Tabea-K
Tabea-K / mutect_filters.md
Created February 6, 2019 12:37
Definition of MuTect2 filters, taken from vcf header.

Definition of MuTect filters

Filter Description
alt_allele_in_normal Evidence seen in the normal sample
clustered_events Clustered events observed in the tumor
germline_risk Evidence indicates this site is germline, not somatic
homologous_mapping_event More than three events were observed in the tumor
multi_event_alt_allele_in_normal Multiple events observed in tumor and normal
panel_of_normals Seen in at least 2 samples in the panel of normals
@Tabea-K
Tabea-K / retrieve_gene_description_by_refseq_id.py
Created January 22, 2019 20:12
This is a small example on how to retrieve a gene description based on a RefSeq id.
#!/usr/bin/python
from Bio import Entrez
Entrez.email = 'A.N.Other@example.com'
def get_gene_info(refseq_id):
"""
Queries the ncbi refseq database for the gene summary
"""

Die Datei seq.fasta muss immer auf dem Desktop liegen!

header entfernen

um die header Zeilen zu entfernen:

grep -v ">" ~/Desktop/seq.fasta > ~/Desktop/seq_ohne_header.fasta
@Tabea-K
Tabea-K / create_empty_python_project_template.sh
Last active August 28, 2018 12:38
Bash script to generate the directory structure and files needed for the generation of an empty python project template. The first argument supplied is used as the main name of the python project, the second as the name of the main python code file. A directory "tests" is generated for unit tests, which also includes an example test case.
#!/bin/bash
# This creates a more or less empty template for a python package
# containing unit tests
# Author: Tabea Kischka, 2018-07-02
# Version 2.0, last update: 2018-08-28
###########################################################################################################
# get options
###########################################################################################################
@Tabea-K
Tabea-K / colorblind.gpl
Created June 25, 2018 13:02
A GIMP color palette (to use with Inkscape, etc) that is "user friendly" for color blind people, based on palette by Masataka Okabe and Kei Ito.
GIMP Palette
Name: colorblind_grayscale
Columns: 3
# Based on http://jfly.iam.u-tokyo.ac.jp/color/image/pallete.jpg
0 0 0 seq_OrRd_4_01
42 42 42 seq_OrRd_4_01
165 165 165 seq_OrRd_4_02
230 159 0 seq_OrRd_4_02
167 167 167 seq_OrRd_4_03
86 180 233 seq_OrRd_4_03
@Tabea-K
Tabea-K / README.md
Last active February 18, 2019 09:51
An example for how to generate a pretty fasta alignment with LaTeX, using the textshade package