Commit 346ab5df authored by Venkat Malladi's avatar Venkat Malladi
Browse files

Add in AC16 basal data.

parent 4ad9198e
......@@ -773,3 +773,289 @@ jpeg('venndigram_basal_E2_snoRNA.jpg')
draw.pairwise.venn(area1 = length(overlap$a1), area2 = length(overlap$a2), cross.area = length(overlap$a3),col = c("royalblue4", "seagreen4"),lwd=4)
dev.off()
```
```{r alignments ac16}
ALK_RNA1 <- "/Volumes/project/GCRB/Lee_Lab/s163035/DK_RIP-seq/PARP1_RNAseq_in_AC16_MCF7_withTNFa_E2/raw/Sample_ALK_RNA1/align-star-se.sh-1.0.0/ALK_RNA1_ACAGTG_L008_R1.rDNA.filtered.fastq.gz_filtered_chrMAligned.sortedByCoord.out.bam"
ALK_RNA2 <- "/Volumes/project/GCRB/Lee_Lab/s163035/DK_RIP-seq/PARP1_RNAseq_in_AC16_MCF7_withTNFa_E2/raw/Sample_ALK_RNA2/align-star-se.sh-1.0.0/ALK_RNA2_GATCAG_L008_R1.rDNA.filtered.fastq.gz_filtered_chrMAligned.sortedByCoord.out.bam"
ALK_RIP_PI1 <- "/Volumes/project/GCRB/Lee_Lab/s163035/DK_RIP-seq/PARP1_RIPseq_in_AC16_MCF7_withTNFa_E2/raw/Sample_ALK_RIP1_PI/align-star-se.sh-2.0.0/ALK_RIP1_PI_AGTCAA_L006_R1.rDNA.filtered.fastq.gz_filtered_chrMAligned.sortedByCoord.out.bam"
ALK_RIP_PI2 <- "/Volumes/project/GCRB/Lee_Lab/s163035/DK_RIP-seq/PARP1_RIPseq_in_AC16_MCF7_withTNFa_E2/raw/Sample_ALK_RIP2_PI/align-star-se.sh-2.0.0/ALK_RIP2_PI_GTTTCG_L007_R1.rDNA.filtered.fastq.gz_filtered_chrMAligned.sortedByCoord.out.bam"
ALK_RIP_PARP1 <- "/Volumes/project/GCRB/Lee_Lab/s163035/DK_RIP-seq/PARP1_RIPseq_in_AC16_MCF7_withTNFa_E2/raw/Sample_ALK_RIP1_PARP1/align-star-se.sh-2.0.0/ALK_RIP1_PARP1_AGTTCC_L006_R1.rDNA.filtered.fastq.gz_filtered_chrMAligned.sortedByCoord.out.bam"
ALK_RIP_PARP2 <- "/Volumes/project/GCRB/Lee_Lab/s163035/DK_RIP-seq/PARP1_RIPseq_in_AC16_MCF7_withTNFa_E2/raw/Sample_ALK_RIP2_PARP1/align-star-se.sh-2.0.0/ALK_RIP2_PARP1_CGTACG_L006_R1.rDNA.filtered.fastq.gz_filtered_chrMAligned.sortedByCoord.out.bam"
```
```{r counts ac16}
ALK_RNA1_counts_ref <- CountRefseq(ref_tx, ALK_RNA1, all_sn_tx, removeSNORNA=TRUE)
ALK_RNA2_counts_ref <- CountRefseq(ref_tx, ALK_RNA2, all_sn_tx, removeSNORNA=TRUE)
ALK_RNA1_counts_lnc <- CountRefseq(lnc_tx, ALK_RNA1, all_sn_tx, removeSNORNA=TRUE)
ALK_RNA2_counts_lnc <- CountRefseq(lnc_tx, ALK_RNA2, all_sn_tx, removeSNORNA=TRUE)
ALK_RNA1_counts_sn <- CountSNRNA(sn_tx, ALK_RNA1)
ALK_RNA2_counts_sn <- CountSNRNA(sn_tx, ALK_RNA2)
ALK_RNA1_counts_sno <- CountSNRNA(sno_tx, ALK_RNA1)
ALK_RNA2_counts_sno <- CountSNRNA(sno_tx, ALK_RNA2)
ALK_RIP_PI1_counts_ref <- CountRefseq(ref_tx, ALK_RIP_PI1, all_sn_tx, removeSNORNA=TRUE)
ALK_RIP_PI2_counts_ref <- CountRefseq(ref_tx, ALK_RIP_PI2, all_sn_tx, removeSNORNA=TRUE)
ALK_RIP_PI1_counts_lnc <- CountRefseq(lnc_tx, ALK_RIP_PI1, all_sn_tx, removeSNORNA=TRUE)
ALK_RIP_PI2_counts_lnc <- CountRefseq(lnc_tx, ALK_RIP_PI2, all_sn_tx, removeSNORNA=TRUE)
ALK_RIP_PI1_counts_sn <- CountSNRNA(sn_tx, ALK_RIP_PI1)
ALK_RIP_PI2_counts_sn <- CountSNRNA(sn_tx, ALK_RIP_PI2)
ALK_RIP_PI1_counts_sno <- CountSNRNA(sno_tx, ALK_RIP_PI1)
ALK_RIP_PI2_counts_sno <- CountSNRNA(sno_tx, ALK_RIP_PI2)
ALK_RIP_PARP1_counts_ref <- CountRefseq(ref_tx, ALK_RIP_PARP1, all_sn_tx, removeSNORNA=TRUE)
ALK_RIP_PARP2_counts_ref <- CountRefseq(ref_tx, ALK_RIP_PARP2, all_sn_tx, removeSNORNA=TRUE)
ALK_RIP_PARP1_counts_lnc <- CountRefseq(lnc_tx, ALK_RIP_PARP1, all_sn_tx, removeSNORNA=TRUE)
ALK_RIP_PARP2_counts_lnc <- CountRefseq(lnc_tx, ALK_RIP_PARP2, all_sn_tx, removeSNORNA=TRUE)
ALK_RIP_PARP1_counts_sn <- CountSNRNA(sn_tx, ALK_RIP_PARP1)
ALK_RIP_PARP2_counts_sn <- CountSNRNA(sn_tx, ALK_RIP_PARP2)
ALK_RIP_PARP1_counts_sno <- CountSNRNA(sno_tx, ALK_RIP_PARP1)
ALK_RIP_PARP2_counts_sno <- CountSNRNA(sno_tx, ALK_RIP_PARP2)
```
# RPKM Cutoff
``` {r rpkm ac16}
ALK_RNA_counts_ref <- ALK_RNA1_counts_ref$counts + ALK_RNA2_counts_ref$counts
ALK_RNA_lib_ref <- ALK_RNA1_counts_ref$lib + ALK_RNA2_counts_ref$lib
ALK_RNA_ref_d <- DGEList(counts=as.matrix(ALK_RNA_counts_ref), lib.size=ALK_RNA_lib_ref)
ALK_RNA_ref_rpkm <- data.frame(rpkm(ALK_RNA_ref_d,width(ref_tx)))
alk_pc_rpkm <- ref_tx[ALK_RNA_ref_rpkm>=1]
NROW(unique(unlist(mcols(alk_pc_rpkm)$tx_name)))
NROW(unique(unlist(mcols(alk_pc_rpkm)$gene_name)))
ALK_RIP_PARP_counts_ref <- ALK_RIP_PARP1_counts_ref$counts + ALK_RIP_PARP2_counts_ref$counts
ALK_RIP_PARP_lib_ref <- ALK_RIP_PARP1_counts_ref$lib + ALK_RIP_PARP2_counts_ref$lib
ALK_RIP_PI_counts_ref <- ALK_RIP_PI1_counts_ref$counts + ALK_RIP_PI2_counts_ref$counts
ALK_RIP_PI_lib_ref <- ALK_RIP_PI1_counts_ref$lib + ALK_RIP_PI1_counts_ref$lib
ALK_RIP_PI_d <- DGEList(counts=as.matrix(ALK_RIP_PI_counts_ref), lib.size=ALK_RIP_PI_lib_ref)
ALK_RIP_PI_rpkm <- data.frame(rpkm(ALK_RIP_PI_d,width(ref_tx)))
ALK_RIP_PARP_d <- DGEList(counts=as.matrix(ALK_RIP_PARP_counts_ref), lib.size=ALK_RIP_PARP_lib_ref)
ALK_RIP_PARP_rpkm <- data.frame(rpkm(ALK_RIP_PARP_d,width(ref_tx)))
ALK_RIP_FC <- data.frame((ALK_RIP_PARP_rpkm+1)/(ALK_RIP_PI_rpkm+1))
alk_pc_rpkm_fc <- ref_tx[ALK_RNA_ref_rpkm>=1 & ALK_RIP_FC>=2 ]
NROW(unique(unlist(mcols(alk_pc_rpkm_fc)$tx_name)))
NROW(unique(unlist(mcols(alk_pc_rpkm_fc)$gene_name)))
pc_ratio <- NROW(unique(unlist(mcols(alk_pc_rpkm_fc)$gene_name)))/NROW(unique(unlist(mcols(alk_pc_rpkm)$gene_name)))
ALK_RNA_counts_lnc <- ALK_RNA1_counts_lnc$counts + ALK_RNA2_counts_lnc$counts
ALK_RNA_lib_lnc <- ALK_RNA1_counts_lnc$lib + ALK_RNA2_counts_lnc$lib
ALK_RNA_lnc_d <- DGEList(counts=as.matrix(ALK_RNA_counts_lnc), lib.size=ALK_RNA_lib_lnc)
ALK_RNA_lnc_rpkm <- data.frame(rpkm(ALK_RNA_lnc_d,width(lnc_tx)))
alk_lnc_rpkm <- lnc_tx[ALK_RNA_lnc_rpkm>=1]
NROW(unique(unlist(mcols(alk_lnc_rpkm)$tx_name)))
NROW(unique(unlist(mcols(alk_lnc_rpkm)$gene_id)))
ALK_RIP_PARP_counts_lnc <- ALK_RIP_PARP1_counts_lnc$counts + ALK_RIP_PARP2_counts_lnc$counts
ALK_RIP_PARP_lib_lnc<- ALK_RIP_PARP1_counts_lnc$lib + ALK_RIP_PARP2_counts_lnc$lib
ALK_RIP_PI_counts_lnc <- ALK_RIP_PI1_counts_lnc$counts + ALK_RIP_PI2_counts_lnc$counts
ALK_RIP_PI_lib_lnc <- ALK_RIP_PI1_counts_lnc$lib + ALK_RIP_PI1_counts_lnc$lib
ALK_RIP_PI_d <- DGEList(counts=as.matrix(ALK_RIP_PI_counts_lnc), lib.size=ALK_RIP_PI_lib_lnc)
ALK_RIP_PI_rpkm <- data.frame(rpkm(ALK_RIP_PI_d,width(lnc_tx)))
ALK_RIP_PARP_d <- DGEList(counts=as.matrix(ALK_RIP_PARP_counts_lnc), lib.size=ALK_RIP_PARP_lib_lnc)
ALK_RIP_PARP_rpkm <- data.frame(rpkm(ALK_RIP_PARP_d,width(lnc_tx)))
ALK_RIP_FC <- data.frame((ALK_RIP_PARP_rpkm+1)/(ALK_RIP_PI_rpkm+1))
alk_lnc_rpkm_fc <- lnc_tx[ALK_RNA_lnc_rpkm>=1 & ALK_RIP_FC>=2 ]
NROW(unique(unlist(mcols(alk_lnc_rpkm_fc)$tx_name)))
NROW(unique(unlist(mcols(alk_lnc_rpkm_fc)$gene_id)))
lnc_ratio <- NROW(unique(unlist(mcols(alk_lnc_rpkm_fc)$gene_id)))/NROW(unique(unlist(mcols(alk_lnc_rpkm)$gene_id)))
ALK_RNA_counts_sno <- ALK_RNA1_counts_sno$counts + ALK_RNA2_counts_sno$counts
ALK_RNA_lib_sno <- ALK_RNA1_counts_sno$lib + ALK_RNA1_counts_sno$lib
ALK_RNA_sno_d <- DGEList(counts=as.matrix(ALK_RNA_counts_sno), lib.size=ALK_RNA_lib_sno)
ALK_RNA_sno_rpkm <- data.frame(rpkm(ALK_RNA_sno_d,width(sno_tx)))
alk_sno_rpkm <- sno_tx[ALK_RNA_sno_rpkm>=1]
NROW(unique(unlist(mcols(alk_sno_rpkm)$tx_name)))
ALK_RIP_PARP_counts_sno <- ALK_RIP_PARP1_counts_sno$counts + ALK_RIP_PARP2_counts_sno$counts
ALK_RIP_PARP_lib_sno<- ALK_RIP_PARP1_counts_sno$lib + ALK_RIP_PARP2_counts_sno$lib
ALK_RIP_PI_counts_sno <- ALK_RIP_PI1_counts_sno$counts + ALK_RIP_PI2_counts_sno$counts
ALK_RIP_PI_lib_sno <- ALK_RIP_PI1_counts_sno$lib + ALK_RIP_PI1_counts_sno$lib
ALK_RIP_PI_d <- DGEList(counts=as.matrix(ALK_RIP_PI_counts_sno), lib.size=ALK_RIP_PI_lib_sno)
ALK_RIP_PI_rpkm <- data.frame(rpkm(ALK_RIP_PI_d,width(sno_tx)))
ALK_RIP_PARP_d <- DGEList(counts=as.matrix(ALK_RIP_PARP_counts_sno), lib.size=ALK_RIP_PARP_lib_sno)
ALK_RIP_PARP_rpkm <- data.frame(rpkm(ALK_RIP_PARP_d,width(sno_tx)))
ALK_RIP_FC <- data.frame((ALK_RIP_PARP_rpkm+1)/(ALK_RIP_PI_rpkm+1))
alk_sno_rpkm_fc <- sno_tx[ALK_RNA_sno_rpkm>=1 & ALK_RIP_FC>=2 ]
NROW(unique(unlist(mcols(alk_sno_rpkm_fc)$tx_name)))
sno_ratio <- NROW(unique(unlist(mcols(alk_sno_rpkm_fc)$tx_name)))/NROW(unique(unlist(mcols(alk_sno_rpkm)$tx_name)))
ALK_RIP_sno <- data.frame(ALK_RIP_PI_rpkm,ALK_RIP_PARP_rpkm)
colnames(ALK_RIP_sno) <- c('PI', 'PARP1')
ALK_RIP_sno_rpkm <- ALK_RIP_sno[ALK_RNA_sno_rpkm>=1 & ALK_RIP_FC>=2,]
ALK_RNA_counts_sn <- ALK_RNA1_counts_sn$counts + ALK_RNA2_counts_sn$counts
ALK_RNA_lib_sn <- ALK_RNA1_counts_sn$lib + ALK_RNA1_counts_sn$lib
ALK_RNA_sn_d <- DGEList(counts=as.matrix(ALK_RNA_counts_sn), lib.size=ALK_RNA_lib_sn)
ALK_RNA_sn_rpkm <- data.frame(rpkm(ALK_RNA_sn_d,width(sn_tx)))
alk_sn_rpkm <- sn_tx[ALK_RNA_sn_rpkm>=1]
NROW(unique(unlist(mcols(alk_sn_rpkm)$tx_name)))
ALK_RIP_PARP_counts_sn <- ALK_RIP_PARP1_counts_sn$counts + ALK_RIP_PARP2_counts_sn$counts
ALK_RIP_PARP_lib_sn<- ALK_RIP_PARP1_counts_sn$lib + ALK_RIP_PARP2_counts_sn$lib
ALK_RIP_PI_counts_sn <- ALK_RIP_PI1_counts_sn$counts + ALK_RIP_PI2_counts_sn$counts
ALK_RIP_PI_lib_sn <- ALK_RIP_PI1_counts_sn$lib + ALK_RIP_PI1_counts_sn$lib
ALK_RIP_PI_d <- DGEList(counts=as.matrix(ALK_RIP_PI_counts_sn), lib.size=ALK_RIP_PI_lib_sn)
ALK_RIP_PI_rpkm <- data.frame(rpkm(ALK_RIP_PI_d,width(sn_tx)))
ALK_RIP_PARP_d <- DGEList(counts=as.matrix(ALK_RIP_PARP_counts_sn), lib.size=ALK_RIP_PARP_lib_sn)
ALK_RIP_PARP_rpkm <- data.frame(rpkm(ALK_RIP_PARP_d,width(sn_tx)))
ALK_RIP_FC <- data.frame((ALK_RIP_PARP_rpkm+1)/(ALK_RIP_PI_rpkm+1))
alk_sn_rpkm_fc <- sn_tx[ALK_RNA_sn_rpkm>=1 & ALK_RIP_FC>=2 ]
NROW(unique(unlist(mcols(alk_sn_rpkm_fc)$tx_name)))
sn_ratio <- NROW(unique(unlist(mcols(alk_sn_rpkm_fc)$tx_name)))/NROW(unique(unlist(mcols(alk_sn_rpkm)$tx_name)))
ALK_RIP_sn <- data.frame(ALK_RIP_PI_rpkm,ALK_RIP_PARP_rpkm)
colnames(ALK_RIP_sn) <- c('PI', 'PARP1')
ALK_RIP_sn_rpkm <- ALK_RIP_sn[ALK_RNA_sn_rpkm>=1 & ALK_RIP_FC>=2,]
alk_allsno <- c(alk_sno_rpkm_fc,alk_sn_rpkm_fc)
alk_allsno_rpkm <- rbind(ALK_RIP_sno_rpkm,ALK_RIP_sn_rpkm)
allsno_rna <- c(sno_tx,sn_tx)
alk_allsno_rna_rpkm <- rbind(ALK_RNA_sno_rpkm,ALK_RNA_sn_rpkm)
# bar plot figure (B)
# Grouped Bar Plot
jpeg('barchart-ac16-species.jpg')
ratios <- c(pc_ratio,lnc_ratio,sno_ratio,sn_ratio)
barplot(ratios, main="SNORNA AC16", col=c("red","black", "dimgrey", "lightgrey"),ylim=c(0,.5))
dev.off()
boundTesting <-matrix(c(68,6619,84,319),nrow = 2,dimnames = list(Guess = c("bound", "unbound"),Truth = c("mRNA", "snoRNA")))
fisher.test(boundTesting)
# Boxplot of Preimmune vs PARP-1 (C)
jpeg('boxplot-ac16-species.jpg')
boxplot(ALK_RIP_sno_rpkm,col=(c("orange","blue")),outline=FALSE,ylim = c(0,200),yaxt="n", cex.axis=1,las=2,lwd=4,lty=1)
axis(2, at=seq(0,200,50))
dev.off()
wilcox.test(ALK_RIP_sno_rpkm[,1], ALK_RIP_sno_rpkm[,2],paired=T)
# Get Categories of snoRNA
alk_gr_snotx <- data.frame(seqnames=seqnames(alk_sno_rpkm),
starts=start(alk_sno_rpkm)-1,
ends=end(alk_sno_rpkm),
strand=strand(alk_sno_rpkm),
tx_name = elementMetadata(alk_sno_rpkm)$tx_name,
gene_id = unlist(elementMetadata(alk_sno_rpkm)$gene_id))
sno_annotations <- read.table('RNA_small_nucleolar.txt',header = TRUE, sep = "\t")
sno_inx <- match(matrix(unlist(strsplit(as.character(alk_gr_snotx$gene_id),split='.',fixed=T)),ncol=2,byrow=T)[,1], sno_annotations$ensembl_gene_id)
alk_gr_snotx$symbol <- as.character(sno_annotations[sno_inx,"symbol"])
alk_gr_snotx$gene_family <- as.character(sno_annotations[sno_inx,"gene_family"])
alk_gr_snotx$gene_family[alk_gr_snotx$gene_family == "Small nucleolar RNAs, H/ACA box"] <- "H/ACA box"
alk_gr_snotx$gene_family[alk_gr_snotx$gene_family == "Small nucleolar RNAs, C/D box"] <- "C/D box"
alk_gr_snotx$gene_family[alk_gr_snotx$gene_family == "Small Cajal body-specific RNAs"] <- "scaRNA"
alk_gr_snotx$gene_family[alk_gr_snotx$gene_family == ""] <- "Other"
alk_gr_snotx$gene_family[is.na(alk_gr_snotx$gene_family)] <- "Other"
ha_rna <- dim(alk_gr_snotx[alk_gr_snotx$gene_family == "H/ACA box",])[1]
cd_rna <- dim(alk_gr_snotx[alk_gr_snotx$gene_family == "C/D box",])[1]
sc_rna <- dim(alk_gr_snotx[alk_gr_snotx$gene_family == "scaRNA",])[1]
dat = data.frame(count=c(ha_rna, cd_rna, sc_rna), category=c("H/ACA box", "C/D box", "scaRNA"))
dat$fraction = dat$count / sum(dat$count)
dat$ymax = cumsum(dat$fraction)
dat$ymin = c(0, head(dat$ymax, n=-1))
dat$category <- factor(dat$category, levels = c("H/ACA box", "C/D box", "scaRNA"))
# (E)
jpeg('piechart-ac16-species.jpg')
ggplot(dat, aes(fill=category, ymax=ymax, ymin=ymin, xmax=4, xmin=2)) +
geom_rect(fill=c('darkorchid1', "darkorange1","darkgreen")) +
coord_polar(theta="y") +
xlim(c(0, 4)) +
theme_bw() +
theme(panel.grid=element_blank()) +
theme(axis.text=element_blank()) +
theme(axis.ticks=element_blank())
dev.off()
alk_gr_snotx <- data.frame(seqnames=seqnames(alk_sno_rpkm_fc),
starts=start(alk_sno_rpkm_fc)-1,
ends=end(alk_sno_rpkm_fc),
strand=strand(alk_sno_rpkm_fc),
tx_name = elementMetadata(alk_sno_rpkm_fc)$tx_name,
gene_id = unlist(elementMetadata(alk_sno_rpkm_fc)$gene_id))
sno_inx <- match(matrix(unlist(strsplit(as.character(alk_gr_snotx$gene_id),split='.',fixed=T)),ncol=2,byrow=T)[,1], sno_annotations$ensembl_gene_id)
alk_gr_snotx$symbol <- as.character(sno_annotations[sno_inx,"symbol"])
alk_gr_snotx$gene_family <- as.character(sno_annotations[sno_inx,"gene_family"])
alk_gr_snotx$gene_family[alk_gr_snotx$gene_family == "Small nucleolar RNAs, H/ACA box"] <- "H/ACA box"
alk_gr_snotx$gene_family[alk_gr_snotx$gene_family == "Small nucleolar RNAs, C/D box"] <- "C/D box"
alk_gr_snotx$gene_family[alk_gr_snotx$gene_family == "Small Cajal body-specific RNAs"] <- "scaRNA"
alk_gr_snotx$gene_family[alk_gr_snotx$gene_family == ""] <- "Other"
alk_gr_snotx$gene_family[is.na(alk_gr_snotx$gene_family)] <- "Other"
ha_rip <- dim(alk_gr_snotx[alk_gr_snotx$gene_family == "H/ACA box",])[1]
cd_rip <- dim(alk_gr_snotx[alk_gr_snotx$gene_family == "C/D box",])[1]
sc_rip<- dim(alk_gr_snotx[alk_gr_snotx$gene_family == "scaRNA",])[1]
# bar plot figure (F)
# Bar plot
jpeg('barchart-ac16-species_snospecies.jpg')
ratios <- c(sn_ratio,ha_rip/ha_rna,cd_rip/cd_rna,sc_rip/sc_rna)
barplot(ratios, main="snoRNA species AC 16", col=c('pink1','darkorchid1', "darkorange1","darkgreen"),ylim=c(0,1))
dev.off()
typeTesting <-matrix(c(50,28,49,115),nrow = 2,dimnames = list(Guess = c("bound", "unbound"),Truth = c("HA", "CD")))
fisher.test(typeTesting)
# Combine snRNA and snoRNA and print out
allsnotx_a <- data.frame(seqnames=seqnames(alk_allsno),
starts=start(alk_allsno)-1,
ends=end(alk_allsno),
strand=strand(alk_allsno),
tx_id = elementMetadata(alk_allsno)$tx_name,
gene_id = unlist(elementMetadata(alk_allsno)$gene_id))
allsnotx_a_rpkm <- cbind(allsnotx_a,alk_allsno_rpkm)
sno_mapping <- read.csv("./gencode.v19.annotation_snoRNA_mapping.txt", header=F, sep=',')
sn_mapping <- read.csv("./gencode.v19.annotation_snRNA_mapping.txt", header=F, sep=',')
gencode_sn_mapping <-rbind(sno_mapping,sn_mapping)
sn_inx <- match(allsnotx_a_rpkm$tx_id, gencode_sn_mapping$V2)
allsnotx_a_rpkm$tx_name <- as.character(gencode_sn_mapping[sn_inx,"V4"])
allsnotx_a_rpkm$gene_name <- as.character(gencode_sn_mapping[sn_inx,"V3"])
write.table(allsnotx_a_rpkm, file="ac16-snRNA_RPKM_1_FC_2.tsv", quote=F, sep="\t", row.names=F, col.names=T)
allsnotx_rna <- data.frame(seqnames=seqnames(allsno_rna),
starts=start(allsno_rna)-1,
ends=end(allsno_rna),
strand=strand(allsno_rna),
tx_id = elementMetadata(allsno_rna)$tx_name,
gene_id = unlist(elementMetadata(allsno_rna)$gene_id))
alk_allsnotx_rna_rpkm <- cbind(allsnotx_rna,alk_allsno_rna_rpkm)
sno_mapping <- read.csv("./gencode.v19.annotation_snoRNA_mapping.txt", header=F, sep=',')
sn_mapping <- read.csv("./gencode.v19.annotation_snRNA_mapping.txt", header=F, sep=',')
gencode_sn_mapping <-rbind(sno_mapping,sn_mapping)
sn_inx <- match(alk_allsnotx_rna_rpkm$tx_id, gencode_sn_mapping$V2)
alk_allsnotx_rna_rpkm$tx_name <- as.character(gencode_sn_mapping[sn_inx,"V4"])
alk_allsnotx_rna_rpkm$gene_name <- as.character(gencode_sn_mapping[sn_inx,"V3"])
write.table(alk_allsnotx_rna_rpkm, file="ac16-snRNA_RPKM_RNA.tsv", quote=F, sep="\t", row.names=F, col.names=T)
```
No preview for this file type
This diff is collapsed.
This source diff could not be displayed because it is too large. You can view the blob instead.
No preview for this file type
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment