Skip to content

Instantly share code, notes, and snippets.

View slowkow's full-sized avatar
🐄
moooooo

Kamil Slowikowski slowkow

🐄
moooooo
View GitHub Profile
@slowkow
slowkow / NeedlemanWunsch.png
Last active July 26, 2024 03:22
Plot the score matrix from a Needleman-Wunsch pairwise sequence alignment
NeedlemanWunsch.png
@slowkow
slowkow / bioijobs.html
Last active March 7, 2023 01:12
View bioinformatics.org job listings on a Google map
<!-- saved from url=(0093)http://www.bioinformatics.org/jobs/index.php?group_id=101&show=archives&offset=1680&length=24 -->
<html style="zoom: 100%; "><style>#bitly_expanded_container {
position:absolute;
/* round the corners */
bottom:1px;
z-index:5000;
/* width:100%;*/
left:0px;
display:none;
@slowkow
slowkow / query_ncbi.pl
Created March 24, 2011 06:27
Query any NCBI database (nucleotide, protein, nucgss, etc.) and retrieve resulting records.
#!/usr/bin/perl
# Author : Kamil Slowikowski <kslowikowski@gmail.com>
# Date : March 23, 2011
# Version : 0.1
# Description : Modified code from
# http://www.bioperl.org/wiki/HOWTO:EUtilities_Cookbook
use strict;
use warnings;
@slowkow
slowkow / merge_intervals.py
Last active December 13, 2015 19:39
Python snippet: mimic the command `bedtools merge`
#!/usr/bin/env python
"""merge_intervals.py
Merge tab-delimited intervals:
cat tissue1.txt
chr1,1-2
chr1,3-4
chr1,5-6
@slowkow
slowkow / ncbi_fetch.py
Created February 21, 2013 19:58
Query any NCBI database and retrieve batches of records as gzip archives
#!/usr/bin/env python
"""ncbi_fetch.py
Query NCBI and fetch the results into gzipped files. Files will be saved in
the current directory as: 001-050.gz, 051-100.gz, etc.
You can then do:
zcat 001-050.gz | head
@slowkow
slowkow / barplot_heatmap.png
Last active April 15, 2023 19:24
Plot a horizontal bar plot and the lower triangle of a heatmap aligned at the base of the bars
barplot_heatmap.png
@slowkow
slowkow / genomic_intervals.py
Last active December 20, 2015 18:59
Genomic intervals: 0-based, 1-based, overlaps, and distance
"""
genomic_intervals.py
Kamil Slowikowski
February 27, 2014
Genomic intervals: 0-based, 1-based, overlaps, and distance
===========================================================
This document describes genomic intervals and includes source code for testing
overlap and calculating distance between intervals.
@slowkow
slowkow / VCF.py
Last active May 29, 2024 13:57
VCF.py is a simple module for reading VCF files
"""
VCF.py
Kamil Slowikowski
October 30, 2013
Read VCF files. Works with gzip compressed files and pandas.
Note: This module ignores the genotype columns because
I didn't need them at the time of writing.
@slowkow
slowkow / chromtree.py
Last active December 26, 2015 22:08
Python snippet: one interval tree for each chromosome
"""
chromtree.py
Kamil Slowikowski
October 30, 2013
This module is a simple extension of
bx.intervals.intersection.IntervalTree
to neatly handle a dictionary of interval trees.
@slowkow
slowkow / GTF.py
Last active March 6, 2024 02:05
GTF.py is a simple module for reading GTF and GFF files
#!/usr/bin/env python
"""
GTF.py
Kamil Slowikowski
December 24, 2013
Read GFF/GTF files. Works with gzip compressed files and pandas.
http://useast.ensembl.org/info/website/upload/gff.html