测试图像分析软件的真实和模拟数据
pythologist-test-images的Python项目详细描述
#pythogist test images
用于单元测试等的图像
列出可用的数据集:
``python
from pythogist_test_images import testimages
```
>;['irisspatialfeatures','small',“tiny”]
获取指向数据集的路径
``python
path=testimages().raw('irisspatialfeatures')
print(path)
````
>;'/source/pythogist test images/data/irisspatialfeatures/example'
获取一个celldataframe pythogist对象(需要pythologistreader和pythogist`pip install pythogist test images[h5]`)
``python
cdf=testimages().celldataframe('tiny')
tdf=cdf.threshold('t-cell','pd1').threshold('other','pdl1').threshold('tumor','pdl1')
tdf.loc[tdf['sample\u name'].str.contains('i'),'project\u name']='slidemodelifriltrated'
tdf.loc[tdf['sample\u name'].str.contains('e'),'project\u name']='slidemodelexcluded'
tdf.loc[tdf['sample\u name'].str.contains('u'),“项目名称”]=“幻灯片幻灯形式”
tdf[“项目ID”]=tdf[“项目名称”]
(ggplot(cnts,aes(x=”样本名称“,y=”平均密度“,
ymin=”平均密度“+stderr密度“,
ymax=”平均密度“-stderr密度”,fill='项目名称')
+geom_bar(stat='身份')
+geom_errorbar()
+facet_wrap('表型标签',scales='自由')
+主题_bw()
+主题(面板间距x=0.5)
+主题(图大小=(6,6))
)
``````
![计数图像](https://github.com/jason-weirate/pythogist-test-images/raw/master/images/counts.png?原始=真)
用于单元测试等的图像
列出可用的数据集:
``python
from pythogist_test_images import testimages
>;['irisspatialfeatures','small',“tiny”]
获取指向数据集的路径
``python
path=testimages().raw('irisspatialfeatures')
print(path)
````
>;'/source/pythogist test images/data/irisspatialfeatures/example'
获取一个celldataframe pythogist对象(需要pythologistreader和pythogist`pip install pythogist test images[h5]`)
``python
cdf=testimages().celldataframe('tiny')
tdf=cdf.threshold('t-cell','pd1').threshold('other','pdl1').threshold('tumor','pdl1')
tdf.loc[tdf['sample\u name'].str.contains('i'),'project\u name']='slidemodelifriltrated'
tdf.loc[tdf['sample\u name'].str.contains('e'),'project\u name']='slidemodelexcluded'
tdf.loc[tdf['sample\u name'].str.contains('u'),“项目名称”]=“幻灯片幻灯形式”
tdf[“项目ID”]=tdf[“项目名称”]
(ggplot(cnts,aes(x=”样本名称“,y=”平均密度“,
ymin=”平均密度“+stderr密度“,
ymax=”平均密度“-stderr密度”,fill='项目名称')
+geom_bar(stat='身份')
+geom_errorbar()
+facet_wrap('表型标签',scales='自由')
+主题_bw()
+主题(面板间距x=0.5)
+主题(图大小=(6,6))
)
``````
![计数图像](https://github.com/jason-weirate/pythogist-test-images/raw/master/images/counts.png?原始=真)