Mercurial > repos > galaxyp > msi_qualitycontrol
comparison msi_qualitycontrol.xml @ 15:2d69460669ae draft
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_qualitycontrol commit 620a469e20836b921b6c0147421c8a4268b66ebd
author | galaxyp |
---|---|
date | Wed, 15 Aug 2018 05:40:29 -0400 |
parents | 7c7c39b9ec4a |
children | ed23ae226cdc |
comparison
equal
deleted
inserted
replaced
14:7c7c39b9ec4a | 15:2d69460669ae |
---|---|
1 <tool id="mass_spectrometry_imaging_qc" name="MSI Qualitycontrol" version="1.10.0.5"> | 1 <tool id="mass_spectrometry_imaging_qc" name="MSI Qualitycontrol" version="1.10.0.6"> |
2 <description> | 2 <description> |
3 mass spectrometry imaging QC | 3 mass spectrometry imaging QC |
4 </description> | 4 </description> |
5 <requirements> | 5 <requirements> |
6 <requirement type="package" version="1.10.0">bioconductor-cardinal</requirement> | 6 <requirement type="package" version="1.10.0">bioconductor-cardinal</requirement> |
284 | 284 |
285 ## append list for optional tabular output with spectrum values | 285 ## append list for optional tabular output with spectrum values |
286 spectrum_list[[list_count]] = position_df | 286 spectrum_list[[list_count]] = position_df |
287 list_count = list_count+1 | 287 list_count = list_count+1 |
288 | 288 |
289 colnames(position_df)[3] = "Annotation" | 289 colnames(position_df)[3] = "annotation" |
290 combine_plot = ggplot(position_df, aes(x=x, y=y, fill=Annotation))+ | 290 |
291 print(position_df) | |
292 print(class(position_df\$x)) | |
293 print(class(position_df\$annotation)) | |
294 | |
295 combine_plot = ggplot(position_df, aes(x=x, y=y, fill=annotation))+ | |
291 geom_tile() + | 296 geom_tile() + |
292 coord_fixed()+ | 297 coord_fixed()+ |
293 ggtitle("Spatial orientation of combined data")+ | 298 ggtitle("Spatial orientation of pixel annotations")+ |
294 theme_bw()+ | 299 theme_bw()+ |
295 theme(plot.title = element_text(hjust = 0.5))+ | 300 theme(plot.title = element_text(hjust = 0.5))+ |
296 theme(text=element_text(family="ArialMT", face="bold", size=12))+ | 301 theme(text=element_text(family="ArialMT", face="bold", size=12))+ |
297 theme(legend.position="bottom",legend.direction="vertical")+ | 302 theme(legend.position="bottom",legend.direction="vertical")+ |
298 theme(legend.key.size = unit(0.2, "line"), legend.text = element_text(size = legend_size))+ | 303 theme(legend.key.size = unit(0.2, "line"), legend.text = element_text(size = legend_size))+ |
842 count=count+1 | 847 count=count+1 |
843 } | 848 } |
844 | 849 |
845 ######### 17) ppm difference input calibrant m/z and m/z with max intensity in given m/z range######### | 850 ######### 17) ppm difference input calibrant m/z and m/z with max intensity in given m/z range######### |
846 | 851 |
852 par(mfrow = c(1,1)) | |
847 ### plot the ppm difference calculated above: theor. m/z value to highest m/z value: | 853 ### plot the ppm difference calculated above: theor. m/z value to highest m/z value: |
848 | 854 |
849 calibrant_names = as.character(inputcalibrants[,2]) | 855 calibrant_names = as.character(inputcalibrants[,2]) |
850 diff_df = data.frame(differencevector, calibrant_names) | 856 diff_df = data.frame(differencevector, calibrant_names) |
851 | 857 |
852 if (sum(is.na(diff_df[,1])) == nrow(diff_df)){ | 858 if (sum(is.na(diff_df[,1])) == nrow(diff_df)){ |
853 plot(0,type='n',axes=FALSE,ann=FALSE) | 859 plot(0,type='n',axes=FALSE,ann=FALSE) |
854 title(main=paste("plot 17: no peaks in the chosen region, repeat with higher ppm range")) ## here klammer weggenommen... | 860 title(main=paste("plot 17: no peaks in the chosen region, repeat with higher ppm range")) |
855 }else{ | 861 }else{ |
856 | 862 |
857 diff_plot1=ggplot(data=diff_df, aes(x=calibrant_names, y=differencevector)) + geom_bar(stat="identity", fill = "darkgray") + theme_minimal() + | 863 diff_plot1=ggplot(data=diff_df, aes(x=calibrant_names, y=differencevector)) + geom_bar(stat="identity", fill = "darkgray") + theme_minimal() + |
858 labs(title="Average m/z error (max. average intensity vs. theor. calibrant m/z)", x="calibrants", y = "Average m/z error in ppm")+ | 864 labs(title="Average m/z error (max. average intensity vs. theor. calibrant m/z)", x="calibrants", y = "Average m/z error in ppm")+ |
859 theme(plot.title = element_text(hjust = 0.5, size=14))+theme(text=element_text(family="ArialMT", face="bold", size=16))+ | 865 theme(plot.title = element_text(hjust = 0.5, size=14))+theme(text=element_text(family="ArialMT", face="bold", size=14))+ |
860 geom_text(aes(label=differencevector), vjust=-0.3, size=5.5, col="blue") + | 866 geom_text(aes(label=differencevector), vjust=-0.3, size=5.5, col="blue") + |
861 theme(axis.text.x = element_text(angle = 90, hjust = 1, size=16)) | 867 theme(axis.text.x = element_text(angle = 90, hjust = 1, size=14)) |
862 | 868 |
863 print(diff_plot1) | 869 print(diff_plot1) |
864 } | 870 } |
865 | 871 |
866 ######### 18) ppm difference input calibrant m/z and closest m/z ########### | 872 ######### 18) ppm difference input calibrant m/z and closest m/z ########### |
871 calibrant_names = as.character(inputcalibrants[,2]) | 877 calibrant_names = as.character(inputcalibrants[,2]) |
872 diff_df = data.frame(differencevector2, calibrant_names) | 878 diff_df = data.frame(differencevector2, calibrant_names) |
873 | 879 |
874 diff_plot2=ggplot(data=diff_df, aes(x=calibrant_names, y=differencevector2)) + geom_bar(stat="identity", fill = "darkgray") + theme_minimal() + | 880 diff_plot2=ggplot(data=diff_df, aes(x=calibrant_names, y=differencevector2)) + geom_bar(stat="identity", fill = "darkgray") + theme_minimal() + |
875 labs(title="Average m/z error (closest measured m/z vs. theor. calibrant m/z)", x="calibrants", y = "Average m/z error in ppm")+ | 881 labs(title="Average m/z error (closest measured m/z vs. theor. calibrant m/z)", x="calibrants", y = "Average m/z error in ppm")+ |
876 theme(plot.title = element_text(hjust = 0.5, size=16))+theme(text=element_text(family="ArialMT", face="bold", size=16))+ | 882 theme(plot.title = element_text(hjust = 0.5, size=14))+theme(text=element_text(family="ArialMT", face="bold", size=14))+ |
877 geom_text(aes(label=differencevector2), vjust=-0.3, size=5.5, col="blue")+ | 883 geom_text(aes(label=differencevector2), vjust=-0.3, size=5.5, col="blue")+ |
878 theme(axis.text.x = element_text(angle = 90, hjust = 1, size=16)) | 884 theme(axis.text.x = element_text(angle = 90, hjust = 1, size=14)) |
879 | 885 |
880 print(diff_plot2) | 886 print(diff_plot2) |
881 | 887 |
882 #################### 19) ppm difference over pixels ##################### | 888 #################### 19) ppm difference over pixels ##################### |
883 | 889 |