Skip to content

Instantly share code, notes, and snippets.

ilevantis

Block or report user

Report or block ilevantis

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View bedtools_cheatsheet.md

Bedtools Cheatsheet

General:

Tools Description
flank Create new intervals from the flanks of existing intervals.
slop Adjust the size of intervals.
shift Adjust the position of intervals.
subtract Remove intervals based on overlaps b/w two files.
@ilevantis
ilevantis / parse_hmmer3.py
Created Oct 13, 2017
parse the txt output of hmmsearch (hmmer3)
View parse_hmmer3.py
#!/usr/bin/env python3
import re
from ast import literal_eval
import numpy as np
def parse_val(s):
try:
return literal_eval(s)
except:
@ilevantis
ilevantis / EvolDir-RSSifier.php
Created Feb 27, 2016
Turn EvolDir categories into RSS feeds
View EvolDir-RSSifier.php
<?php
header('Content-Type: application/rss+xml; charset=UTF-8');
$list_name = htmlspecialchars($_GET['lname']);
$list_url = 'http://life.mcmaster.ca/cgi-bin/my_wrap/brian/evoldir/'.$list_name.'/';
$month_num = array (
"Jan" => 1,
"Feb" => 2,
@ilevantis
ilevantis / useful_cmds
Last active Aug 29, 2015
Useful shell commands
View useful_cmds
## Delete files not matching "*.tex" :
```fish
find . -maxdepth 1 -type f ! -iname "*.tex" -delete
```
@ilevantis
ilevantis / mfasta-sfasta awk command
Last active Aug 29, 2015
Split a multi fasta from uniprot into sensibly named indidvual entry fasta files
View mfasta-sfasta awk command
awk 'BEGIN{ FS = "|"}/>/{FS = "|"; filename = substr($3,1,12) }{print $0 > "<output-dir-path>" filename ".fa"}' <multi-fasta-2bsplit>
@ilevantis
ilevantis / Mixcloud RSSifier
Last active Sep 16, 2019
Turn mixcloud streams into an RSS feed e.g. for mixcloud.com/<mixcloudstream>/playlists/<streamplaylist-if-there-is-one>/ go to mysite.com/mixcloud-rssifier/?fname=<mixcloudstream>&lname=<streamplaylist-if-there-is-one> to get an RSS feed of the stream or the playlist from the stream
View Mixcloud RSSifier
<?php
header('Content-Type: application/rss+xml; charset=UTF-8');
// suck in the query string variables
$feed_name = htmlspecialchars($_GET['fname']);
$list_name = htmlspecialchars($_GET['lname']);
// compose the api urls + other stuff depending on presence of playlist
if(isset($_GET['lname'])) {
$json_url = 'http://api.mixcloud.com/'.$feed_name.'/playlists/'.$list_name.'/cloudcasts/';
You can’t perform that action at this time.