Mercurial > repos > galaxyp > cardinal_classification
changeset 9:24c000517173 draft
"planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 6e8b69ee3aff3c93f745a5de11cc9169130f2e5e"
line wrap: on
line diff
--- a/classification.xml Wed May 13 14:00:58 2020 -0400 +++ b/classification.xml Thu Sep 24 11:34:50 2020 +0000 @@ -1,11 +1,11 @@ -<tool id="cardinal_classification" name="MSI classification" version="@VERSION@.1"> +<tool id="cardinal_classification" name="MSI classification" version="@VERSION@.0"> <description>spatial classification of mass spectrometry imaging data</description> <macros> <import>macros.xml</import> </macros> <expand macro="requirements"> <requirement type="package" version="2.3">r-gridextra</requirement> - <requirement type="package" version="3.2.1">r-ggplot2</requirement> + <requirement type="package" version="3.3.2">r-ggplot2</requirement> </expand> <command detect_errors="exit_code"> <![CDATA[ @@ -618,7 +618,23 @@ coord_labels = aggregate(cbind(x,y)~predicted_classes, data=prediction_df, mean, na.rm=TRUE, na.action="na.pass") coord_labels\$file_number = gsub( "_.*$", "", coord_labels\$predicted_classes) print(prediction_plot) + + + ## image with right and wrong classes: + comparison_df = cbind(prediction_df, y_vector) + comparison_df\$correct<- ifelse(comparison_df\$predicted_classes==comparison_df\$y_vector, T, F) + correctness_plot = ggplot(comparison_df, aes(x=x, y=y, fill=correct))+ + geom_tile() + + coord_fixed()+ + ggtitle("Correctness of classification")+ + theme_bw()+ + theme(text=element_text(family="ArialMT", face="bold", size=15))+ + theme(legend.position="bottom",legend.direction="vertical")+ + guides(fill=guide_legend(ncol=2,byrow=TRUE)) + ## coord_labels = aggregate(cbind(x,y)~correct, data=comparison_df, mean, na.rm=TRUE, na.action="na.pass") + ##coord_labels\$file_number = gsub( "_.*$", "", coord_labels\$predicted_classes) + print(correctness_plot) ## optional output as .RData #if $output_rdata: @@ -690,6 +706,25 @@ coord_labels = aggregate(cbind(x,y)~predicted_classes, data=prediction_df, mean, na.rm=TRUE, na.action="na.pass") coord_labels\$file_number = gsub( "_.*$", "", coord_labels\$predicted_classes) print(prediction_plot) + + ## image with right and wrong classes: + + comparison_df = cbind(prediction_df, new_y_vector) + comparison_df\$correct<- as.factor(ifelse(comparison_df\$predicted_classes==comparison_df\$new_y_vector, T, F)) + + correctness_plot = ggplot(comparison_df, aes(x=x, y=y, fill=correct))+ + geom_tile()+ + scale_fill_manual(values = c("TRUE" = "orange","FALSE" = "darkblue"))+ + coord_fixed()+ + ggtitle("Correctness of classification")+ + theme_bw()+ + theme(text=element_text(family="ArialMT", face="bold", size=15))+ + theme(legend.position="bottom",legend.direction="vertical")+ + guides(fill=guide_legend(ncol=2,byrow=TRUE)) + ## coord_labels = aggregate(cbind(x,y)~correct, data=comparison_df, mean, na.rm=TRUE, na.action="na.pass") + ##coord_labels\$file_number = gsub( "_.*$", "", coord_labels\$predicted_classes) + print(correctness_plot) + ## Summary table prediction summary_table = summary(prediction)\$accuracy[[names(prediction@resultData)]]
--- a/macros.xml Wed May 13 14:00:58 2020 -0400 +++ b/macros.xml Thu Sep 24 11:34:50 2020 +0000 @@ -1,10 +1,10 @@ <macros> - <token name="@VERSION@">2.4.0</token> + <token name="@VERSION@">2.6.0</token> <xml name="requirements"> <requirements> <requirement type="package" version="@VERSION@">bioconductor-cardinal</requirement> - <requirement type="package" version="3.6.1">r-base</requirement> + <!--requirement type="package" version="3.6.1">r-base</requirement--> <yield/> </requirements> </xml> @@ -175,7 +175,7 @@ - imzml file (upload imzml and ibd file via the "composite" function) `Introduction to the imzml format <https://ms-imaging.org/wp/imzml/>`_ - Analyze7.5 (upload hdr, img and t2m file via the "composite" function) - - Cardinal "MSImageSet" data saved as .RData + - Cardinal "MSImageSet" or "MSImagingExperiment" saved as .RData ]]></token> <token name="@MZ_TABULAR_INPUT_DESCRIPTION@"><