Skip to content

Instantly share code, notes, and snippets.

View lexnederbragt's full-sized avatar

Lex Nederbragt lexnederbragt

View GitHub Profile
@lexnederbragt
lexnederbragt / snakemake_lesson.yml
Created December 15, 2023 11:59
Attempt at a minimal conda env for the lesson "Snakemake for Bioinformatics"
# attempt at making a minimal conda env for the lesson "Snakemake for Bioinformatics"
# https://carpentries-incubator.github.io/snakemake-novice-bioinformatics
name: snakemake_lesson
channels:
- conda-forge
- bioconda
- defaults
dependencies:
- bioconda::rename
- conda-forge:coreutils
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@lexnederbragt
lexnederbragt / to_jupyter.md
Last active October 29, 2022 20:22
Tools to generate Jupyter Notebooks from plain (markup) text files

Tools to generate Jupyter Notebooks from plain (markup) text files:

(Originally posted on twitter, here incorporating responses)

pandoc

As of version 2.6, there is provisional support for using pandoc using jupyter notebookss (.ipynb files) as input and output format.

Notedown

Markdown to Jupyter Notebook, and back https://github.com/aaren/notedown

@lexnederbragt
lexnederbragt / DeBruijnGraph.ipynb
Created November 4, 2014 09:26
Simple De Bruijn Graph implementation courtesy of Ben Langmead
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
$ blasr channel_110_read_9_template.fasta AF498417.fasta -m 0
nMatch: 4151
nMisMatch: 578
nIns: 452
nDel: 898
%sim: 68.2843
Score: -10537
Query: channel_110_read_9_template
Target: gi|20560066|gb|AF498417.1|
Model: a hybrid of global/local non-affine alignment
@lexnederbragt
lexnederbragt / trf2gff.py
Created May 9, 2014 14:25
Convert the latest TRF output, using the '-ngs' flag, to gff. Very rudimentary, use at your own risk.
with open(fname) as fh:
for line in fh:
ele = line.strip().split(" ")
if line.startswith('@'):
seq_name = ele[0][1:]
else:
[start, stop, period, copies,
consensus_size, perc_match, perc_indels,
align_score, perc_A, perc_C, perc_G, perc_T,
entropy, cons_seq, repeat_seq, left_flank, right_flank] = ele
@lexnederbragt
lexnederbragt / yahtzee.ipynb
Last active August 29, 2015 13:56
Yahtzee simulation, based on a question on facebook: in 5 dice yahtzee game, what is the chance of getting a yahtzee (5 similar dice), ignoring all other options (straight, etc)
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@lexnederbragt
lexnederbragt / Broad_Hiseq2500_runs.ipynb
Last active December 30, 2015 18:58
Visualising raw sequence quality for Broad HiSeq 2500 2x250 sample runs from http://www.broadinstitute.org/software/discovar/blog/?p=415. See nbviewer rendering at http://nbviewer.ipython.org/gist/lexnederbragt/7870664
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@lexnederbragt
lexnederbragt / PacBio_longest_subread_plots.ipynb
Last active December 18, 2015 16:49
Code belonging to the blog post 'Longing for the longest reads: PacBio and BluePippin Link: http://flxlexblog.wordpress.com/2013/06/19/longing-for-the-longest-reads-pacbio-and-bluepippin View the notebook here: http://nbviewer.ipython.org/5814241
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@lexnederbragt
lexnederbragt / agp_to_sqlite.ipynb
Last active December 16, 2015 00:09
An ipython notebook describing how to import a so-called AGP file and build a sqlite database for it with python. The notebook can be viewed here: http://nbviewer.ipython.org/5344976
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.