I'm trying to run this using a file formatted in the specified way (a text file with columns "chromosome", "start", "end", and "segVal"). However, I am getting an error:
Error in `colnames<-`(`*tmp*`, value = `*vtmp*`) :
attempt to set 'colnames' on an object with less than two dimensions
4.
stop("attempt to set 'colnames' on an object with less than two dimensions")
3.
`colnames<-`(`*tmp*`, value = `*vtmp*`) at helper_functions.R#87
2.
getSegsize(CN_data) at main_functions.R#100
1.
extractCopynumberFeatures(data)
I believe the error is in colnames(segTab)[4]<-"segVal". segTab should be an atomic vector, no? Since you are iterating through columns? So I'm not sure why you are assigning a new header to the fourth column of a 1-column vector.
Hi,
I'm trying to run this using a file formatted in the specified way (a text file with columns "chromosome", "start", "end", and "segVal"). However, I am getting an error:
I looked into the script here:
I believe the error is in
colnames(segTab)[4]<-"segVal"
.segTab
should be an atomic vector, no? Since you are iterating through columns? So I'm not sure why you are assigning a new header to the fourth column of a 1-column vector.Please advise, thanks.