Skip to content

Instantly share code, notes, and snippets.

@alyssafrazee
Created January 30, 2014 04:11
Show Gist options
  • Save alyssafrazee/8702510 to your computer and use it in GitHub Desktop.
Save alyssafrazee/8702510 to your computer and use it in GitHub Desktop.
# do RNA-seq simulation to see if it will work!
# AF 19 december 2013
library(devtools)
##### ADD PASSWORD WHEN RUNNING
install_github('ballgown_paper','alyssafrazee',subdir='simde',password='')
library(simde)
fasta_file = 'chr22.fa'
count_transcripts(fasta_file) #918 transcripts
setwd('simulated_data')
# 918 transcripts
# let's make 92 of them DE
# at 2x and 5x
# half in each group
# and shuffle them around
fc = c(rep(2, 23), rep(5, 23), rep(0.5, 23), rep(0.2, 23), rep(1, 826))
set.seed(651)
fc = sample(fc)
## do simulation:
simulate_experiment(fasta_file, num_reps = 15, outprefix = 'sim',
model = multinomial, fold_changes = fc)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment