Mercurial > repos > lecorguille > xcms_xcmsset
changeset 6:60f6c208ca16 draft
planemo upload commit a3229faad6949bbca965d1d7e138cb3c0550780e
author | lecorguille |
---|---|
date | Thu, 07 Apr 2016 15:02:32 -0400 |
parents | b9a87af62223 |
children | 6b8ec45de9c0 |
files | README.rst abims_xcms_xcmsSet.xml macros.xml planemo.sh planemo_test.sh test-data/log.txt test-data/sacuri.zip test-data/sacuri_current_root.zip test-data/sacuri_dir_root.log.txt test-data/sacuri_dir_root.zip test-data/sampleMetadata.tsv test-data/xset.BPCs_raw.pdf test-data/xset.RData test-data/xset.TICs_raw.pdf xcms.r |
diffstat | 15 files changed, 187 insertions(+), 138 deletions(-) [+] |
line wrap: on
line diff
--- a/README.rst Wed Apr 06 03:22:15 2016 -0400 +++ b/README.rst Thu Apr 07 15:02:32 2016 -0400 @@ -2,6 +2,10 @@ Changelog/News -------------- +**Version 2.0.8 - 06/04/2016** + +- TEST: refactoring to pass planemo test using conda dependencies + **Version 2.0.7 - 10/02/2016** @@ -38,11 +42,5 @@ Test Status ----------- -``` {.bash} -planemo conda_install . -planemo test --install_galaxy --conda_dependency_resolution --galaxy_branch "dev" +Planemo test using conda: passed -#All 1 test(s) executed passed. -#abims_xcms_xcmsSet[0]: passed - -```
--- a/abims_xcms_xcmsSet.xml Wed Apr 06 03:22:15 2016 -0400 +++ b/abims_xcms_xcmsSet.xml Thu Apr 07 15:02:32 2016 -0400 @@ -1,20 +1,16 @@ -<tool id="abims_xcms_xcmsSet" name="xcms.xcmsSet" version="2.0.7"> +<tool id="abims_xcms_xcmsSet" name="xcms.xcmsSet" version="2.0.8"> <description>Filtration and Peak Identification using xcmsSet function from xcms R package to preprocess LC/MS data for relative quantification and statistical analysis </description> - <requirements> - <requirement type="package" version="3.1.2">R</requirement> - <requirement type="package" version="0.4_1">r-snow</requirement> - <requirement type="package" version="1.44.0">bioconductor-xcms</requirement> - <requirement type="package" version="1.1_4">r-batch</requirement> - </requirements> - - <stdio> - <exit_code range="1:" level="fatal" /> - </stdio> + <macros> + <import>macros.xml</import> + </macros> + + <expand macro="requirements"/> + <expand macro="stdio"/> <command><![CDATA[ - $__tool_directory__/xcms.r + @COMMAND_XCMS_SCRIPT@ #if $inputs.input == "lib": library $__app__.config.user_library_import_dir/$__user_email__/$inputs.library #elif $inputs.input == "zip_file": @@ -33,16 +29,16 @@ #if $methods.method == "centWave": ppm $methods.ppm peakwidth "c($methods.peakwidth)" - #if $methods.options_scanrange.option == "show": + #if $methods.options_scanrange.option == "show": scanrange "c($methods.options_scanrange.scanrange)" - #end if - #if $methods.options_c.option == "show": - mzdiff $methods.options_c.mzdiff - snthresh $methods.options_c.snthresh - integrate $methods.options_c.integrate - noise $methods.options_c.noise - prefilter "c($methods.options_c.prefilter)" - #end if + #end if + #if $methods.options_c.option == "show": + mzdiff $methods.options_c.mzdiff + snthresh $methods.options_c.snthresh + integrate $methods.options_c.integrate + noise $methods.options_c.noise + prefilter "c($methods.options_c.prefilter)" + #end if #elif $methods.method == "matchedFilter": step $methods.step fwhm $methods.fwhm @@ -62,11 +58,7 @@ scales "c($methods.scales)" SNR.method "$methods.SNR_method" #end if - ; - return=\$?; - mv log.txt $log; - cat $log; - sh -c "exit \$return" + @COMMAND_LOG_EXIT@ ]]></command> <inputs> @@ -193,7 +185,7 @@ <tests> <test> <param name="inputs|input" value="zip_file" /> - <param name="inputs|zip_file" value="sacuri.zip" ftype="zip" /> + <param name="inputs|zip_file" value="sacuri_dir_root.zip" ftype="zip" /> <param name="methods|method" value="matchedFilter" /> <param name="methods|step" value="0.01" /> <param name="methods|fwhm" value="4" /> @@ -201,16 +193,29 @@ <param name="methods|options_m|max" value="50" /> <param name="methods|options_m|snthresh" value="1" /> <param name="methods|options_m|steps" value="2" /> - <!--<output name="xsetRData" file="xset.RData" />--> - <!--<output name="sampleMetadata" file="sampleMetadata.tsv" />--> - <!--<output name="ticsRawPdf" file="xset.TICs_raw.pdf" />--> - <!--<output name="bpcsRawPdf" file="xset.BPCs_raw.pdf" />--> <output name="log"> <assert_contents> - <has_text text="object with 9 samples" /> - <has_text text="Time range: 0.7-1140 seconds (0-19 minutes)" /> - <has_text text="Mass range: 50.0019-999.9863 m/z" /> - <has_text text="Peaks: 135846 (about 15094 per sample)" /> + <has_text text="object with 4 samples" /> + <has_text text="Time range: 0.7-1139.7 seconds (0-19 minutes)" /> + <has_text text="Mass range: 50.0021-999.9863 m/z" /> + <has_text text="Peaks: 59359 (about 14840 per sample)" /> + <has_text text="Peak Groups: 0" /> + <has_text text="Sample classes: bio, blank" /> + </assert_contents> + </output> + </test> + <test> + <param name="inputs|input" value="zip_file" /> + <param name="inputs|zip_file" value="sacuri_current_root.zip" ftype="zip" /> + <param name="methods|method" value="centWave" /> + <param name="methods|ppm" value="25" /> + <param name="methods|peakwidth" value="20,50" /> + <output name="log"> + <assert_contents> + <has_text text="object with 4 samples" /> + <has_text text="Time range: 3.5-1139.2 seconds (0.1-19 minutes)" /> + <has_text text="Mass range: 57.9756-593.4086 m/z" /> + <has_text text="Peaks: 1535 (about 384 per sample)" /> <has_text text="Peak Groups: 0" /> <has_text text="Sample classes: bio, blank" /> </assert_contents> @@ -220,17 +225,7 @@ <help><![CDATA[ -.. class:: infomark - -**Authors** Colin A. Smith csmith@scripps.edu, Ralf Tautenhahn rtautenh@gmail.com, Steffen Neumann sneumann@ipb-halle.de, Paul Benton hpaul.benton08@imperial.ac.uk and Christopher Conley cjconley@ucdavis.edu - -.. class:: infomark - -**Galaxy integration** ABiMS TEAM - UPMC/CNRS - Station biologique de Roscoff and Yann Guitton yann.guitton@univ-nantes.fr - part of Workflow4Metabolomics.org [W4M] - - | Contact support@workflow4metabolomics.org for any questions or concerns about the Galaxy implementation of this tool. - ---------------------------------------------------- +@HELP_AUTHORS@ ============ Xcms.xcmsSet @@ -463,6 +458,10 @@ Changelog/News -------------- +**Version 2.0.8 - 06/04/2016** + +- TEST: refactoring to pass planemo test using conda dependencies + **Version 2.0.7 - 10/02/2016** @@ -474,7 +473,7 @@ - UPDATE: refactoring of internal management of inputs/outputs -- UPDATE: refactoring to feed the new report tool +- TEST: refactoring to feed the new report tool **Version 2.0.2 - 18/01/2016 @@ -497,10 +496,5 @@ ]]></help> - - <citations> - <citation type="doi">10.1021/ac051437y</citation> - <citation type="doi">10.1093/bioinformatics/btu813</citation> - </citations> - + <expand macro="citation" /> </tool>
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/macros.xml Thu Apr 07 15:02:32 2016 -0400 @@ -0,0 +1,51 @@ +<?xml version="1.0"?> +<macros> + <xml name="requirements"> + <requirements> + <requirement type="package" version="3.1.2">R</requirement> + <requirement type="package" version="0.4_1">r-snow</requirement> + <requirement type="package" version="1.44.0">bioconductor-xcms</requirement> + <requirement type="package" version="1.1_4">r-batch</requirement> + </requirements> + </xml> + <xml name="stdio"> + <stdio> + <exit_code range="1" level="fatal" /> + </stdio> + </xml> + + <token name="@COMMAND_XCMS_SCRIPT@"> + LANG=C Rscript $__tool_directory__/xcms.r + </token> + + <token name="@COMMAND_LOG_EXIT@"> + ; + return=\$?; + mv log.txt $log; + cat $log; + sh -c "exit \$return" + </token> + + <token name="@HELP_AUTHORS@"> +.. class:: infomark + +**Authors** Colin A. Smith csmith@scripps.edu, Ralf Tautenhahn rtautenh@gmail.com, Steffen Neumann sneumann@ipb-halle.de, Paul Benton hpaul.benton08@imperial.ac.uk and Christopher Conley cjconley@ucdavis.edu + +.. class:: infomark + +**Galaxy integration** ABiMS TEAM - UPMC/CNRS - Station biologique de Roscoff and Yann Guitton yann.guitton@oniris-nantes.fr - part of Workflow4Metabolomics.org [W4M] + + | Contact support@workflow4metabolomics.org for any questions or concerns about the Galaxy implementation of this tool. + +--------------------------------------------------- + + </token> + + + <xml name="citation"> + <citations> + <citation type="doi">10.1021/ac051437y</citation> + <citation type="doi">10.1093/bioinformatics/btu813</citation> + </citations> + </xml> +</macros>
--- a/planemo.sh Wed Apr 06 03:22:15 2016 -0400 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,1 +0,0 @@ -planemo shed_init -f --name=xcms_xcms_set --owner=lecorguille --description="[W4M][GC-MS] XCMS R Package - Preprocessing - peaks calling in NetCDF/mzXML files" --homepage_url="http://workflow4metabolomics.org" --long_description="Part of the W4M project: http://workflow4metabolomics.org\n\nXCMS: http://www.bioconductor.org/packages/release/bioc/html/xcms.html\n\nFiltration and Peak Identification using xcmsSet function from xcms R package to preprocess LC/MS data for relative quantification and statistical analysis\n\nBEWARE: this tool don't come with its script. You will need to install the dedicated package_xcms_w4m_script too" --category="Metabolomics"
--- a/planemo_test.sh Wed Apr 06 03:22:15 2016 -0400 +++ b/planemo_test.sh Thu Apr 07 15:02:32 2016 -0400 @@ -1,5 +1,7 @@ +planemo conda_init planemo conda_install . planemo test --install_galaxy --conda_dependency_resolution --galaxy_branch "dev" -#All 1 test(s) executed passed. +#All 2 test(s) executed passed. #abims_xcms_xcmsSet[0]: passed +#abims_xcms_xcmsSet[1]: passed
--- a/test-data/log.txt Wed Apr 06 03:22:15 2016 -0400 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,56 +0,0 @@ - PACKAGE INFO -parallel 3.1.1 -BiocGenerics 0.12.1 -Biobase 2.26.0 -Rcpp 0.11.5 -mzR 2.0.0 -igraph 0.7.1 -xcms 1.42.0 -snow 0.3.13 -batch 1.1.4 - - - ARGUMENTS INFO -zipfile /w/galaxy/galaxy4metabolomics/galaxy-dist/database/files/041/dataset_41794.dat -xfunction xcmsSet -nSlaves 8 -method matchedFilter -step 0.01 -fwhm 4 -max 50 -snthresh 1 -steps 2 - - - INFILE PROCESSING INFO - - - MAIN PROCESSING INFO -Starting snow cluster with 8 local sockets. -Detecting features in file # 1 : HU_neg_028.mzXML -Detecting features in file # 2 : HU_neg_060.mzXML -Detecting features in file # 3 : HU_neg_051.mzXML -Detecting features in file # 4 : HU_neg_017.mzXML -Detecting features in file # 5 : HU_neg_034.mzXML -Detecting features in file # 6 : Blanc09.mzXML -Detecting features in file # 7 : Blanc06.mzXML -Detecting features in file # 8 : Blanc12.mzXML -Detecting features in file # 9 : Blanc04.mzXML - - - XSET OBJECT INFO -An "xcmsSet" object with 9 samples - -Time range: 0.7-1140 seconds (0-19 minutes) -Mass range: 50.0019-999.9863 m/z -Peaks: 135846 (about 15094 per sample) -Peak Groups: 0 -Sample classes: bio, blank - -Profile settings: method = bin - step = 0.01 - -Memory usage: 13.8 MB - - - DONE
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/test-data/sacuri_dir_root.log.txt Thu Apr 07 15:02:32 2016 -0400 @@ -0,0 +1,67 @@ + PACKAGE INFO +parallel 3.2.2 +BiocGenerics 0.16.1 +Biobase 2.30.0 +Rcpp 0.12.2 +mzR 2.4.1 +xcms 1.44.0 +snow 0.4.1 +batch 1.1.4 + + + ARGUMENTS INFO +zipfile /tmp/tmpAmhDSv/files/000/dataset_1.dat +xfunction xcmsSet +xsetRdataOutput /tmp/tmpAmhDSv/files/000/dataset_2.dat +sampleMetadataOutput /tmp/tmpAmhDSv/files/000/dataset_3.dat +ticspdf /tmp/tmpAmhDSv/files/000/dataset_4.dat +bicspdf /tmp/tmpAmhDSv/files/000/dataset_5.dat +nSlaves 1 +method matchedFilter +step 0.01 +fwhm 4 +max 50 +snthresh 1 +steps 2 + + + INFILE PROCESSING INFO + + + ARGUMENTS PROCESSING INFO +files_root_directory sacuri +Compute md5 checksum... +Checking XML structure... +Checking files filenames compatibilities with xmcs... + + + MAIN PROCESSING INFO +55:579 60:1264 65:1988 70:2602 75:3287 80:3894 85:4629 90:5499 95:6174 100:6672 105:7194 110:7737 115:8205 120:8673 125:9117 130:9532 135:9973 140:10562 145:10945 150:11380 155:11788 160:12163 165:12477 170:12835 175:13276 180:13632 185:14142 190:14489 195:15022 200:15360 205:15716 210:15992 215:16297 220:16669 225:16895 230:17227 235:17487 240:17657 245:17956 250:18238 255:18464 260:18779 265:18969 270:19194 275:19503 280:19798 285:20041 290:20282 295:20498 300:20673 305:21027 310:21220 315:21403 320:21881 325:22431 330:22630 335:22775 340:22969 345:23144 350:23282 355:23425 360:24001 365:24131 370:24242 375:24362 380:24475 385:24580 390:24763 395:25006 400:25190 405:25308 410:25446 415:25555 420:25648 425:25761 430:25962 435:26057 440:26172 445:26260 450:26343 455:26414 460:26608 465:26720 470:26827 475:26979 480:27048 485:27126 490:27218 495:27272 500:27341 505:27433 510:27487 515:27535 520:27600 525:27758 530:27820 535:27896 540:27940 545:28085 550:28141 555:28298 560:28711 565:28732 570:28760 575:28792 580:28822 585:28995 590:29019 595:29059 600:29090 605:29119 610:29151 615:29182 620:29202 625:29238 630:29266 635:29294 640:29317 645:29472 650:29494 655:29599 660:29628 665:29781 670:29812 675:29868 680:29895 685:29923 690:29953 695:29973 700:30032 705:30048 710:30069 715:30089 720:30107 725:30128 730:30144 735:30168 740:30286 745:30312 750:30331 755:30369 760:30402 765:30420 770:30438 775:30584 780:30620 785:30647 790:30666 795:30682 800:30701 805:30712 810:30785 815:30801 820:30816 825:30831 830:30945 835:30979 840:31004 845:31102 850:31114 855:31132 860:31147 865:31166 870:31175 875:31205 880:31227 885:31253 890:31264 895:31280 900:31298 905:31314 910:31325 915:31337 920:31351 925:31370 930:31389 935:31405 940:31416 945:31442 950:31453 955:31470 960:31486 965:31680 970:31794 975:31803 980:31811 985:31836 990:32026 995:32126 1000:32142 +55:826 60:1707 65:2578 70:3373 75:4271 80:5020 85:5907 90:6893 95:7729 100:8434 105:9094 110:9712 115:10298 120:10911 125:11430 130:12005 135:12573 140:13234 145:13750 150:14314 155:14841 160:15333 165:15894 170:16323 175:16847 180:17319 185:17867 190:18337 195:18957 200:19402 205:19925 210:20275 215:20746 220:21271 225:21607 230:22062 235:22473 240:22748 245:23187 250:23559 255:23845 260:24284 265:24628 270:24973 275:25315 280:25726 285:26019 290:26327 295:26632 300:26886 305:27300 310:27579 315:27880 320:28450 325:29107 330:29377 335:29609 340:29860 345:30141 350:30369 355:30586 360:31214 365:31446 370:31656 375:31860 380:32067 385:32210 390:32451 395:32690 400:32909 405:33093 410:33312 415:33488 420:33687 425:33837 430:34074 435:34229 440:34403 445:34541 450:34702 455:34798 460:35015 465:35207 470:35390 475:35528 480:35633 485:35754 490:35880 495:35964 500:36076 505:36165 510:36251 515:36336 520:36439 525:36588 530:36699 535:36810 540:36882 545:37060 550:37124 555:37263 560:37718 565:37789 570:37829 575:37878 580:37915 585:38016 590:38054 595:38102 600:38137 605:38188 610:38237 615:38277 620:38312 625:38359 630:38387 635:38413 640:38450 645:38558 650:38590 655:38714 660:38749 665:38864 670:38914 675:38967 680:39003 685:39038 690:39073 695:39096 700:39199 705:39227 710:39256 715:39279 720:39302 725:39334 730:39358 735:39388 740:39513 745:39537 750:39557 755:39615 760:39647 765:39674 770:39714 775:39861 780:39903 785:39937 790:39956 795:39976 800:40003 805:40036 810:40102 815:40121 820:40143 825:40173 830:40202 835:40258 840:40376 845:40468 850:40488 855:40510 860:40524 865:40542 870:40565 875:40593 880:40607 885:40620 890:40642 895:40669 900:40709 905:40727 910:40749 915:40770 920:40795 925:40815 930:40831 935:40859 940:40881 945:40895 950:40909 955:40927 960:40955 965:41172 970:41292 975:41313 980:41336 985:41355 990:41481 995:41632 1000:41652 +55:514 60:1053 65:1583 70:2125 75:2648 80:3151 85:3818 90:4547 95:5274 100:5669 105:6164 110:6556 115:6922 120:7401 125:7782 130:8159 135:8514 140:9002 145:9296 150:9632 155:9960 160:10258 165:10541 170:10816 175:11141 180:11384 185:11827 190:12048 195:12370 200:12608 205:12929 210:13142 215:13337 220:13642 225:13802 230:14032 235:14204 240:14349 245:14614 250:14773 255:14935 260:15217 265:15344 270:15512 275:15763 280:15966 285:16095 290:16255 295:16456 300:16589 305:16806 310:16956 315:17091 320:17476 325:17978 330:18165 335:18251 340:18393 345:18517 350:18606 355:18739 360:19210 365:19275 370:19358 375:19420 380:19510 385:19577 390:19668 395:19833 400:19955 405:20040 410:20154 415:20244 420:20323 425:20414 430:20577 435:20639 440:20724 445:20785 450:20835 455:20897 460:21073 465:21160 470:21235 475:21428 480:21486 485:21538 490:21599 495:21640 500:21685 505:21738 510:21773 515:21798 520:21863 525:22005 530:22044 535:22121 540:22162 545:22286 550:22340 555:22493 560:22814 565:22842 570:22869 575:22895 580:22927 585:23067 590:23090 595:23119 600:23134 605:23172 610:23197 615:23223 620:23242 625:23275 630:23304 635:23314 640:23339 645:23465 650:23490 655:23600 660:23619 665:23756 670:23781 675:23849 680:23870 685:23895 690:23910 695:23929 700:23992 705:24015 710:24026 715:24044 720:24068 725:24089 730:24122 735:24146 740:24242 745:24259 750:24280 755:24307 760:24330 765:24352 770:24373 775:24493 780:24514 785:24551 790:24563 795:24584 800:24605 805:24637 810:24684 815:24704 820:24715 825:24723 830:24736 835:24763 840:24854 845:24938 850:24950 855:24968 860:24983 865:25000 870:25019 875:25030 880:25046 885:25067 890:25084 895:25100 900:25119 905:25132 910:25141 915:25153 920:25170 925:25184 930:25199 935:25211 940:25224 945:25240 950:25251 955:25266 960:25278 965:25437 970:25548 975:25560 980:25568 985:25580 990:25784 995:25822 +55:568 60:1154 65:1793 70:2433 75:3064 80:3635 85:4363 90:5039 95:5627 100:6077 105:6641 110:7124 115:7603 120:8076 125:8439 130:8836 135:9206 140:9628 145:9963 150:10288 155:10623 160:10937 165:11304 170:11676 175:12092 180:12358 185:12768 190:13022 195:13435 200:13746 205:14079 210:14229 215:14412 220:14688 225:14901 230:15155 235:15314 240:15475 245:15750 250:15938 255:16115 260:16396 265:16512 270:16704 275:16893 280:17127 285:17336 290:17484 295:17668 300:17788 305:18044 310:18177 315:18318 320:18785 325:19242 330:19399 335:19491 340:19646 345:19785 350:19886 355:19994 360:20481 365:20574 370:20675 375:20743 380:20827 385:20903 390:21012 395:21202 400:21349 405:21433 410:21527 415:21590 420:21649 425:21741 430:21888 435:21942 440:21998 445:22067 450:22121 455:22169 460:22293 465:22371 470:22476 475:22629 480:22666 485:22706 490:22765 495:22820 500:22881 505:22934 510:22988 515:23039 520:23087 525:23185 530:23226 535:23293 540:23332 545:23463 550:23513 555:23674 560:24058 565:24076 570:24095 575:24132 580:24156 585:24262 590:24278 595:24313 600:24336 605:24360 610:24396 615:24421 620:24459 625:24479 630:24498 635:24521 640:24542 645:24692 650:24712 655:24831 660:24853 665:24976 670:24991 675:25048 680:25063 685:25079 690:25095 695:25114 700:25163 705:25184 710:25202 715:25213 720:25227 725:25250 730:25276 735:25289 740:25384 745:25400 750:25416 755:25458 760:25483 765:25508 770:25530 775:25654 780:25671 785:25692 790:25715 795:25742 800:25752 805:25763 810:25832 815:25845 820:25862 825:25875 830:25890 835:25905 840:26020 845:26094 850:26108 855:26134 860:26150 865:26163 870:26174 875:26185 880:26200 885:26212 890:26225 895:26236 900:26250 905:26262 910:26279 915:26287 920:26299 925:26317 930:26325 935:26339 940:26356 945:26367 950:26381 955:26392 960:26404 965:26592 970:26701 975:26720 980:26743 985:26759 990:26969 995:26990 + + +null device + 1 +Creating the sampleMetadata file... +Creating TIC pdf... +Creating BIC pdf... + + + XSET OBJECT INFO +An "xcmsSet" object with 4 samples + +Time range: 0.7-1139.7 seconds (0-19 minutes) +Mass range: 50.0021-999.9863 m/z +Peaks: 59359 (about 14840 per sample) +Peak Groups: 0 +Sample classes: bio, blank + +Profile settings: method = bin + step = 0.01 + +Memory usage: 6.02 MB + + + DONE
--- a/test-data/sampleMetadata.tsv Wed Apr 06 03:22:15 2016 -0400 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,10 +0,0 @@ -sampleMetadata class polarity -HU_neg_028 bio negative -HU_neg_060 bio negative -HU_neg_051 bio negative -HU_neg_017 bio negative -HU_neg_034 bio negative -Blanc09 blank negative -Blanc06 blank negative -Blanc12 blank negative -Blanc04 blank negative
--- a/xcms.r Wed Apr 06 03:22:15 2016 -0400 +++ b/xcms.r Thu Apr 07 15:02:32 2016 -0400 @@ -77,7 +77,7 @@ -if (thefunction == "xcmsSet" || thefunction == "retcor") { +if (thefunction %in% c("xcmsSet","retcor")) { ticspdf = listArguments[["ticspdf"]]; listArguments[["ticspdf"]]=NULL bicspdf = listArguments[["bicspdf"]]; listArguments[["bicspdf"]]=NULL } @@ -100,7 +100,7 @@ } # We unzip automatically the chromatograms from the zip files. -if (thefunction == "xcmsSet" || thefunction == "retcor" || thefunction == "fillPeaks") { +if (thefunction %in% c("xcmsSet","retcor","fillPeaks")) { if(exists("zipfile") && (zipfile!="")) { if(!file.exists(zipfile)){ error_message=paste("Cannot access the Zip file:",zipfile,". Please, contact your administrator ... if you have one!") @@ -111,15 +111,19 @@ #list all file in the zip file #zip_files=unzip(zipfile,list=T)[,"Name"] - #get the directory name - filesInZIp=unzip(zipfile, list=T); - directories=unique(unlist(lapply(strsplit(filesInZIp$Name,"/"), function(x) x[1]))); - directories=directories[!(directories %in% c("__MACOSX")) & file.info(directories)$isdir] - if (length(directories) == 1) directory=directories else directory="."; #unzip suppressWarnings(unzip(zipfile, unzip="unzip")) + #get the directory name + filesInZip=unzip(zipfile, list=T); + directories=unique(unlist(lapply(strsplit(filesInZip$Name,"/"), function(x) x[1]))); + directories=directories[!(directories %in% c("__MACOSX")) & file.info(directories)$isdir] + directory = "." + if (length(directories) == 1) directory = directories + + cat("files_root_directory\t",directory,"\n") + # md5sumList=list("origin"=getMd5sum(directory)) @@ -190,11 +194,11 @@ dev.off() #dev.new(file="Rplots.pdf", width=16, height=12) -if (thefunction == "xcmsSet") { +if (thefunction == "xcmsSet") { #transform the files absolute pathways into relative pathways - xset@filepaths<-sub("^.*/database/job_working_directory/[0123456789]+/[0123456789]+/" ,"", xset@filepaths) - xset@filepaths<-sub("^.*/database/jobs/[0123456789]+/[0123456789]+/" ,"", xset@filepaths) + xset@filepaths<-sub(paste(getwd(),"/",sep="") ,"", xset@filepaths) + if(exists("zipfile") && (zipfile!="")) { #Modify the samples names (erase the path)