Hi,
I am trying to manually add information (rowRanges and primer data) to my 'fc' object. This is my code (the relevant parts to my problem):
fragmented_Rn6=read.table(file="valid fragments only_Rn6.tab",header=TRUE)
fragmented_Rn6$leftSize=as.numeric(fragmented_Rn6$leftSize)
fragmented_Rn6$rightSize =as.numeric(fragmented_Rn6$rightSize)
gr=makeGRangesFromDataFrame(fragmented_Rn6,keep.extra.columns=TRUE,ignore.strand=TRUE,seqnames.field="chr", start.field="start",end.field = "end",starts.in.df.are.0based=TRUE )
rowRanges(fc)=gr
colData(fc)$chr= factor("chr5") #chr of the viewpoint; class- factor
colData(fc)$start= 164790443L # start point of viewpoint fragment; class- integer
colData(fc)$end= 164793939L # end point of viewpoint fragment; class- integer
When I use the getZscore function I keep getting this Error:
> minCount=40
> fcf = getZScores(fc, removeZeros = TRUE,minCount=minCount,fitFun =distFitMonotoneSymmetric)
Error in Ops.factor(runValue(e1)[which1], runValue(e2)[which2]) :
level sets of factors are different
Does anyone know why?