-
Notifications
You must be signed in to change notification settings - Fork 12
/
Copy pathREADME.Rmd
1934 lines (1537 loc) · 103 KB
/
README.Rmd
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
---
title: "HiT-MaP"
output:
github_document:
toc: true
toc_depth: 2
html_document:
toc: yes
toc_float: yes
collapsed: no
theme: spacelab
df_print: tibble
highlight: zenburn
fig_width: 10
fig_height: 10
number_sections: yes
word_document: default
pdf_document: default
md_document:
variant: gfm
bibliography: references.bib
vignette: >
%\VignetteIndexEntry{1. HiTMaP}
%\VignetteEncoding{UTF-8}
%\VignetteEngine{knitr::rmarkdown}
editor_options:
markdown:
wrap: 72
---
```{r setup, echo=FALSE, message=FALSE}
knitr::opts_chunk$set(cache = T)
```
-- An R package of High-resolution Informatics Toolbox for Maldi-imaging
Proteomics
Find our published research article on *Nature Communications*:
<https://doi.org/10.1038/s41467-021-23461-w>
![<https://doi.org/10.1038/s41467-021-23461-w>](https://img.shields.io/badge/DOI-10.1038/s41467--021--23461--w-orange.svg)
![zenodo](https://zenodo.org/badge/187550066.svg)
Maintainer: George Guo <[email protected]>
About us:
[Mass Spectrometry Hub | University of Auckland](https://mash.auckland.ac.nz/)
[Cancer research theme | Garvan Institute of Medical Research](https://www.garvan.org.au/)
[MSRC Schey lab | Vanderbilt University](https://lab.vanderbilt.edu/msrc-schey-lab/)
# Package installation
This is a tutorial for the use of HiTMaP (An R package of
High-resolution Informatics Toolbox for Maldi-imaging Proteomics).
User's may run HiTMaP using Docker, or through R console, however Docker is
recommended to avoid issues with package dependency.
## Installation of docker image
HiTMaP has been encapsulated into a docker image. After a proper installation and configuration of Docker engine ([Docker documentation](https://docker-docs.netlify.app/install/overview/)),
user's can download the latest version of HiT-MaP by using the bash code as below.
```{bash eval=FALSE, include=T}
docker pull mashuoa/hitmap
```
Tags of available docker images:
1. **mashuoa/hitmap:latest** contains the stable build release (built from the Dockerfile at MASHUOA/hitmap_docker with the effort from John Reeves <[email protected]>).
2. **mashuoa/hitmap:natcomms** contains the original version when this project been accepted (minor changes applied to enhance the multi-files cluster image rendering).
3. **mashuoa/hitmap:gui_latest** contains the developing graphical user interface of HiTMaP. Please map the 3838 port to the container and access the GUI via http://localhost:3838/. We are happy to hear your voice regarding the High-RES IMS pre-processing, segmentation and annotation as well as their corresponding GUI configurations.
4. We are able to supply a singularity template to the users who want to deploy the HiTMaP on an HPC server. This scripts also are available at the MASHUOA/hitmap/dockerfiles.
Setting up and running the docker container:
```{bash eval=FALSE, include=T}
# For windows user's, run the image with a local user\Documents\expdata folder mapped to the docker container:
docker run --name hitmap -v %userprofile%\Documents\expdata:/root/expdata -a stdin -a stdout -i -t mashuoa/hitmap /bin/bash
# For linux or mac user's, run the image with a local user/expdata folder mapped to the docker container:
docker run --name hitmap -v ~/expdata:/root/expdata -a stdin -a stdout -i -t mashuoa/hitmap /bin/bash
#Run the R console
R
```
Revoke Docker terminal:
```{bash eval=FALSE, include=T}
#use ctrl+d to exit the docker container shell
#Restart the container and connect to the shell
docker restart hitmap
docker container exec -it hitmap /bin/bash
```
Stop/remove docker container (warning: if no local disk is mapped to
"\~/expdata", please backup your existing result files from the
container before you remove it):
```{bash eval=FALSE, include=T}
docker stop hitmap
docker rm hitmap
```
If you are using docker GUI, pull the docker image using the codes above
and follow the image as below to setup the container. if you are using **mashuoa/hitmap:shiny_server**, please also map local host:3838 to the container (Ports -> local hosts -> 3838).
![Docker GUI setting](Resource/docker_gui_setting.png)
## Installation code for R console installation
The code below is used for an experienced R user to build a local
R/HiTMaP running environment. Major dependencies to note:
- R base
- Rtools, Windows user required ([*https://cran.r-project.org/bin/windows/Rtools/*](https://cran.r-project.org/bin/windows/Rtools/))
- java running library (for linux, additional configuration is needed:
*R CMD javareconf*)
- orca for plotly
(<https://github.com/plotly/orca/releases/tag/v1.3.1>)
- magick++ (for Linux, additional configuration is needed to expand
the pixel limitation)
```{r Install the package, eval=FALSE, message=FALSE, warning=FALSE, include=TRUE}
#install the git package
install.packages("remotes")
install.packages("devtools")
install.packages("BiocManager")
#library(devtools)
library(remotes)
Sys.setenv("R_REMOTES_NO_ERRORS_FROM_WARNINGS" = "true")
options(install.packages.check.source = "no")
BiocManager::install(c( "XVector", "Biostrings", "KEGGREST","cleaver"),INSTALL_opts="-Wno-error")
BiocManager::install(c("EBImage","Rdisop"))
remotes::install_github("MASHUOA/HiTMaP",force=T,build_opts = c("--no-resave-data", "--no-manual","-Wno-error", "--no-build-vignettes"),configure.vars="CFLAGS= -O3 -Wall -mtune=native -march=native -Wno-error",ask = F)
#Update all dependencies
BiocManager::install(ask = F)
library(HiTMaP)
```
## Codes for Linux OS building enviornment
Run the codes as below to enable the required components in Linux
console.
```{bash eval=FALSE, include=T}
function apt_install() {
if ! dpkg -s "$@" >/dev/null 2>&1; then
if [ "$(find /var/lib/apt/lists/* | wc -l)" = "0" ]; then
apt-get update
fi
apt-get install -y --allow-downgrades --no-install-recommends "$@"
fi
}
apt_install \
sudo \
gdebi-core \
libcairo2=1.18.0-1+b1 \
libcairo-script-interpreter2=1.18.0-1+b1 \
lsb-release \
libcurl4-openssl-dev \
libcairo2-dev \
libxt-dev \
xtail \
wget \
default-jdk \
libxml2-dev \
libssl-dev \
libudunits2-dev \
librsvg2-dev \
libmagick++-dev \
r-cran-ncdf4 \
libz-dev \
libnss-winbind \
winbind \
dirmngr \
gnupg \
apt-transport-https \
ca-certificates \
software-properties-common \
libfftw3-dev \
texlive \
libgdal-dev \
ghostscript \
g++
```
## Codes for Mac OS building enviornment (optional)
The following code is for a local GUI purpose. Hitmap now has been built
on the shiny server system. You can skip this step in the later version.
You may need to update the Xcode. Go to your Mac OS terminal and input:
```{bash eval=FALSE, include=T}
xcode-select --install
```
You'll then receive: *xcode-select: note: install requested for command
line developer tools* You will be prompted at this point in a window to
update Xcode Command Line tools.
You may also need to install the X11.app and tcl/tk support for Mac
system:
- X11.app: <https://www.xquartz.org/>
- Use the following link to download and install the correct tcltk
package for your OS version.
<https://cran.r-project.org/bin/macosx/tools/>
# Example data and source code
The HitMaP comes with a series of maldi-imaging datasets acquired by
FT-ICR mass spectromety. With the following code, you can download these
raw data set into a local folder.
You can download the example data manually through this link:
"<https://github.com/MASHUOA/HiTMaP/releases/download/1.0.1/Data.tar.gz>"
Or download the files in a R console:
```{r eval=FALSE, message=FALSE, warning=FALSE, include=TRUE}
if(!require(piggyback)) install.packages("piggyback")
library(piggyback)
#made sure that this folder has enough space
wd="~/expdata/"
dir.create(wd)
setwd(wd)
pb_download("HiTMaP-master.zip", repo = "MASHUOA/HiTMaP", dest = ".",show_progress = F, tag="1.0.1")
pb_download("Data.tar.gz", repo = "MASHUOA/HiTMaP", dest = ".")
untar('Data.tar.gz',exdir =".", tar="tar")
#unlink('Data.tar.gz')
list.dirs()
```
The example data contains three folders for three individual IMS
datasets, which each contain a configuration file, and the fasta
database, respectively: *"./Bovinlens_Trypsin_FT"*
*"./MouseBrain_Trypsin_FT"* *"./Peptide_calibrants_FT"*
An Tiny version of data set is also available by using the code below:
```{r eval=FALSE, message=FALSE, warning=FALSE, include=TRUE}
if(!require(piggyback)) install.packages("piggyback")
library(piggyback)
#made sure that this folder has enough space
wd="~/expdata/"
dir.create(wd)
setwd(wd)
pb_download("Data_tiny.tar.gz", repo = "MASHUOA/HiTMaP", dest = ".")
untar('Data_tiny.tar.gz',exdir =".", tar="tar")
#unlink('Data.tar.gz')
list.dirs()
```
The tiny version dataset was generated from the Bovinlens and MouseBrain original data:
1. m/z range: 700 - 1400
2. pixel range:
x <= 20%, y >= 80% (Bovinlens)
x <= 30%, y <= 20% (MouseBrain)
# Proteomics identification on maldi-imaging dataset
To perform false-discovery rate controlled peptide and protein
annotation, run the following script below in your R session:
```{r imaging_identification, eval=FALSE, message=FALSE, warning=FALSE, include=TRUE}
#create candidate list
library(HiTMaP)
#set project folder that contains imzML, .ibd and fasta files
#wd=paste0(file.path(path.package(package="HiTMaP")),"/data/")
#set a series of imzML files to be processed
datafile=c("Bovinlens_Trypsin_FT/Bovin_lens.imzML")
wd="~/expdata/"
preprocess = list(force_preprocess=TRUE,
use_preprocessRDS=FALSE,
smoothSignal=list(method = c("Disable", "gaussian", "sgolay", "ma")[1]),
reduceBaseline=list(method = c("Disable", "locmin", "median")[1]),
peakPick=list(method=c("diff", "sd", "mad", "quantile", "filter", "cwt")[3]),
peakAlign=list(tolerance=5, units="ppm", level=c("local","global")[1], method=c("Enable","Disable")[1]),
normalize=list(method=c("Disable","rms","tic","reference")[1], mz=NULL)
)
imaging_identification(
#==============Choose the imzml raw data file(s) to process make sure the fasta file in the same folder
datafile=paste0(wd,datafile),
threshold=0.005,
ppm=5,
FDR_cutoff = 0.05,
#==============specify the digestion enzyme specificity
Digestion_site="trypsin",
#==============specify the range of missed Cleavages
missedCleavages=0:1,
#==============Set the target fasta file
Fastadatabase="uniprot-bovin.fasta",
#==============Set the possible adducts and fixed modifications
adducts=c("M+H"),
Modifications=list(fixed=NULL,fixmod_position=NULL,variable=NULL,varmod_position=NULL),
#==============The decoy mode: could be one of the "adducts", "elements" or "isotope"
Decoy_mode = "isotope",
use_previous_candidates=F,
output_candidatelist=T,
#==============The pre-processing param
preprocess=preprocess,
#==============Set the parameters for image segmentation
spectra_segments_per_file=4,
Segmentation="spatialKMeans",
Smooth_range=1,
Virtual_segmentation=FALSE,
Virtual_segmentation_rankfile=NULL,
#==============Set the Score method for hi-resolution isotopic pattern matching
score_method="SQRTP",
peptide_ID_filter=2,
#==============Summarise the protein and peptide features across the project the result can be found at the summary folder
Protein_feature_summary=TRUE,
Peptide_feature_summary=TRUE,
Region_feature_summary=TRUE,
#==============The parameters for Cluster imaging. Specify the annotations of interest, the program will perform a case-insensitive search on the result file, extract the protein(s) of interest and plot them in the cluster imaging mode
plot_cluster_image_grid=FALSE,
ClusterID_colname="Protein",
componentID_colname="Peptide",
Protein_desc_of_interest=c("Crystallin","Actin"),
Rotate_IMG=NULL,
)
```
# Project folder and result structure
In the above function, you have performed proteomics analysis on the
sample data file. It is a tryptic Bovin lens MALDI-imaging file which is
acquired on an FT-ICR MS. The function will take the selected data
files' root directory as the project folder. In this example, the
project folder will be:
```{r locate the project folder, message=FALSE, warning=FALSE}
library(HiTMaP)
wd=paste0("D:\\GITHUB LFS\\HiTMaP-Data\\inst","/data/Bovinlens_Trypsin_FT/")
datafile=c("Bovin_lens")
```
After the whole identification process, you will get two sub-folders
within the project folder:
```{r The sub-folder in the project folder}
list.dirs(wd, recursive=FALSE)
```
1. The one which has an identical name to an input data file contains
the identification result of that input:
- the protein and peptides list of each segmentation region
- the PMF matching plot of each segmentation
- the image that indicates segmentations' boundary (applies to
either K-mean segmentation (powered by Cardinal) or manually
defined segmentation)
- folders of each region contains the detailed identification
process, FDR plots and isotopic pattern matching plots
2. "Summary folder" contains:
- the identification summary of protein and peptides across all
the data
- the candidate list of all possible proteins and peptides (if
*use_previous_candidates* is set as **TRUE**)
- the Cluster imaging files of the protein of interest
- the database stats result for resolution-based candidates
binning (optional)
# Identification result visulasation and interpretation
To plot the MALDI-image peptide and protein images, use the following
functions:
To check the segmentation result over the sample, you need to navigate
to each data file ID folder and find the "spatialKMeans_image_plot.png"
(if you are using the spatial K-means method for segmentation.)
```{r VisulazeKmean}
library(magick)
p<-image_read(paste0(wd,datafile," ID/spatialKMeans_image_plot.png"))
print(p)
```
The pixels in image data now has been categorized into four regions
according to the initial setting of segmentation
(*spectra_segments_per_file=5*). The rainbow shaped bovine lens
segmentation image (on the left panel) shows a unique statistical
classification based on the mz features of each region (on the right
panel).
The mouse brain example segmentation result (spatialKmeans n=9) shown as
below:
![](Resource/spatialKMeans_image_plot_9_segs_mb.png)
For further investigation of the segmentation process, you may find a
PCA images set in the **"Datafile ID"** folder. THe PCA images are good
summary of features and potential region of interests within a data
file. The combination of these PCs of interest will guide you to the
insightful tissue structure profile.
![](Resource/PCA_image_MB.png)
The identification will take place on the **mean spectra** of each
region. To check the peptide mass fingerprint (PMF) matching quality,
you could locate the PMF spectrum matching plot of each individual
region.
```{r}
library(magick)
p_pmf<-image_read(paste0(wd,datafile," ID/Bovin_lens 3PMF spectrum match.png"))
print(p_pmf)
```
A list of the peptides and proteins annotated within each region has
also been created for manual exploration of the results.
```{r}
peptide_pmf_result<-read.csv(paste0(wd,datafile," ID/Peptide_segment_PMF_RESULT_3.csv"))
head(peptide_pmf_result)
```
```{r}
protein_pmf_result<-read.csv(paste0(wd,datafile," ID/Protein_segment_PMF_RESULT_3.csv"))
head(protein_pmf_result)
```
# Scoring system for protein and peptide
**Score** in peptide result table shows the isotopic pattern matching
score of the peptide (Pepscore). In Protein result table, it shows the
protein score (Proscore). The 'Pepscore' consist of two parts:
Intensity_Score and Mass_error_Score:
- Intensity_Score indicates how well a putative isotopic pattern can
be matched to the observed spectrum.The default scoring method is
SQRTP. It combines the 'square root mean' differences between
observed and theoretical peaks and observed proportion of the
isotopic peaks above a certain relative intensity threshold.
- Mass_error_Score indicates the summary of mass error (in *ppm*) for
every detected isotopic peak. In order to integrate the
Mass_error_Score in to scoring system, the mean ppm error has been
normalized by ppm tolerance, and supplied to the probability normal
distributions (*pnorm* function for R). The resulting value
(quantiles of the given probability density) is deducted by 0.5 and
converted into an absolute value.
<img src="https://render.githubusercontent.com/render/math?math=%24Intensity%5C_Score%3D%5Clog(PeakCount_%7BObserved%7D%2FPeakCount_%7BTheoritical%7D)-%5Clog(%5Csqrt%7B%5Cfrac%7B%5Csum_%7Bx%20%3D%201%7D%5E%7Bn%7D%20(Theoritical%5C_intensity_x-Observed%5C_intensity_x)%5E2%7D%7B%5Csum_%7Bx%20%3D%201%7D%5E%7Bn%7D%20(Theoritical%5C_intensity_x)%5E2(Observed%5C_intensity_x)%5E2%7D%7D%24"/>
<img src="https://render.githubusercontent.com/render/math?math=%24Mass%5C_error%5C_Score%3D%7C(p%5C_norm%5C_dist(%5Cfrac%7Bmean%5C_ppm%5C_error%7D%7Bppm%5C_tolerance%7D)-0.5)%7C%24"/>
<img src="https://render.githubusercontent.com/render/math?math=%24Pepscore%3DIntensity%5C_Score-Mass%5C_error%5C_Score%24"/>
**Proscore** in the protein result table shows the overall estimation of
the protein identification Accuracy.
<img src="https://render.githubusercontent.com/render/math?math=%24Proscore%3D%5Cfrac%7B%5Csum_%7Bx%20%3D%201%7D%5E%7Bn%7D(Pepscore_x*log(Intensity_x))%7D%7Bmean(log(Intensity))%7D*Protein%5C_coverage*Normalized%5C_intensity%5C_factor%24"/>
A *Peptide_region_file.csv* has also been created to summarise all the
IDs in this data file:
```{r}
Identification_summary_table<-read.csv(paste0(wd,datafile," ID/Peptide_region_file.csv"))
head(Identification_summary_table)
```
The details of protein/peptide identification process has been save to
the folder named by the segmentation:
```{r The sub-folder in the result folder}
list.dirs(paste0(wd,datafile," ID/"), recursive=FALSE)
```
In the identification details folder, you will find a series of FDR file
and plots to demonstrate the FDR model and score cutoff threshold:
```{r The file in the details sub-folder}
dir(paste0(wd,datafile," ID/1/"), recursive=FALSE)
```
In this folder, you will find the FDR plots for protein and peptide
annotation. The software will take the proscore and its FDR model to
trim the final identification results. The
*unique_peptide_ranking_vs_mz_feature.png* is a plot that could tell you
the number of peptide candidates that have been matched to the mz
features in the first round run. You can also access the peptide
spectrum match (first MS dimension) data via the "/ppm" subfolder.
```{r FDR plot, message=FALSE}
library(magick)
p_FDR_peptide<-image_read(paste0(wd,datafile," ID/3/FDR.png"))
p_FDR_protein<-image_read(paste0(wd,datafile," ID/3/protein_FDR.png"))
p_FDR_peptide_his<-image_read(paste0(wd,datafile," ID/3/Peptide_Score_histogram_target-decoy.png"))
p_FDR_protein_his<-image_read(paste0(wd,datafile," ID/3/PROTEIN_Score_histogram.png"))
p_combined<-image_append(c(p_FDR_peptide,p_FDR_peptide_his,p_FDR_protein,p_FDR_protein_his))
print(p_combined)
```
You will also find a *Matching_Score_vs_mz* plot for further
investigation on peptide matching quality.
```{r p_Matching_Score_vs_mz plot, message=FALSE}
library(magick)
#plot Matching_Score_vs_mz
p_Matching_Score_vs_mz<-image_read(paste0(wd,datafile," ID/3/Matching_Score_vs_mz_target-decoy.png"))
print(p_Matching_Score_vs_mz)
```
# Identification summary and cluster imaging
In the project summary folder, you will find four files and a
sub-folder:
```{r dir summary folder}
wd_sum=paste(wd,"/Summary folder", sep="")
dir(wd_sum)
```
"candidatelist.csv" and "protein_index.csv" contains the candidates used
for this analysis. They are output after the candidate processing while
*output_candidatelist* set as TRUE, and can be used repeatedly while
*use_previous_candidates* set as TRUE.
We have implemented a functionality to perform additional statistical
analysis around the number of enzymatically generated peptides derived
from a given proteome database. If the user sets the argument
'Database_stats' to TRUE in the main workflow, the function will be
called. Briefly, the function will list all of the m/z's of a unique
formulae from the peptide candidate pool within a given m/z range. The
m/z's will then be binned using three tolerance window: 1 ppm, 2 ppm and
5 ppm. A plot showing the number of unique formulae vs. m/z bins will be
generated and exported to the summary folder (DB_stats_mz_bin).
![Proteome database stats](Resource/DB_stats_bin_mz_ppm.png)
"Peptide_Summary.csv" and "Protein_Summary.csv" contains the table of
the project identification summary. You could set the
*plot_cluster_image_grid* as TRUE to enable the cluster imaging
function. Please be noted that you could indicate *Rotate_IMG* with a
CSV file path that indicates the rotation degree of image files.
**Note**: 90°, 180° and 270° are recommended for image rotation. You may
find an example CSV file in the *expdata/MouseBrain_Trypsin_FT/file_rotationbk.csv*.
```{r summary table, message=FALSE, warning=FALSE}
library(dplyr)
Protein_desc_of_interest<-c("Crystallin","Actin")
Protein_Summary_tb<-read.csv(paste(wd,"/Summary folder","/Protein_Summary.csv", sep=""),stringsAsFactors = F)
```
Finally, you are able visualize the annotated proteins and their
associated peptide distributions via the cluster image rendering
function.
<img src="Resource/Bovin_lens.png" title="Bovin_lens" alt="Bovin lens cluster image rendering" width="100%"/>
vimentin:
```{r C, eval=FALSE, cache=FALSE, include=FALSE, paged.print=TRUE}
library(magick)
p_cluster4<-image_read(paste0("~/expdata/Bovinlens_Trypsin_FT/Summary folder/cluster Ion images/unique/452_cluster_imaging.png"))
print(p_cluster4)
```
β-crystallin:
```{r , eval=FALSE, echo=FALSE, cache=FALSE, paged.print=TRUE}
p_cluster1<-image_read(paste0("~/expdata/Bovinlens_Trypsin_FT/Summary folder/cluster Ion images/unique/791_cluster_imaging.png"))
print(p_cluster1)
```
α-crystallin:
```{r , eval=FALSE, echo=FALSE, cache=FALSE, paged.print=TRUE}
p_cluster3<-image_read(paste0("~/expdata/Bovinlens_Trypsin_FT/Summary folder/cluster Ion images/unique/5479_cluster_imaging.png"))
print(p_cluster3)
```
![](Resource/Mouse_brain.png)
Secernin 1
```{r , eval=FALSE, echo=FALSE, cache=FALSE, paged.print=TRUE}
p_cluster3<-image_read(paste0("~/expdata/MouseBrain_Trypsin_FT/Summary folder/cluster Ion images/unique/2823_cluster_imaging.png"))
print(p_cluster3)
```
CX6A1 cytochrome coxidase subunit 6A1
```{r , eval=FALSE, echo=FALSE, cache=FALSE, paged.print=TRUE}
p_cluster3<-image_read(paste0("~/expdata/MouseBrain_Trypsin_FT/Summary folder/cluster Ion images/unique/16305_cluster_imaging.png"))
print(p_cluster3)
```
Myelin basic protein
```{r , eval=FALSE, echo=FALSE, cache=FALSE, paged.print=TRUE}
p_cluster3<-image_read(paste0("~/expdata/MouseBrain_Trypsin_FT org rds/Summary folder/cluster Ion images/unique/9585_cluster_imaging.png"))
print(p_cluster3)
```
# Pixel level Proteomics data export
```{r eval=FALSE, include=FALSE}
export_pixel_level_data(Protein_peptide_file=,
IMS_data_file=list(),
tolerance=,
)
```
# Details of parameter setting
## Modification
You can choose one or a list of modifications from the unimod
modification list. *Peptide_modification* function is used to
load/rebuild the modification database into the global enviornment of R.
It will be called automatically in the identification work flow. you can
use the *code_name* or *record_id* to refer the modification (see
example data "peptide calibrants" to find more details). The pipeline
will select the *non-hidden* modifications.
```{r warning=FALSE}
HiTMaP:::Peptide_modification(retrive_ID=NULL,update_unimod=F)
modification_list<-merge(unimod.df$modifications,unimod.df$specificity,by.x=c("record_id"),by.y=c("mod_key"),all.x=T)
head(modification_list['&'(modification_list$code_name=="Phospho",modification_list$hidden!=1),c("code_name","record_id","composition","mono_mass","position_key","one_letter")])
head(modification_list['&'(modification_list$code_name=="Amide",modification_list$hidden!=1),c("code_name","record_id","composition","mono_mass","position_key","one_letter")])
head(modification_list['&'(stringr::str_detect(modification_list$code_name,"Ca"),modification_list$hidden!=1),c("code_name","record_id","composition","mono_mass","position_key","one_letter")])
```
If a modification occurs on a particular site, you will also need to
specify the position of a modifications.
- *Anywhere*, side chain of possible amino acids
- *Any N-term*, any N-term of enzymatic peptide
- *Protein N-term*, any N-term of protein
```{r}
unimod.df[["positions"]]
```
## Amino acid substitution
You can set the *Substitute_AA* to make the uncommon amino acid
available to the workflow:
*Substitute_AA=list(AA=c("X"),AA_new_formula=c("C5H5NO2"),Formula_with_water=c(FALSE))*
- AA: the single letter amino acid to be replaced
- AA_new_formula: the new formula for the amino acid
- Formula_with_water: Set *TRUE* to indicate the formula represents
the intact amino acid, *FALSE* to indicate that the formula already
lost one H2O molecule and can be considered as AA backbone.
## Digestion site and enzyme
The *Digestion_site* allows you to specify a list of pre-defined enzyme
and customized digestion rules in regular expression format. You can
either use the enzyme name, customized cleavage rule or combination of
them to get the enzymatics peptides list.
```{r message=FALSE, warning=FALSE, include=FALSE}
grid.ftable <- function(d, padding = unit(2, "mm"), ...) {
library(gridExtra)
library(grid)
nc <- ncol(d)
nr <- nrow(d)
# character table with added row and column names
extended_matrix <- cbind(c("", rownames(d)),
rbind(colnames(d),
as.matrix(d)))
# string width and height
w <- apply(extended_matrix, 2, strwidth, "inch")
h <- apply(extended_matrix, 2, strheight, "inch")
widths <- apply(w, 2, max)
heights <- apply(h, 1, max)
padding <- convertUnit(padding, unitTo = "in", valueOnly = TRUE)
x <- cumsum(widths + padding) - 0.5 * padding
y <- cumsum(heights + padding) - padding
rg <- rectGrob(x = unit(x - widths/2, "in"),
y = unit(1, "npc") - unit(rep(y, each = nc + 1), "in"),
width = unit(widths + padding, "in"),
height = unit(heights + padding, "in"))
tg <- textGrob(c(t(extended_matrix)), x = unit(x - widths/2, "in"),
y = unit(1, "npc") - unit(rep(y, each = nc + 1), "in"),
just = "center")
g <- gTree(children = gList(rg, tg), ...,
x = x, y = y, widths = widths, heights = heights)
grid.draw(g)
invisible(g)
}
```
```{r echo=TRUE, message=F, warning=FALSE, paged.print=T, fig.height=8,fig.width=8.35,dpi=300}
Cleavage_rules<-Cleavage_rules_fun()
Cleavage_df<-data.frame(Enzyme=names(Cleavage_rules),Cleavage_rules=unname(Cleavage_rules),stringsAsFactors = F)
library(gridExtra)
grid.ftable(Cleavage_df, gp = gpar(fontsize=9,fill = rep(c("grey90", "grey95"))))
```
## Imaging-MS data preprocessing
**preprocess$mz_bin_list** is an argument for costumized peak-picking and mz bining purpose. If it is not NULL, the workflow will bypass signal smooth, noise reduction, and peakpicking steps. User need to give a numeric vector as the mz input to this argument. The workflow will first filter the vector with the given ppm tolerance to ensure there's no overlapped mz bins (mz +/- ppm tolerance). Then, a m/z binning procedure will be conducted to the image data to produce a peak-picked dataset (the peak bin width will be the ppm tolerance).
If user uses a processed IMS data that contains the centroid feature value (e.g. exported from scils lab with feature list reduced data). User will still be safe to use this mz_bin_list in order to mount the centroid data properly. In this case, the ppm tolerance will only applied to the following annotation procedure.
**normalize=list(method=c("Disable","rms","tic","reference")[1],mz=1)** the current IMS normalization is done on pixel-to-pixel level, which will affect the feature distribution in some tissue. We use "Disable" in the example dataset to minimize the required RAM space and working time. The step may result in a big RAM usage on some IMS data. If the error message mentioned a "vector allocation" issue, Please consider to disable the normalization.
# Example workflow command
Below is a list of commands including the parameters for the example
data sets.
## Peptide calibrant
```{r eval=FALSE, include=T}
#peptide calibrant
library(HiTMaP)
datafile=c("Peptide_calibrants_FT/trypsin_non-decell_w.calibrant_FTICR")
wd="~/expdata/"
# Calibrants dataset analysis with modification
imaging_identification(datafile=paste0(wd,datafile),
Digestion_site="trypsin",
Fastadatabase="uniprot_cali.fasta",
output_candidatelist=T,
plot_matching_score=T,
spectra_segments_per_file=1,
use_previous_candidates=F,
peptide_ID_filter=1,ppm=5,missedCleavages=0:5,
Modifications=list(fixed=NULL,fixmod_position=NULL,variable=c("Amide"),varmod_position=c(6)),
FDR_cutoff=0.1,
Substitute_AA=list(AA=c("X"),AA_new_formula=c("C5H5NO2"),Formula_with_water=c(FALSE)))
# Calibrants dataset analysis with no modification
imaging_identification(datafile=paste0(wd,datafile),
Digestion_site="trypsin",
Fastadatabase="uniprot_cali.fasta",
output_candidatelist=T,
plot_matching_score=T,
spectra_segments_per_file=1,
use_previous_candidates=T,
peptide_ID_filter=1,ppm=5,missedCleavages=0:5,
FDR_cutoff=0.1)
library(HiTMaP)
datafile=c("Peptide_calibrants_FT/trypsin_non-decell_w.calibrant_FTICR")
wd="~/expdata/"
# Calibrants dataset analysis with modification
imaging_identification(datafile=paste0(wd,datafile),
Digestion_site="trypsin",
Fastadatabase="calibrants.fasta",
output_candidatelist=T,
plot_matching_score=T,
spectra_segments_per_file=1,
use_previous_candidates=F,
peptide_ID_filter=1,ppm=5,missedCleavages=0:5,
Modifications=list(fixed=NULL,fixmod_position=NULL,variable=c("Amide"),varmod_position=c(6)),
FDR_cutoff=0.1,
Substitute_AA=list(AA=c("X"),AA_new_formula=c("C5H5NO2"),Formula_with_water=c(FALSE)),Thread = 1)
```
## Bovine lens
```{r eval=FALSE, include=T}
library(HiTMaP)
datafile=c("Bovinlens_Trypsin_FT/Bovin_lens.imzML")
wd="~/expdata/"
# Data pre-processing and proteomics annotation
library(HiTMaP)
imaging_identification(datafile=paste0(wd,datafile),Digestion_site="trypsin",
Fastadatabase="uniprot-bovin.fasta",output_candidatelist=T,
preprocess=list(force_preprocess=TRUE,
use_preprocessRDS=TRUE,
smoothSignal=list(method="Disable"),
reduceBaseline=list(method="Disable"),
peakPick=list(method="adaptive"),
peakAlign=list(tolerance=5, units="ppm"),
normalize=list(method=c("Disable","rms","tic","reference")[1],mz=1)),
spectra_segments_per_file=4,use_previous_candidates=F,ppm=5,FDR_cutoff = 0.05,IMS_analysis=T,
Rotate_IMG="file_rotationbk.csv",plot_cluster_image_grid=F)
datafile=c("Bovinlens_Trypsin_FT/Bovin_lens.imzML")
wd="~/expdata/"
library(HiTMaP)
imaging_identification(datafile=paste0(wd,datafile),Digestion_site="trypsin",
Fastadatabase="uniprot-bovin.fasta",output_candidatelist=T,use_previous_candidates=T,
preprocess=list(force_preprocess=F,
use_preprocessRDS=TRUE,
smoothSignal=list(method="Disable"),
reduceBaseline=list(method="Disable"),
peakPick=list(method="Default"),
peakAlign=list(tolerance=5, units="ppm"),
normalize=list(method=c("Disable","rms","tic","reference")[1],mz=1)),
spectra_segments_per_file=4,ppm=5,FDR_cutoff = 0.05,IMS_analysis=T,
Rotate_IMG="file_rotationbk.csv",plot_cluster_image_grid=F)
# Re-analysis and cluster image rendering
library(HiTMaP)
datafile=c("Bovinlens_Trypsin_FT/Bovin_lens.imzML")
wd="~/expdata/"
imaging_identification(datafile=paste0(wd,datafile),Digestion_site="trypsin",
Fastadatabase="uniprot-bovin.fasta",
use_previous_candidates=T,ppm=5,IMS_analysis=F,
plot_cluster_image_grid=T,
export_Header_table=T,
img_brightness=250,
plot_cluster_image_overwrite=T,
cluster_rds_path = "/Bovin_lens ID/preprocessed_imdata.RDS",pixel_size_um = 150,
Plot_score_abs_cutoff=-0.1,
remove_score_outlier=T,
Protein_desc_of_interest=c("Crystallin","Phakinin","Filensin","Actin","Vimentin","Cortactin","Visinin","Arpin","Tropomyosin","Myosin Light Chain 3","Kinesin Family Member 14","Dynein Regulatory Complex","Ankyrin Repeat Domain 45"))
# Re-analysis and cluster image rendering using color scale
library(HiTMaP)
datafile=c("Bovinlens_Trypsin_FT/Bovin_lens.imzML")
wd="~/expdata/"
imaging_identification(datafile=paste0(wd,datafile),Digestion_site="trypsin",
Fastadatabase="uniprot-bovin.fasta",
use_previous_candidates=T,ppm=5,IMS_analysis=F,
plot_cluster_image_grid=T,
export_Header_table=T,
img_brightness=250,
plot_cluster_image_overwrite=T,
cluster_rds_path = "/Bovin_lens ID/preprocessed_imdata.RDS",pixel_size_um = 150,
Plot_score_abs_cutoff=-0.1,
remove_score_outlier=T,cluster_color_scale="fleximaging",
Protein_desc_of_interest=c("Crystallin","Phakinin","Filensin","Actin","Vimentin","Cortactin","Visinin","Arpin","Tropomyosin","Myosin Light Chain 3","Kinesin Family Member 14","Dynein Regulatory Complex","Ankyrin Repeat Domain 45"))
```
## Mouse brain
```{r eval=FALSE, include=T}
library(HiTMaP)
datafile=c("MouseBrain_Trypsin_FT/Mouse_brain.imzML")
wd="~/expdata/"
preprocess = list(force_preprocess=TRUE,
use_preprocessRDS=FALSE,
smoothSignal=list(method = c("Disable", "gaussian", "sgolay", "ma")[1]),
reduceBaseline=list(method = c("Disable", "locmin", "median")[1]),
peakPick=list(method=c("diff", "sd", "mad", "quantile", "filter", "cwt")[3]),
peakAlign=list(tolerance=5, units="ppm", level=c("local","global")[1], method=c("Enable","Disable")[1]),
normalize=list(method=c("Disable","rms","tic","reference")[1], mz=NULL)
)
# Data pre-processing and proteomics annotation
library(HiTMaP)
imaging_identification(datafile=paste0(wd,datafile),Digestion_site="trypsin",
Fastadatabase="uniprot_mouse_20210107.fasta",output_candidatelist=T,
preprocess=preprocess,
spectra_segments_per_file=9,use_previous_candidates=F,ppm=10,FDR_cutoff = 0.05,IMS_analysis=T,
Rotate_IMG="file_rotationbk.csv",
mzrange = c(500,4000),plot_cluster_image_grid=F)
# Re-analysis and cluster image rendering
library(HiTMaP)
datafile=c("MouseBrain_Trypsin_FT/Mouse_brain.imzML")
wd="~/expdata/"
imaging_identification(datafile=paste0(wd,datafile),Digestion_site="trypsin",
Fastadatabase="uniprot_mouse_20210107.fasta",
preprocess=list(force_preprocess=FALSE),
spectra_segments_per_file=9,use_previous_candidates=T,ppm=10,FDR_cutoff = 0.05,IMS_analysis=F,
mzrange = c(500,4000),plot_cluster_image_grid=T,
img_brightness=250, plot_cluster_image_overwrite=T,
cluster_rds_path = "/Mouse_brain ID/preprocessed_imdata.RDS",
pixel_size_um = 50,
Plot_score_abs_cutoff=-0.1,
remove_score_outlier=T,
Protein_desc_of_interest=c("Secernin","GN=MBP","Cytochrome"))
library(HiTMaP)
datafile=c("MouseBrain_Trypsin_FT_200brit_man_seg/Mouse_brain.imzML")
wd="~/expdata/"
imaging_identification(datafile=paste0(wd,datafile),Digestion_site="trypsin",
Fastadatabase="uniprot_mouse_20210107.fasta",
preprocess=list(force_preprocess=FALSE),
spectra_segments_per_file=9,use_previous_candidates=T,ppm=10,FDR_cutoff = 0.05,IMS_analysis=F,
mzrange = c(500,4000),plot_cluster_image_grid=T,
img_brightness=250, plot_cluster_image_overwrite=T,
cluster_rds_path = "/Mouse_brain ID/preprocessed_imdata.RDS",
pixel_size_um = 50,
Plot_score_abs_cutoff=-0.1,
remove_score_outlier=T,
Protein_desc_of_interest=c("GTR9"))
```
```{r eval=FALSE, include=FALSE}
wd=paste0(file.path(path.package(package="HiTMaP")),"/data/")
setwd(wd)
#Navigate to the corresponding example data folder ad select the file(s) for a MSI annotation
#Bovin lens FTICR
#Identifiction
imaging_identification(Digestion_site="trypsin",Fastadatabase="uniprot-Bovin.fasta",output_candidatelist=T,spectra_segments_per_file=4,use_previous_candidates=F,peptide_ID_filter=3,threshold = 0.005)
#Cluster image plotting
imaging_identification(Digestion_site="trypsin",Fastadatabase="uniprot-Bovin.fasta",output_candidatelist=T,spectra_segments_per_file=4,use_previous_candidates=T,peptide_ID_filter=3,threshold = 0.005,FDR_cutoff=0.05,IMS_analysis=F,plot_cluster_image_grid=T,Protein_desc_of_interest=c("crystallin","ACTIN","Vimentin","Filensin","Phakinin"))
#Ultraflex data
imaging_identification(Digestion_site="trypsin",Fastadatabase="uniprot-bovin.fasta",output_candidatelist=T,spectra_segments_per_file=4,use_previous_candidates=F,ppm=25)
#mouse brain data
library(HiTMaP)
datafile=c("MouseBrain_Trypsin_FT/Mouse_brain.imzML")
setwd("C:/Users/admgguo484/Documents/")
wd="~/expdata/"
library(HiTMaP)
imaging_identification(datafile=paste0(wd,datafile),Digestion_site="trypsin",Fastadatabase="uniprot_mouse_20210107.fasta",output_candidatelist=T,spectra_segments_per_file=4,use_previous_candidates=F,ppm=5,FDR_cutoff = 0.1,IMS_analysis=T,plot_cluster_image_grid=T,Protein_desc_of_interest=c("Histone ","GN=MBP","ACTIN"),Rotate_IMG="file_rotationbk.csv")
library(HiTMaP)
datafile=c("MouseBrain_Trypsin_FT/Mouse_brain.imzML")
wd="~/expdata/"
imaging_identification(datafile=paste0(wd,datafile),Digestion_site="trypsin",Fastadatabase="uniprot_mouse_20210107.fasta",output_candidatelist=F,spectra_segments_per_file=6,use_previous_candidates=T,ppm=5,FDR_cutoff = 0.1,IMS_analysis=T,plot_cluster_image_grid=F,Protein_desc_of_interest=c("Histone ","GN=MBP","ACTIN"),Rotate_IMG="file_rotationbk.csv")
imaging_identification(datafile=paste0(wd,datafile),Digestion_site="trypsin",Fastadatabase="uniprot_mouse_20210107.fasta",output_candidatelist=F,spectra_segments_per_file=8,use_previous_candidates=T,ppm=5,FDR_cutoff = 0.1,IMS_analysis=T,plot_cluster_image_grid=F,Protein_desc_of_interest=c("Histone ","GN=MBP","ACTIN"),Rotate_IMG="file_rotationbk.csv",PMFsearch = F)
imaging_identification(datafile=paste0(wd,datafile),Digestion_site="trypsin",Fastadatabase="uniprot_mouse_20210107.fasta",output_candidatelist=F,spectra_segments_per_file=10,use_previous_candidates=T,ppm=5,FDR_cutoff = 0.1,IMS_analysis=T,plot_cluster_image_grid=F,Protein_desc_of_interest=c("Histone ","GN=MBP","ACTIN"),Rotate_IMG="file_rotationbk.csv",PMFsearch = F)
imaging_identification(datafile=paste0(wd,datafile),Digestion_site="trypsin",Fastadatabase="uniprot_mouse_20210107.fasta",output_candidatelist=F,spectra_segments_per_file=12,use_previous_candidates=T,ppm=5,FDR_cutoff = 0.1,IMS_analysis=T,plot_cluster_image_grid=F,Protein_desc_of_interest=c("Histone ","GN=MBP","ACTIN"),Rotate_IMG="file_rotationbk.csv",PMFsearch = F)
imaging_identification(datafile=paste0(wd,datafile),Digestion_site="trypsin",Fastadatabase="uniprot_mouse_20210107.fasta",output_candidatelist=F,spectra_segments_per_file=14,use_previous_candidates=T,ppm=5,FDR_cutoff = 0.1,IMS_analysis=T,plot_cluster_image_grid=F,Protein_desc_of_interest=c("Histone ","GN=MBP","ACTIN"),Rotate_IMG="file_rotationbk.csv",PMFsearch = F)
imaging_identification(datafile=paste0(wd,datafile),Digestion_site="trypsin",Fastadatabase="uniprot_mouse_20210107.fasta",output_candidatelist=F,spectra_segments_per_file=16,use_previous_candidates=T,ppm=5,FDR_cutoff = 0.1,IMS_analysis=T,plot_cluster_image_grid=F,Protein_desc_of_interest=c("Histone ","GN=MBP","ACTIN"),Rotate_IMG="file_rotationbk.csv",PMFsearch = F)
library(HiTMaP)
datafile=c("MouseBrain_Trypsin_FT/Mouse_brain.imzML")
wd="~/expdata/"
imaging_identification(datafile=paste0(wd,datafile),Digestion_site="trypsin",Fastadatabase="uniprot_mouse_20210107.fasta",output_candidatelist=F,spectra_segments_per_file=4,use_previous_candidates=T,ppm=5,FDR_cutoff = 0.1,IMS_analysis=T,plot_cluster_image_grid=T,Protein_desc_of_interest=c("Histone ","GN=MBP","ACTIN"),Rotate_IMG="file_rotationbk.csv",Segmentation = "none")
library(HiTMaP)
datafile=c("MouseBrain_Trypsin_FT/Mouse_brain.imzML")
wd="~/expdata/"
imaging_identification(datafile=paste0(wd,datafile),Digestion_site="trypsin",Fastadatabase="uniprot_mouse_20210107.fasta",output_candidatelist=F,spectra_segments_per_file=4,use_previous_candidates=T,ppm=5,FDR_cutoff = 0.1,Rotate_IMG="file_rotationbk.csv",Segmentation = "none",IMS_analysis=F,plot_cluster_image_grid=T,peptide_ID_filter = 2,export_Header_table=T, img_brightness=160, plot_cluster_image_overwrite=T)
library(HiTMaP)
datafile=c("MouseBrain_Trypsin_FT_200brit/Mouse_brain.imzML")
wd="~/expdata/"
imaging_identification(datafile=paste0(wd,datafile),Digestion_site="trypsin",Fastadatabase="uniprot_mouse_20210107.fasta",output_candidatelist=F,spectra_segments_per_file=4,use_previous_candidates=T,ppm=5,FDR_cutoff = 0.1,Rotate_IMG="file_rotationbk.csv",Segmentation = "none",IMS_analysis=F,plot_cluster_image_grid=T,peptide_ID_filter = 2,export_Header_table=T, img_brightness=250, plot_cluster_image_overwrite=T,cluster_rds_path = "preprocessed_imdata.RDS")
library(HiTMaP)