Commit 3808d7b9 authored by Beatriz Vicoso's avatar Beatriz Vicoso
Browse files

Update TPM.md

parent 440aa400
......@@ -4,7 +4,7 @@
```
####PICK FACTOR TO UPREGULATE DIPLOID GENES BY (1 = no upregulation, 1.6 = similar to our inferred upregulation)
upfactor<-1
upfactor<-1.6
###LOAD DATA
......@@ -57,18 +57,20 @@ head(tetraploidA)
head(diploidA)
diploidA$est_counts<-upfactor*diploidA$est_counts
head(diploidA)
subA<-rbind(tetraploidA, diploidA)
## Table with all fake-carp genes so we can get sum of counts for TPM calculations
subAB<-rbind(subA, subB)
sumABcounts<-colSums(as.data.frame(subAB[,6]))
## Reestimate TPM of subA and subB genes, using the sum of counts of both
subA$carptp<- 1000*(subA$est_counts / subA$eff_length)
subA$carptpm<- ( subA$barbtp / colSums(as.data.frame(subAB[,6])) ) * 10^6
subA$carptpm<- ( subA$carptp / colSums(as.data.frame(subAB[,6])) ) * 10^6
subB$carptp<- 1000*(subB$est_counts / subB$eff_length)
subB$carptpm<- ( subB$barbtp / colSums(as.data.frame(subAB[,6])) ) * 10^6
subB$carptpm<- ( subB$carptp / colSums(as.data.frame(subAB[,6])) ) * 10^6
### MAkE REDIPLOIDIZED AND TETRAPLOID TABLES
......
Supports Markdown
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