Entering edit mode
Harikrishnadhar
▴
40
@harikrishnadhar-3588
Last seen 11.2 years ago
Dear All,
I am doing my analysis for time series data and have to perform
template
matching.
I am new to this concept and need some help to proceed further
Here are the details of my analysis:
I have 7000x 82 matrix in which rows are the genes and col are samples
respectively.
I have to define templates using 6 different combination for which
have used
the following code;
templates <- permutations(3,6,c(-1,0,1),repeats=T)
comb1<-c (1,2,3,4)
com2 <- c (5,6,7,8)
com3 <- c (9,10,11,12)
com4 <- c(13,14,15,16)
com5 <- c(17,18,19,20)
com6 <- c(21,22,23,24)
com7 <- c(25,26,27,28)
To get the 729 profiles for the templates using permutation code is as
follows
profile <- matrix(0,nrow=729,ncol=82)
for (i in 1:729){
profile[i,hf1hr.cols] <- templates[i,1]
profile[i,hf6hr.cols] <- templates[i,2]
profile[i,hf24hr.cols] <-templates[i,3]
profile[i,cho1hr.cols] <- templates[i,4]
profile[i,cho6hr.cols] <- templates[i,5]
profile[i,cho24hr.cols] <- templates[i,6]
}
once i run the above code I have 729 x82 profiles.
I have to calculate correlation of each gene with each profile.
Should have
a 7000 X 82 size matrix.
Then have to find for each gene,the profile with maximum absolute
correlation and use that number for that gene.I should end up with
7000 X 1
sized profile assignment.
I am struck in between my analysis please help with
this!!!!!!!!!!!!!!!!!!!!
It would be greatly appreciated if I get some suggestions,code,or
links.
Have a great day
--
Thanks
Harikrishnadhar Sonnenahalli
[[alternative HTML version deleted]]
