comparison filtering.xml @ 4:58376f5a6319 draft

planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit ecdc3a64aa245d80dbc5487b2bf10a85a43adc6d
author galaxyp
date Fri, 22 Mar 2019 08:14:21 -0400
parents 0c4579390f73
children d2ccd8348018
comparison
equal deleted inserted replaced
3:4b5513e25902 4:58376f5a6319
1 <tool id="cardinal_filtering" name="MSI filtering" version="@VERSION@.2"> 1 <tool id="cardinal_filtering" name="MSI filtering" version="@VERSION@.3">
2 <description>tool for filtering mass spectrometry imaging data</description> 2 <description>tool for filtering mass spectrometry imaging data</description>
3 <macros> 3 <macros>
4 <import>macros.xml</import> 4 <import>macros.xml</import>
5 </macros> 5 </macros>
6 <expand macro="requirements"> 6 <expand macro="requirements">
55 ## Range y coordinates 55 ## Range y coordinates
56 minimumy = min(coord(msidata)[,2]) 56 minimumy = min(coord(msidata)[,2])
57 maximumy = max(coord(msidata)[,2]) 57 maximumy = max(coord(msidata)[,2])
58 ## Store features for QC plot 58 ## Store features for QC plot
59 featuresinfile = mz(msidata) 59 featuresinfile = mz(msidata)
60
61 all_df = cbind(coord(msidata)[,1:2], rep("removed pixels", times=ncol(msidata)))
62 colnames(all_df)[3] = "annotation"
60 63
61 ## Next steps will only run if there are more than 0 pixels/features in the file 64 ## Next steps will only run if there are more than 0 pixels/features in the file
62 65
63 if (ncol(msidata)>0 & nrow(msidata) >0) 66 if (ncol(msidata)>0 & nrow(msidata) >0)
64 { 67 {
136 #end if 139 #end if
137 140
138 ############################# QC data ##################################### 141 ############################# QC data #####################################
139 142
140 ## dataframe for QC of pixel distribution 143 ## dataframe for QC of pixel distribution
141 position_df = cbind(coord(msidata)[,1:2], rep("remaining pixels", times=ncol(msidata))) 144
142 colnames(position_df)[3] = "annotation" 145 remaining_df = cbind(coord(msidata)[,1:2], rep("remaining pixels", times=ncol(msidata)))
146 colnames(remaining_df)[3] = "annotation"
147 position_df = rbind(all_df, remaining_df)
148 position_df[row.names(unique(position_df[,c("x", "y")])),]
143 position_df\$annotation = factor(position_df\$annotation) 149 position_df\$annotation = factor(position_df\$annotation)
144 gc() 150 gc()
145 151
146 }else{ 152 }else{
147 print("Inputfile has no intensities > 0") 153 print("Inputfile has no intensities > 0")
442 </param> 448 </param>
443 </when> 449 </when>
444 </conditional> 450 </conditional>
445 <param name="imzml_output" type="select" display = "radio" optional = "False" 451 <param name="imzml_output" type="select" display = "radio" optional = "False"
446 label="Output format" help= "Choose the output format"> 452 label="Output format" help= "Choose the output format">
447 <option value="imzml_format" selected="True">imzML</option> 453 <option value="imzml_format" >imzML</option>
448 <option value="rdata_format">RData</option> 454 <option value="rdata_format" selected="True" >RData</option>
449 </param> 455 </param>
450 </inputs> 456 </inputs>
451 457
452 <outputs> 458 <outputs>
453 <data format="imzml" name="outfile_imzml" label="${tool.name} on ${on_string}: imzML"> 459 <data format="imzml" name="outfile_imzml" label="${tool.name} on ${on_string}: imzML">
591 597
592 598
593 **Output** 599 **Output**
594 600
595 - MSI data as imzML file or .RData (can be read with the Cardinal package in R) 601 - MSI data as imzML file or .RData (can be read with the Cardinal package in R)
596 - pdf with heatmap showing the pixels that are left after filtering and histograms of kept and removed m/z 602 - pdf with heatmap showing the pixels that are removed and kept as well as histograms of kept and removed m/z
597 603
598 604
599 ]]> 605 ]]>
600 </help> 606 </help>
601 <expand macro="citations"/> 607 <expand macro="citations"/>