From: <rea...@us...> - 2011-06-21 01:23:21
|
Revision: 5437 http://sashimi.svn.sourceforge.net/sashimi/?rev=5437&view=rev Author: real_procopio Date: 2011-06-21 01:23:15 +0000 (Tue, 21 Jun 2011) Log Message: ----------- [Petunia] Pass correct centroiding filter to msconvert; allow msconvert to convert wiff files, .d and .raw directories to mzML Modified Paths: -------------- branches/4-5/trans_proteomic_pipeline/CGI/tpp_gui/tpp_gui.pl Modified: branches/4-5/trans_proteomic_pipeline/CGI/tpp_gui/tpp_gui.pl =================================================================== --- branches/4-5/trans_proteomic_pipeline/CGI/tpp_gui/tpp_gui.pl 2011-06-17 18:44:08 UTC (rev 5436) +++ branches/4-5/trans_proteomic_pipeline/CGI/tpp_gui/tpp_gui.pl 2011-06-21 01:23:15 UTC (rev 5437) @@ -518,7 +518,7 @@ &addFiles(ref_page => 'rawfile', files => [$rawfile]); - $page = 'mzxml'; + $page = param('refpage') ? param('refpage') : 'mzxml'; } elsif ( $action eq $web_actions{'switchPipeline'} ) { # re-use addFiles, with a small hack @@ -3177,28 +3177,31 @@ my $options = '-v --mzML'; # always verbose and mzML output $options .= " -o $fdir"; - $options .= ' -c [1,2]' if (param('msconvert_centroid')); $options .= ' -z' if (param('msconvert_zlib')); $options .= ' -g' if (param('msconvert_gzip')); - + $options .= ' --filter "peakPicking true [1,2]"' if (param('msconvert_centroid')); $options .= ' '.param('msconvert_extraopts') if (param('msconvert_extraopts')); + if ($in_cygwin) { + chomp(my $w_file_path = `$command{cygpath} -w $file`); + $command = "$command{msconvert} \"$w_file_path\" $options "; + } else { + $command = "$command{msconvert} $file $options"; + } + + $out_file = $file; # modified below if ($file =~ /raw$/i) { - - if ($in_cygwin) { - chomp(my $w_file_path = `$command{cygpath} -w $file`); - $command = "$command{msconvert} $options \"$w_file_path\" "; - } else { - $command = "$command{msconvert} $options $file"; - } - $out_file = $file; $out_file =~ s/\.raw$/\.mzML/i; - + } elsif ($file =~ /wiff$/i) { + $out_file =~ s/\.wiff$/\.mzML/i; + } elsif ($file =~ /\.d$/i) { + $out_file =~ s/\.d$/\.mzML/i; } else { $command = "$command{echo} Cannot process $file : Unknown type."; $out_file = "NO_FILE"; - } + # did user ask to gzip entire mzml file? + $out_file = $out_file.".gz" if (param('msconvert_gzip')); push @commands, ($command, $out_file); } @@ -7473,6 +7476,8 @@ 'Select instrument file type you want to convert: ', hidden(-name=>'Action', -value=>$web_actions{'switchRawFile'}), + hidden(-name=>'refpage', + -value=>'mzxml'), popup_menu(-name=>'rawfile_type', -values => [qw'wiff ddir raw rawdir'], -default => $rawfile, @@ -7607,13 +7612,44 @@ ######################################################################## sub pageMsConvert { - # files to process (from session) - my $any_files_there = &showFiles('mzml','msconvert','raw','1. Specify RAW Input File(s) to convert to mzML'); + Delete('Action'); + my %labels = ( 'raw' => 'Thermo RAW', + 'rawdir' => 'Waters .raw Directories', + 'wiff' => 'ABI/Agilent .wiff', + 'ddir' => 'Agilent .d Directories' + ); print + &printTitle(title => '1. Input File Format', + class => 'formentryhead', + div_id => 'input'), + "<div id=input class=formentry>", + start_form(-method => 'POST', + -action => $tpp_url, + -name => 'switchRawFile'), + 'Select instrument file type you want to convert: ', + hidden(-name=>'Action', + -value=>$web_actions{'switchRawFile'}), + hidden(-name=>'refpage', + -value=>'msconvert'), + popup_menu(-name=>'rawfile_type', + -values => [qw'wiff ddir raw rawdir'], + -default => $rawfile, + -labels=>\%labels, + -onChange => 'document.forms.switchRawFile.submit();'), + h5('Please note that these converters will only work on machines that contain the appropriate vendor libraries.'), + endform, + "</div>\n"; + + my $choosetype = ($rawfile =~ /dir$/) ? 'DIRS' : $rawfile; + my $choosestr = ($rawfile =~ /dir$/) ? 'Directory(ies)' : 'File(s)'; + # files to process (from session) + my $any_files_there = &showFiles('mzml','msconvert',$choosetype,"2. Specify $choosestr to convert to mzML"); + + print br, - &printTitle(title => '2. Conversion Options', + &printTitle(title => '3. Conversion Options', class => 'formentryhead', div_id => 'conv'), "<div id=conv class=formentry>", @@ -7634,7 +7670,7 @@ "Enter additional options to pass directly to the command-line (expert use only!) ", textfield(-name=>'msconvert_extraopts', -value=>'', - -size=>25, + -size=>50, -maxlength=>100), "</div>\n"; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |