TESLA
TESLA copied to clipboard
Error in tutorial?
Hi,
I was following your tutorial and in your original code it seems that cnt will reflect the last step (contour by y, not cv2). I modified to look at the different contours with each algorithm, but the step #### 4.4 Plot gene expression image
only works with cnty and not cntcv2.
#Three different algorithms to detect contour, select the best one. Here we use cv2.
#-----------------1. Detect contour using cv2-----------------
cntcv2=tesla.cv2_detect_contour(img, apertureSize=5,L2gradient = True)
#-----------------2. Scan contour by x-----------------
spots=counts.obs.loc[:, ['pixel_x', 'pixel_y', "array_x", "array_y"]]
#shape="hexagon" for 10X Visium, shape="square" for ST
cntx=tesla.scan_contour(spots, scan_x=True, shape="hexagon")
#-----------------3. Scan contour by y-----------------
spots=counts.obs.loc[:, ['pixel_x', 'pixel_y', "array_x", "array_y"]]
#shape="hexagon" for 10X Vsium, shape="square" for ST
cnty=tesla.scan_contour(spots, scan_x=False, shape="hexagon")
#_----------------------
cnt = cnty
Also, in this code:
6.2 Leading edge detection
ret_img=tesla.leading_edge_detection(img=img,
pred_refined=pred_refined,
resize_factor=resize_factor,
target_clusters=target_clusters,
binary=binary)
gives error:
Traceback (most recent call last):
File "