Stage 1:
cpnum = seg_states[probe_states]
Hi guys ,this statment is not working for some reason. Help!
Problem: What does not work? What's the error reported?
Stage 2:
cpnum = seg_states[probe_states]
Hi guys ,this statment is throwing this error:
Error in seg_states[probe_states] : invalid subscript type 'list'
Problem: Well it's not entirely obvious what have been deposited into probe_states. You need to provide more upstream info.
Stage 3:
assign_copynumber <- function(probidx, p_vct, L_vct, L_chromosome = tail(probidx,1), maxIter = 5, guess = 1.5){
## ...
probe_states=sapply(probes, FUN = function(x){find_seg(x,segEND)})
cpnum = seg_states[probe_states]
}
Hi guys,
I am calling a function that locates a probe in a set of segments, but it is throwing an error :
Error in seg_states[probe_states] : invalid subscript type 'list'
The probe_states appears to be empty, but why is that the case?
Problem: At this stage, the problem is pretty clear: probidx is passed into the function whereas probes is getting called! No wonder it is empty then!
Conclusion: By constructing a complete representation of the encountered problem (with manual tracebacks), there is a good chance it would be solved by the time it becomes complete. So please do practice such things!
Stage 1:
Problem: What does not work? What's the error reported?
Stage 2:
Problem: Well it's not entirely obvious what have been deposited into
probe_states. You need to provide more upstream info.Stage 3:
Problem: At this stage, the problem is pretty clear:
probidxis passed into the function whereasprobesis getting called! No wonder it is empty then!Conclusion: By constructing a complete representation of the encountered problem (with manual tracebacks), there is a good chance it would be solved by the time it becomes complete. So please do practice such things!