github link https://github.com/RainCloudPlots/RainCloudPlots
# somewhat hackish solution to:
# https://twitter.com/EamonCaddigan/status/646759751242620928
# based mostly on copy/pasting from ggplot2 geom_violin source:
github link https://github.com/RainCloudPlots/RainCloudPlots
# somewhat hackish solution to:
# https://twitter.com/EamonCaddigan/status/646759751242620928
# based mostly on copy/pasting from ggplot2 geom_violin source:
# stop using biocLite https://twitter.com/strnr/status/1022451016736927745?lang=en
# more details https://cran.r-project.org/web/packages/BiocManager/vignettes/BiocManager.html
# require R>=3.5.0, if you have a lower version of R. you may still use biocLite to install
# bioconductor packages
install.packages("BiocManager")
BiocManager::install("TxDb.Mmusculus.UCSC.mm9.knownGene")
library(purrr)
library(tidyverse)
f_files<- list.files("results/superEnhancer/rna_expression/MSTC", pattern = "featureCount.txt", full.names = T)
read_in_feature_counts<- function(file){
cnt<- read_tsv(file, col_names =T, comment = "#")
cnt<- cnt %>% dplyr::select(-Chr, -Start, -End, -Strand, -Length)
# somewhat hackish solution to: | |
# https://twitter.com/EamonCaddigan/status/646759751242620928 | |
# based mostly on copy/pasting from ggplot2 geom_violin source: | |
# https://github.com/hadley/ggplot2/blob/master/R/geom-violin.r | |
library(ggplot2) | |
library(dplyr) | |
"%||%" <- function(a, b) { |
# somewhat hackish solution to: | |
# https://twitter.com/EamonCaddigan/status/646759751242620928 | |
# based mostly on copy/pasting from ggplot2 geom_violin source: | |
# https://github.com/hadley/ggplot2/blob/master/R/geom-violin.r | |
library(ggplot2) | |
library(dplyr) | |
"%||%" <- function(a, b) { |
During my daily work with R for genomic data analysis, I encountered several instances that R gives me some (bad) surprises.
read detail here https://github.com/crazyhottommy/DNA-seq-analysis#tips-and-lessons-learned-during-my-dna-seq-data-analysis-journey
some files such as bed
file is 0 based. Two genomic regions:
When call chromHMM with a bin size of say 1000 bp, if the consecutive bins are of the same state, it will be merged.
I want to tile the segment file before merging. https://support.bioconductor.org/p/102775/#102777
library(GenomicRanges)
library(rtracklayer)
chromHMM_seg<- import("data/chromHMM/SKCM-M852-P008_18_segments.bed", format = "BED")
#API created by @apfejes (Anthony Fejes) on top of my half-cooked script | |
#python ebi_url_from_srr.py --file srr_list.txt | xargs -I {} wget {} | |
import argparse | |
def prepareURL(srr_name, prefix="ftp://ftp.sra.ebi.ac.uk/vol1/fastq/"): | |
dir_1=srr_name[:6] | |
dir_2="" | |
url="" | |
num_digits=sum(s.isdigit() for s in srr_name) | |
if(num_digits == 6): |