This is a place to share comments about the post Jupyter and R for Scientists I published on my blog.
If you'd like to improve the post, you can fork it on Github and submit a pull request.
#!/bin/bash | |
# bash awk_vcf_anim_chrom_pos.sh in.vcf sample chrom pos | |
echo vcf: "$1" | |
echo sample: "$2" | |
echo chrom: "$3" | |
echo pos: "$4" | |
awk -v sample=$2 -v chrom="$3" -v pos=$4 \ |
(function() { | |
var API_KEY = "YOUR_API_KEY_GOES_HERE"; | |
// code for IE7+, Firefox, Chrome, Opera, Safari - forget IE6 | |
var xmlhttp = new XMLHttpRequest(); | |
xmlhttp.open("POST", "https://api.pushbullet.com/v2/pushes", true); | |
xmlhttp.setRequestHeader('Content-Type', 'application/json'); | |
xmlhttp.setRequestHeader('Authorization', "Bearer " + API_KEY); | |
/// @todo needs oauth2 update? ugh. |
This is a place to share comments about the post Jupyter and R for Scientists I published on my blog.
If you'd like to improve the post, you can fork it on Github and submit a pull request.
javascript:document.getElementsByTagName("body")[0].appendChild(document.createElement("script")).setAttribute("src","https://static.mendeley.com/bin/extensions/bookmarklet.js"); |
#!/bin/bash | |
# USAGE: | |
# revcomp_bioawk.sh actgactg | |
# requires bioawk, which can be installed with conda: | |
# conda install -c conda-forge -c bioconda bioawk | |
seq=$1 |
// this one inverts colours on a page; second click reverts it (because it's exact negative) | |
javascript:(function(){function RGBtoHSL(RGBColor){with(Math){var R,G,B;var cMax,cMin;var sum,diff;var Rdelta,Gdelta,Bdelta;var H,L,S;R=RGBColor[0];G=RGBColor[1];B=RGBColor[2];cMax=max(max(R,G),B);cMin=min(min(R,G),B);sum=cMax+cMin;diff=cMax-cMin;L=sum/2;if(cMax==cMin){S=0;H=0;}else{if(L<=(1/2))S=diff/sum;else S=diff/(2-sum);Rdelta=R/6/diff;Gdelta=G/6/diff;Bdelta=B/6/diff;if(R==cMax)H=Gdelta-Bdelta;else if(G==cMax)H=(1/3)+Bdelta-Rdelta;else H=(2/3)+Rdelta-Gdelta;if(H<0)H+=1;if(H>1)H-=1;}return[H,S,L];}}function getRGBColor(node,prop){var rgb=getComputedStyle(node,null).getPropertyValue(prop);var r,g,b;if(/rgb\((\d+),\s(\d+),\s(\d+)\)/.exec(rgb)){r=parseInt(RegExp.$1,10);g=parseInt(RegExp.$2,10);b=parseInt(RegExp.$3,10);return[r/255,g/255,b/255];}return rgb;}function hslToCSS(hsl){return "hsl("+Math.round(hsl[0]*360)+", "+Math.round(hsl[1]*100)+"%, "+Math.round(hsl[2]*100)+"%)";}var props=["color","background-color","b |
name: pylab | |
channels: | |
- conda-forge | |
dependencies: | |
- python=3 | |
- jupyter | |
- jupyterthemes | |
- scipy | |
- numpy | |
- pandas |
#!/bin/bash | |
# Script for converting plink MDS (with space-aligned columns) into TSV format. | |
INFILE=$1 | |
NCOL=$(head -1 $INFILE | wc -w) # 5 | |
COLS=$(echo '$'$(seq 1 $NCOL) | sed 's/ /,$/g') # $1,$2,$3,$4,$5 | |
awk 'BEGIN {OFS="\t"} {print '"$COLS"'}' $INFILE |
#!/bin/bash | |
## R in Jupyter Console | |
## Usage: | |
# ir.sh # jupyter-console | |
# ir.sh qt # jupyter-qtconsole | |
## Install Jupyter Console & R kernel (optional: install Jupyter Qtconsole too) | |
# conda install -c conda-forge jupyter_console r-base r-irkernel # qtconsole |