I am confused in on part of my analysis .
What I need to do is extract Up-regulated and down-regulated miRNA's from my data frame. I have data frame with 5 Samples A,B,C,D,E. A is parent (reference)sample and rest of samples are from patients. each row represents a miRNA and value against that row in each column represents Back ground subtraction values of that miRNA in each sample. so on the basis of this I want to extract miRNA's which are up regulated and down-regulated in each sample.Since I have no replicates, there really aren't any statistical tests that make sense. So want to divide B, C, D, and E by A. This gives me fold change for each sample with respect to sample A, the parent. then I can filer my rows (where UP will be >1 and DOWN will be less than 1). I am also to do this for two columns and is not able to do that for 5 columns.
My data Look like
A B C D E
hsa-miR-199a-3p, hsa-miR-199b-3p NA 13.13892 5.533703 25.67405 NA
hsa-miR-365a-3p, hsa-miR-365b-3p 15.70536 52.86558 18.467540 223.51424 31.93503
hsa-miR-3689a-5p, hsa-miR-3689b-5p NA 21.41597 5.964772 NA 24.26073
hsa-miR-3689b-3p, hsa-miR-3689c 9.58696 44.56490 10.102051 13.26785 NA
hsa-miR-4520a-5p, hsa-miR-4520b-5p 18.06865 28.06991 NA NA NA
hsa-miR-516b-3p, hsa-miR-516a-3p NA 10.77471 8.039662 NA NA
now I want to firstly divide B/C/D/E with A
but I have to take care of these conditions.
if ( B &&C && D && E)==NA ---> result is NA
now I will take B&C (expression of C with respect to B (C/B)
if numerator(C) is NA --->result=NA
if denominator (B) is NA ---->result=value of C (numerator) <<<- why because when I will compare C with respect to B if miRNA was expressed in B but not expressed in C then result should be NA and if miRNA was not expressed in B but it expressed in C then result should be C (Updated value of that miRNA)
else I will simply divide (C/B) and will store in result . Now result should be divided with D
result/D with same conditions of NA of numerator and denominator and again the result should updated and again should be divided with E with updated value and same NA conditions.
A B C D E
Lest suppose 18.06865 28.06991 NA 441.00 NA
now I can divide that result with A ----> result/A======== NA
I would really appreciate your help