View gist:a2061ea53a6f2fe1b5f1bec5286dccdc
# OUT PUT FILES::::
# elegans_transcript_WS258.bed ( COMES FROM /elegans_genes_WS258.bb )
# elegans_gene_WS258.bed (remember; comes from GFF3)
# FASTA! c_elegans.PRJNA13758.WS245.genomic.fa (ftp://ftp.wormbase.org/pub/wormbase/releases/WS258/species/c_elegans/PRJNA13758/)
# Download gene file
wget ftp://ftp.wormbase.org/pub/wormbase/releases/WS258/MULTI_SPECIES/hub/elegans/elegans_genes_WS258.bb
# Bit of a misnomer --> These are transcripts
BigBedToBed elegans_genes_WS258.bb elegans_transcripts_WS258.bed
View swot.py
import os
import shutil
import pickle
from subprocess import Popen, PIPE
from collections import defaultdict
out, err = Popen(['git','clone','https://github.com/leereilly/swot'],
stdout=PIPE,
stderr=PIPE).communicate()
school_directory = defaultdict()
View pyenv.sublime-build
{
"shell_cmd": "`pyenv which python` -u \"$file\"",
"file_regex": "^[ ]*File \"(...*?)\", line ([0-9]*)",
"selector": "source.python"
}
View .block
license: gpl-3.0
height: 960
View .block
license: gpl-3.0
height: 960
View count.sh
git ls-files | xargs cat | wc -l
View gist:1cb76558fda8c01fc85c014afda28b18
test_df %>%
dplyr::arrange(chromosome, isotype, start, stop) %>%
dplyr::filter(
(!(lead(start) == stop & lead(haplotype) == haplotype & lead(isotype) == isotype & lead(chromosome) == chromosome) | is.na(lag(start)) | is.na(lead(stop)))
) %>%
dplyr::mutate(stop = ifelse(lead(isotype) == isotype &
lead(haplotype) == haplotype &
View gist:d2bb89371403073ae9e6b024dca88c05
library(imager)
library(cowplot)
im <- imager::load.image("https://storage.googleapis.com/elegansvariation.org/photos/hawaii2017/C-3273.jpg")
plot <- ggplot() + annotation_raster(im, xmin=-Inf, xmax=Inf, ymin=-Inf, ymax=Inf)
cowplot::plot_grid(plot, plot)
View is_overlapping.R
is_overlapping <- function(start_1, end_1, start_2, end_2) {
if (
(dplyr::between(start_1, start_2, end_2)) |
(dplyr::between(end_1, start_2, end_2)) |
(dplyr::between(start_2, start_1, end_1)) |
(dplyr::between(end_2, start_1, end_1))
) {
return(TRUE)
}
FALSE
View bash_profile.sh
# VERSION 1
export HOMEBREW_EDITOR=nano
export PS1='\[\e[0;35m\][\h::\w] 😱 \[\e[m\] '
export PATH="$HOME/.linuxbrew/bin:~/google-cloud-sdk/bin:$PATH"
export MANPATH="$(brew --prefix)/share/man:$MANPATH"
export INFOPATH="$(brew --prefix)/share/info:$INFOPATH"
# Load modules
module load bamtools/2.4.1
#module load bcftools/1.4-6 - messes with qstat