BiomedicalMachineLearning / stLearn

A novel machine learning pipeline to analyse spatial transcriptomics data
Other
190 stars 25 forks source link

【bug】 code error #287

Closed lvmt closed 6 months ago

lvmt commented 6 months ago

hi,

the code's col name is different from the 10x output

# wrapper/read.py 
# read coordinates
  positions = pd.read_csv(files["tissue_positions_file"], header=None)
  positions.columns = [
      "barcode",
      "in_tissue",
      "array_row",
      "array_col",
      "pxl_col_in_fullres",    # may be wrong  
      "pxl_row_in_fullres",
  ]

while the 10x output like this

barcode,in_tissue,array_row,array_col,pxl_row_in_fullres,pxl_col_in_fullres
ACGCCTGACACGCGCT-1,0,0,0,25982,1839
TACCGATCCAACACTT-1,0,1,1,25799,2157
ATTAAAGCGGACGAGC-1,0,0,2,25616,1839
GATAAGGGACGATTAG-1,0,1,3,25434,2157

th row and col position is wrong .

duypham2108 commented 6 months ago

Thanks, actually I copied it from scanpy. It seems an x/y issue in plotting. However, it works well with the current setting. You can check this discussion:

https://github.com/scverse/squidpy/issues/599