# HG changeset patch # User galaxyp # Date 1536082924 14400 # Node ID ebca696cb0240086c27af629855fb202ff84176f # Parent d0e13a160a6c187b640f754e28d30abda9f40c73 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_spectra_plots commit e87eea03505ab1ba067e192bbbcdc6197dc4b42e diff -r d0e13a160a6c -r ebca696cb024 msi_spectra_plots.xml --- a/msi_spectra_plots.xml Wed Aug 22 13:44:57 2018 -0400 +++ b/msi_spectra_plots.xml Tue Sep 04 13:42:04 2018 -0400 @@ -1,4 +1,4 @@ - + mass spectrometry imaging mass spectra plots @@ -120,7 +120,7 @@ "Range of intensities", "Median of intensities", "Intensities > 0", - "Number of zero TICs", + "Number of empty spectra", "Preprocessing", "Normalization", "Smoothing", @@ -265,19 +265,26 @@ legend_size = 6 } - position_df = cbind(coord(msidata)[,1:2], msidata\$annotation) + position_df = cbind(coord(msidata)[,1:2], as.factor(msidata\$annotation)) colnames(position_df)[3] = "sample_name" combine_plot = ggplot(position_df, aes(x=x, y=y, fill=sample_name))+ - geom_tile() + + geom_tile(height = 1, width=1)+ coord_fixed()+ ggtitle("Spatial orientation of pixel annotations")+ theme_bw()+ theme(plot.title = element_text(hjust = 0.5))+ theme(text=element_text(family="ArialMT", face="bold", size=12))+ theme(legend.position="bottom",legend.direction="vertical")+ - theme(legend.key.size = unit(0.2, "line"), legend.text = element_text(size = legend_size))+ - guides(fill=guide_legend(ncol=5,byrow=TRUE)) + theme(legend.key.size = unit(0.2, "line"), legend.text = element_text(size = 6))+ + guides(fill=guide_legend(ncol=4,byrow=TRUE)) + + coord_labels = aggregate(cbind(x,y)~sample_name, data=position_df, mean, na.rm=TRUE, na.action="na.pass") + coord_labels\$file_number = 1:length(levels(position_df\$sample_name)) + + for(file_count in 1:nrow(coord_labels)) + {combine_plot = combine_plot + annotate("text",x=coord_labels[file_count,"x"], + y=coord_labels[file_count,"y"],label=toString(coord_labels[file_count,4]))} print(combine_plot) diff -r d0e13a160a6c -r ebca696cb024 test-data/Plot_analyze75.pdf Binary file test-data/Plot_analyze75.pdf has changed diff -r d0e13a160a6c -r ebca696cb024 test-data/Plot_analyze75_allpixels.pdf Binary file test-data/Plot_analyze75_allpixels.pdf has changed diff -r d0e13a160a6c -r ebca696cb024 test-data/Plot_empty_spectra.pdf Binary file test-data/Plot_empty_spectra.pdf has changed diff -r d0e13a160a6c -r ebca696cb024 test-data/Plot_imzml.pdf Binary file test-data/Plot_imzml.pdf has changed diff -r d0e13a160a6c -r ebca696cb024 test-data/Plot_rdata.pdf Binary file test-data/Plot_rdata.pdf has changed