Question: output of the function "makeCountsFromAbundance"
0
7 months ago by
capricygcapricyg0 wrote:

Hello, there,

I am testing the function "makeCountsFromAbundance" using the following data (numbers derived from Salmon output):

> count
a  b  c  d
A 27 50 67 36
B  0  0  0  0
> length
a       b       c       d
A  310.08  395.79  504.53  342.48
B 1026.00 1008.00 1009.00 1021.00
> abundance
[,1] [,2] [,3] [,4]
[1,] 3.14 4.95 3.84 4.91
[2,] 0.00 0.00 0.00 0.00
>  f=makeCountsFromAbundance(count,abundance,length,countsFromAbundance="scaledTPM")
> f
a  b  c  d
A 27 50 67 36
B  0  0  0  0


I don't think I got the "scaledTPM" as the documentation indicated... Instead, the output is just raw counts. Could anyone help me with it?

Thanks.

C.

tximport • 145 views
modified 7 months ago by James W. MacDonald52k • written 7 months ago by capricygcapricyg0
Answer: output of the function "makeCountsFromAbundance"
0
7 months ago by
Michael Love26k
United States
Michael Love26k wrote:

The problem is just that this data is artificial (one gene). Try on real data.

Answer: output of the function "makeCountsFromAbundance"
0
7 months ago by
United States
James W. MacDonald52k wrote:

You are testing using an edge case, where you only have two genes, and one has no observations (which isn't a real expectation). A more reasonable test would be to use two genes with actual observations:

> count
[,1] [,2] [,3] [,4]
[1,]   27   50   67   36
[2,]    0    0    0    0
> count2 <- count
> count2[2,] <- c(1,2,4,3)
> count2
[,1] [,2] [,3] [,4]
[1,]   27   50   67   36
[2,]    1    2    4    3
> abundance
[,1] [,2] [,3] [,4]
[1,] 3.14 4.95 3.84 4.91
[2,] 0.00 0.00 0.00 0.00
> abundance2 <- abundance
> abundance2[2,] <- c(0.3,0.5, 0.7, 0.6)
> abundance2
[,1] [,2] [,3] [,4]
[1,] 3.14 4.95 3.84 4.91
[2,] 0.30 0.50 0.70 0.60
> makeCountsFromAbundance(count2, abundance2, length)
[,1]      [,2]     [,3]      [,4]
[1,] 25.55814 47.229358 60.05286 34.753176
[2,]  2.44186  4.770642 10.94714  4.246824