Closed lmanchon closed 2 months ago
Hi, Your file, as it stands, is missing important information that need to be added. And I suspect would make your life easier going forward. If the PCR reaction was run on material (cell culture, for example) for two or more probes this info need to be encoded in the file. Once you add this, I'd be happy to take a look.
# load library
library(tidyverse)
> # reading file
> read_tsv('ALL.txt') %>%
+ separate(Sample_Name, c('abx', 'group')) %>%
+ filter(abx == 'T2')
# A tibble: 48 x 4
abx group Target Ct
<chr> <chr> <chr> <dbl>
1 T2 FIBRO NANOG 28.5 # Plate 1
2 T2 FIBRO NANOG 28.7
3 T2 FIBRO NANOG 28.6
4 T2 FIBRO B2M 16.8 # Plate 1
5 T2 FIBRO B2M 16.6
6 T2 FIBRO B2M 16.2
7 T2 S NANOG 26.6 # Plate 1
8 T2 S NANOG 26.9
9 T2 S NANOG 27.4
10 T2 S B2M 17.0
# … with 38 more rows
The reason this is important, is to show how the values relate to each other which is needed in this model. Also, when you try to reshape your data, you'd get errors/warnings, which you tried to solve by using fake ids mutate(id = row_number())
. Like below
> read_tsv('ALL.txt') %>%
+ separate(Sample_Name, c('abx', 'group')) %>%
+ filter(abx == 'T2') %>%
+ pivot_wider(names_from = 'Target', values_from = 'Ct')
# A tibble: 2 x 7
abx group NANOG B2M SOX2 POU5F1 DNMT3B
<chr> <chr> <list> <list> <list> <list> <list>
1 T2 FIBRO <dbl [3]> <dbl [12]> <dbl [3]> <dbl [3]> <dbl [3]>
2 T2 S <dbl [3]> <dbl [12]> <dbl [3]> <dbl [3]> <dbl [3]>
I read this as, 'B2M' was tested once with each gene of interest, three replicates in each run. But the relation between these replicates are missing.
Once you have a column for something like plate number, this problem should go a way. Idealy, the combination of group, Target and <plate_key>
should be unique.
--Hi,
I obtain no results with my data (see attachment), and i don't know why. Can you check please if my input file is well formated ? Thank you.
ALL.txt
this is the code i used: