Hi all,
I have RNA-Seq time-series data generated by HTseq counts. There are sort of 2 replicates. The First replicate has 4 time point samples(day0,2,5,14), while the Second has 5 time point samples(day0,2,5,15,30). The data was loaded as a read.table matrix in R. The following is the script used:
setwd("Downloads")
df_A <- read.table(file='Replicate_sample_Raw_RPM_counts-2',header=T,sep='\t')
df_B <- read.table(file='HT-seq_counts.txt-2',header=T,sep='\t')
merged_df <- merge(df_A,df_B,by='geneID')
write.table(merged_df,file='merged_count.txt',row.names=F,quote=F,sep='\t')
counts<-read.csv("merged_count.txt",header=T,sep="\t")
data<-counts[-1]
rlog(data)
head(data)
day0.x day2.x day5.x day14 day0.y day2.y day5.y day15 day30
1 358 422 241 617 145 508 389 357 594
2 11 31 44 26 8 24 41 49 49
3 7 3 33 392 2 5 25 159 155
4 26 45 74 5624 45 175 94 4604 14238
5 4 10 66 338 19 13 70 229 242
6 477 138 64 21 747 507 98 25 22
But when I try to to run rlog or rlogTransformation I get the following error:
Error in (function (classes, fdef, mtable) :
unable to find an inherited method for function ‘sizeFactors’ for signature ‘"data.frame"’
How can I improve the script to make rlog run so that I can have my HT-seq counts normalized?
So I have tried creating a design matrix but I am not entirely sure I have designed correctly for the data I have:
This is the script I used to create the design matrix:
This is the error that I am getting when trying to create the design matrix:
What am I doing wrong? I hope I have not misunderstood your advice nor how to create a proper matrix.
you are missing a closing parenthesis in your vector function...
you could also use:
and omit the second line