This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
pval_computing <- function(tab, output) { | |
t <- read.table(tab); | |
cat("reading", tab, "Done\n") | |
p.val <- rep(NA, times = nrow(t)); | |
ind_1 <- seq(1:nrow(t)); | |
#chr1 3101 3200 4 0 68 4 0 53 | |
#chr stt end #ofSites c_num t_num #ofSites c_num t_num | |
p.val[ind_1] <- lapply(ind_1, function(x) fisher.test(matrix(c(t[x, 5], t[x, 8], t[x, 6], t[x, 9]), nrow = 2))$p.val); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/perl -w | |
use strict; | |
################################################## | |
#This script is to convert tab-delimited file to # | |
#Exel sheets. # | |
################################################## | |
use Excel::Writer::XLSX; | |
my ($tab, $out) = @ARGV; | |
die usage() unless @ARGV == 2; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/opt/local/bin/perl -w | |
use threads; | |
use strict; | |
use warnings; | |
# SOURCE REF: http://chicken.genouest.org/perl/multi-threading-with-perl/ | |
my @a = (); | |
my @b = (); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
library(DESeq); | |
data_pnas<-read.table("readCount.res",header=T,row.names=1); | |
head(data_pnas); | |
data_pnas_desi<-data.frame(row.names=colnames(data_pnas),condition = c("Sample_g1","Sample_g2","Sample_g3","Sample_g4"),libType = c("single-end","single-end","single-end","single-end")); | |
condition = data_pnas_desi$condition;condition; | |
cds = newCountDataSet(data_pnas, condition); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/python | |
import sys | |
import re | |
gene_list = sys.argv[1] | |
motif = sys.argv[2] | |
#print(gene_list) | |
#print(motif) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
library(ggplot2) | |
cc<-read.csv("density_plot.csv",header=T) | |
diff<-cc[,3]-cc[,2] | |
p<-ggplot()+geom_density(aes(diff),colour="royalblue", fill="royalblue",alpha=.3)+geom_vline(xintercept=0, linetype="dashed")+xlab("mutant minus WT");ggsave("density_plot.pdf", p) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
library(ggplot2) | |
cc<-read.csv("density_plot.csv",header=T) | |
diff<-cc[,3]-cc[,2] | |
p<-ggplot()+geom_density(aes(diff),colour="royalblue", fill="royalblue",alpha=.3)+geom_vline(xintercept=0, linetype="dashed")+xlab("mutant minus WT");ggsave("density_plot.pdf", p) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Note: using the devel versions of both packages! | |
library(DESeq) # version 1.9.11 | |
library(edgeR) # version 2.99.8 | |
library(VennDiagram) | |
# Read in data ------------------------------------------------------------ | |
## Use pasilla data | |
datafile = system.file( "extdata/pasilla_gene_counts.tsv", package="pasilla" ) | |
datafile |