From 791d067c43004fa71a4a33c3152f86f28884e467 Mon Sep 17 00:00:00 2001 From: THEVENOT Etienne Date: Thu, 10 Jul 2025 21:38:25 +0200 Subject: [PATCH] initial copy --- tools/isa-extractor/.gitignore | 4 + tools/isa-extractor/.travis.yml | 11 ++ tools/isa-extractor/Makefile | 46 +++++++ tools/isa-extractor/README.md | 12 ++ tools/isa-extractor/extract-from-isa | 130 ++++++++++++++++++ tools/isa-extractor/isa-extractor.Rproj | 18 +++ tools/isa-extractor/isa2mzdata.xml | 77 +++++++++++ tools/isa-extractor/isa2mzml.xml | 77 +++++++++++ tools/isa-extractor/isa2mzxml.xml | 77 +++++++++++ tools/isa-extractor/isa2netcdf.xml | 77 +++++++++++ tools/isa-extractor/isa2nmrml.xml | 77 +++++++++++ .../isa-extractor/test-data/mzdata_study.zip | Bin 0 -> 340 bytes .../mzdata_study_output/empty.mzData | 0 tools/isa-extractor/test-data/mzml_study.zip | Bin 0 -> 336 bytes .../test-data/mzml_study_output/empty.mzML | 0 tools/isa-extractor/test-data/mzxml_study.zip | Bin 0 -> 338 bytes .../test-data/mzxml_study_output/empty.mzXML | 0 .../isa-extractor/test-data/netcdf_study.zip | Bin 0 -> 334 bytes .../test-data/netcdf_study_output/empty.CDF | 0 tools/isa-extractor/test-data/nmrml_study.zip | Bin 0 -> 338 bytes .../test-data/nmrml_study_output/empty.nmrML | 0 tools/isa-extractor/test/.gitignore | 3 + tools/isa-extractor/test/Makefile | 7 + .../test/res/empty_study/__EMPTY_FOLDER__ | 0 .../empty1.mzML | 0 .../empty2.mzml | 0 .../empty3.MZML | 0 .../test/res/fake_mzdata_study/empty.mzData | 0 .../test/res/fake_mzml_study/empty.mzML | 0 .../test/res/fake_mzxml_study/empty.mzXML | 0 .../test/res/fake_netcdf_study/empty.CDF | 0 .../test/res/fake_nmrml_study/empty.nmrML | 0 .../isa-extractor/test/test-extract-from-isa | 80 +++++++++++ 33 files changed, 696 insertions(+) create mode 100644 tools/isa-extractor/.gitignore create mode 100644 tools/isa-extractor/.travis.yml create mode 100644 tools/isa-extractor/Makefile create mode 100644 tools/isa-extractor/README.md create mode 100644 tools/isa-extractor/extract-from-isa create mode 100644 tools/isa-extractor/isa-extractor.Rproj create mode 100644 tools/isa-extractor/isa2mzdata.xml create mode 100644 tools/isa-extractor/isa2mzml.xml create mode 100644 tools/isa-extractor/isa2mzxml.xml create mode 100644 tools/isa-extractor/isa2netcdf.xml create mode 100644 tools/isa-extractor/isa2nmrml.xml create mode 100644 tools/isa-extractor/test-data/mzdata_study.zip create mode 100644 tools/isa-extractor/test-data/mzdata_study_output/empty.mzData create mode 100644 tools/isa-extractor/test-data/mzml_study.zip create mode 100644 tools/isa-extractor/test-data/mzml_study_output/empty.mzML create mode 100644 tools/isa-extractor/test-data/mzxml_study.zip create mode 100644 tools/isa-extractor/test-data/mzxml_study_output/empty.mzXML create mode 100644 tools/isa-extractor/test-data/netcdf_study.zip create mode 100644 tools/isa-extractor/test-data/netcdf_study_output/empty.CDF create mode 100644 tools/isa-extractor/test-data/nmrml_study.zip create mode 100644 tools/isa-extractor/test-data/nmrml_study_output/empty.nmrML create mode 100644 tools/isa-extractor/test/.gitignore create mode 100644 tools/isa-extractor/test/Makefile create mode 100644 tools/isa-extractor/test/res/empty_study/__EMPTY_FOLDER__ create mode 100644 tools/isa-extractor/test/res/fake_case_insensitive_mzml_study/empty1.mzML create mode 100644 tools/isa-extractor/test/res/fake_case_insensitive_mzml_study/empty2.mzml create mode 100644 tools/isa-extractor/test/res/fake_case_insensitive_mzml_study/empty3.MZML create mode 100644 tools/isa-extractor/test/res/fake_mzdata_study/empty.mzData create mode 100644 tools/isa-extractor/test/res/fake_mzml_study/empty.mzML create mode 100644 tools/isa-extractor/test/res/fake_mzxml_study/empty.mzXML create mode 100644 tools/isa-extractor/test/res/fake_netcdf_study/empty.CDF create mode 100644 tools/isa-extractor/test/res/fake_nmrml_study/empty.nmrML create mode 100644 tools/isa-extractor/test/test-extract-from-isa diff --git a/tools/isa-extractor/.gitignore b/tools/isa-extractor/.gitignore new file mode 100644 index 0000000000..45835cc985 --- /dev/null +++ b/tools/isa-extractor/.gitignore @@ -0,0 +1,4 @@ +planemo-venv +tool_test_output.* +dist +.Rproj.user diff --git a/tools/isa-extractor/.travis.yml b/tools/isa-extractor/.travis.yml new file mode 100644 index 0000000000..1316438ec1 --- /dev/null +++ b/tools/isa-extractor/.travis.yml @@ -0,0 +1,11 @@ +dist: bionic + +notifications: + email: + recipients: + - pierrick.roger@cea.fr + +script: + - make test + - make plint + - make ptest diff --git a/tools/isa-extractor/Makefile b/tools/isa-extractor/Makefile new file mode 100644 index 0000000000..883c903850 --- /dev/null +++ b/tools/isa-extractor/Makefile @@ -0,0 +1,46 @@ +SCRIPT_NAME=extract-from-isa +REPOS_NAME=isaextractor +TOOLS_XML=$(wildcard isa2*.xml) + +all: + +test: + make -C $@ + +planemo-venv/bin/planemo: planemo-venv + . planemo-venv/bin/activate && pip install --upgrade pip setuptools + . planemo-venv/bin/activate && pip install planemo + +planemo-venv: + virtualenv -p python2.7 $@ + +plint: planemo-venv/bin/planemo + . planemo-venv/bin/activate && planemo lint $(TOOLS_XML) + +ptest: planemo-venv/bin/planemo + . planemo-venv/bin/activate && planemo test --conda_dependency_resolution --galaxy_branch release_19.01 $(TOOLS_XML) + +dist/$(REPOS_NAME)/: + mkdir -p $@ + cp -Lr README.md $(SCRIPT_NAME) $(TOOLS_XML) test-data $@ + +ptesttoolshed_diff: dist/$(REPOS_NAME)/ planemo-venv/bin/planemo + . planemo-venv/bin/activate && cd $< && planemo shed_diff --shed_target testtoolshed + +ptesttoolshed_update: dist/$(REPOS_NAME)/ planemo-venv/bin/planemo + . planemo-venv/bin/activate && cd $< && planemo shed_update --check_diff --shed_target testtoolshed + +ptoolshed_diff: dist/$(REPOS_NAME)/ planemo-venv/bin/planemo + . planemo-venv/bin/activate && cd $< && planemo shed_diff --shed_target toolshed + +ptoolshed_update: dist/$(REPOS_NAME)/ planemo-venv/bin/planemo + . planemo-venv/bin/activate && cd $< && planemo shed_update --check_diff --shed_target toolshed + +clean: + $(RM) -r $(HOME)/.planemo + $(RM) -r planemo-venv + make -C test $@ + $(RM) tool_test_output.* + $(RM) -r dist + +.PHONY: all clean test planemolint planemotest diff --git a/tools/isa-extractor/README.md b/tools/isa-extractor/README.md new file mode 100644 index 0000000000..69d55c15e2 --- /dev/null +++ b/tools/isa-extractor/README.md @@ -0,0 +1,12 @@ +# ISA extractor + +[![Build Status](https://travis-ci.org/workflow4metabolomics/isa-extractor.svg?branch=master)](https://travis-ci.org/workflow4metabolomics/isa-extractor) + +Extract collections of raw data files (mzML, mzXML, netCDF, mzData or nmrML) from an ISA study. + +## Updates + +### 1.3.0 + + * Wrote planemo tests for all tools. + * Run tests in Travis-CI. diff --git a/tools/isa-extractor/extract-from-isa b/tools/isa-extractor/extract-from-isa new file mode 100644 index 0000000000..bb750d7a2b --- /dev/null +++ b/tools/isa-extractor/extract-from-isa @@ -0,0 +1,130 @@ +#!/bin/bash +# vi: fdm=marker + +# Constants {{{1 +################################################################ + +PROG_NAME=$(basename $0) +PROG_PATH=$(dirname $0) +YES=yes +NO=no + +# Global variables {{{1 +################################################################ + +DEBUG=0 +EXT= +INPUT_DIR= +OUTPUT_DIR= +SYMLINK=$NO + +# Print help {{{1 +################################################################ + +function print_help { + echo "Usage: $PROG_NAME -i -e -o " + echo + echo "Extract files with a given extension from ISA-Tab archives into a collection." + echo + echo "Options:" + echo " -e, --ext EXT The extension of the files to find." + echo " -h, --help Print this help message." + echo " -i, --input DIR Input directory containing ISA archive." + echo " -o, --output DIR Set the output directory to use." + echo " -s, --symlink Create symbolic links instead of copying files." +} + +# Error {{{1 +################################################################ + +function error { + + local msg=$1 + + echo "ERROR: $msg" >&2 + + exit 1 +} + +# Print debug msg {{{1 +################################################################ + +function print_debug_msg { + + local dbglvl=$1 + local dbgmsg=$2 + + [ $DEBUG -ge $dbglvl ] && echo "[DEBUG] $dbgmsg" >&2 +} + +# Read args {{{1 +################################################################ + +function read_args { + + local args="$*" # save arguments for debugging purpose + + # Read options + while true ; do + shift_count=1 + case $1 in + -e|--ext) EXT="$2" ; shift_count=2 ;; + -g|--debug) DEBUG=$((DEBUG + 1)) ;; + -h|--help) print_help ; exit 0 ;; + -i|--input) INPUT_DIR="$2" ; shift_count=2 ;; + -o|--output) OUTPUT_DIR="$2" ; shift_count=2 ;; + -s|--symlink) SYMLINK=$YES ;; + -) error "Illegal option $1." ;; + --) error "Illegal option $1." ;; + --*) error "Illegal option $1." ;; + -?) error "Unknown option $1." ;; + -[^-]*) split_opt=$(echo $1 | sed 's/^-//' | sed 's/\([a-zA-Z]\)/ -\1/g') ; set -- $1$split_opt "${@:2}" ;; + *) break + esac + shift $shift_count + done + shift $((OPTIND - 1)) + + # Debug + print_debug_msg 1 "Arguments are : $args" + + # Check input params + [[ $# -eq 0 ]] || error "No remaining arguments are allowed." + [[ -n $INPUT_DIR ]] || error "You must specify an input directory, using -i option." + [[ -d $INPUT_DIR ]] || error "\"$INPUT_DIR\" is not a valid directory." + [[ -n $OUTPUT_DIR ]] || error "You must specify an output directory, using -o option." + [[ ! -e $OUTPUT_DIR ]] || error "\"$OUTPUT_DIR\" already exists." + [[ -n $EXT ]] || error "You must specify the extension of the files you are looking for, with the -e option." +} + +# MAIN {{{1 +################################################################ + +read_args "$@" + +# Create output directory +print_debug_msg 1 "Create output directory \"$OUTPUT_DIR\"." +mkdir -p "$OUTPUT_DIR" + +# Find files to extract +print_debug_msg 1 "Find \"$EXT\" files to extract in \"$INPUT_DIR\"." +files_to_extract=$(mktemp -t tmp.XXXXXX) +find "$(realpath $INPUT_DIR)" -iname "*.$EXT" >files_to_extract +print_debug_msg 1 "Files to extract:" +if [[ $DEBUG -ge 1 ]] ; then + cat files_to_extract >&2 +fi + +# Extract files +if [[ $SYMLINK == $YES ]] ; then + print_debug_msg 1 "Create symbolic links of all \"$EXT\" files to extract into \"$OUTPUT_DIR\"." + xargs -I % ln -s % "$OUTPUT_DIR" &2 +fi diff --git a/tools/isa-extractor/isa-extractor.Rproj b/tools/isa-extractor/isa-extractor.Rproj new file mode 100644 index 0000000000..a4174e8435 --- /dev/null +++ b/tools/isa-extractor/isa-extractor.Rproj @@ -0,0 +1,18 @@ +Version: 1.0 + +RestoreWorkspace: Default +SaveWorkspace: Default +AlwaysSaveHistory: Default + +EnableCodeIndexing: Yes +UseSpacesForTab: Yes +NumSpacesForTab: 2 +Encoding: UTF-8 + +RnwWeave: Sweave +LaTeX: pdfLaTeX + +AutoAppendNewline: Yes +StripTrailingWhitespace: Yes + +BuildType: Makefile diff --git a/tools/isa-extractor/isa2mzdata.xml b/tools/isa-extractor/isa2mzdata.xml new file mode 100644 index 0000000000..cdf7a67b42 --- /dev/null +++ b/tools/isa-extractor/isa2mzdata.xml @@ -0,0 +1,77 @@ + + + + Extract mzData files from an ISA dataset and output a collection of mzData dataset. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +==================== +ISA to mzData +==================== + +Extract mzData files contained inside an ISA archive. + +----- +Input +----- + +ISA dataset +=========== + +The ISA-Tab dataset from which to extract the files. + +------ +Output +------ + +The output is a collection of mzData files. + + + + + + + 10.1038/ng.1054 + 10.1093/bioinformatics/btu813 + + + diff --git a/tools/isa-extractor/isa2mzml.xml b/tools/isa-extractor/isa2mzml.xml new file mode 100644 index 0000000000..e3556d75ff --- /dev/null +++ b/tools/isa-extractor/isa2mzml.xml @@ -0,0 +1,77 @@ + + + + Extract mzML files from an ISA dataset and output a collection of mzML dataset. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +==================== +ISA to mzML +==================== + +Extract mzML files contained inside an ISA archive. + +----- +Input +----- + +ISA dataset +=========== + +The ISA-Tab dataset from which to extract the files. + +------ +Output +------ + +The output is a collection of mzML files. + + + + + + + 10.1038/ng.1054 + 10.1093/bioinformatics/btu813 + + + diff --git a/tools/isa-extractor/isa2mzxml.xml b/tools/isa-extractor/isa2mzxml.xml new file mode 100644 index 0000000000..04816b9bcc --- /dev/null +++ b/tools/isa-extractor/isa2mzxml.xml @@ -0,0 +1,77 @@ + + + + Extract mzXML files from an ISA dataset and output a collection of mzXML dataset. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +==================== +ISA to mzXML +==================== + +Extract mzXML files contained inside an ISA archive. + +----- +Input +----- + +ISA dataset +=========== + +The ISA-Tab dataset from which to extract the files. + +------ +Output +------ + +The output is a collection of mzXML files. + + + + + + + 10.1038/ng.1054 + 10.1093/bioinformatics/btu813 + + + diff --git a/tools/isa-extractor/isa2netcdf.xml b/tools/isa-extractor/isa2netcdf.xml new file mode 100644 index 0000000000..a165b7fb77 --- /dev/null +++ b/tools/isa-extractor/isa2netcdf.xml @@ -0,0 +1,77 @@ + + + + Extract netCDF files from an ISA dataset and output a collection of netCDF dataset. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +==================== +ISA to netCDF +==================== + +Extract netCDF files contained inside an ISA archive. + +----- +Input +----- + +ISA dataset +=========== + +The ISA-Tab dataset from which to extract the files. + +------ +Output +------ + +The output is a collection of netCDF files. + + + + + + + 10.1038/ng.1054 + 10.1093/bioinformatics/btu813 + + + diff --git a/tools/isa-extractor/isa2nmrml.xml b/tools/isa-extractor/isa2nmrml.xml new file mode 100644 index 0000000000..9bdf673622 --- /dev/null +++ b/tools/isa-extractor/isa2nmrml.xml @@ -0,0 +1,77 @@ + + + + Extract nmrML files from an ISA dataset and output a collection of nmrML dataset. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +==================== +ISA to nmrML +==================== + +Extract nmrML files contained inside an ISA archive. + +----- +Input +----- + +ISA dataset +=========== + +The ISA-Tab dataset from which to extract the files. + +------ +Output +------ + +The output is a collection of nmrML files. + + + + + + + 10.1038/ng.1054 + 10.1093/bioinformatics/btu813 + + + diff --git a/tools/isa-extractor/test-data/mzdata_study.zip b/tools/isa-extractor/test-data/mzdata_study.zip new file mode 100644 index 0000000000000000000000000000000000000000..3fbc2cf8c38044a560af2205d4fd966d71017ab1 GIT binary patch literal 340 zcmWIWW@h1H0D;d@8UbJil;B~IVMxs_D5=!Tt#U~$Nem6)WME#kRy3||ooHNX1vdjD z%bQwe29_7h3=9DXQ&Le)5eAx)8Sj}_mRekrnVwjZnV+XuQc(gnEb5?W90+3=#>gbc zjLT6Ha5pwIf|#gIWQ8~ppNSX_L^jb4Xd+hU0u9FMR8}^SBbb12HISYR;xGUJ(St$c literal 0 HcmV?d00001 diff --git a/tools/isa-extractor/test-data/mzdata_study_output/empty.mzData b/tools/isa-extractor/test-data/mzdata_study_output/empty.mzData new file mode 100644 index 0000000000..e69de29bb2 diff --git a/tools/isa-extractor/test-data/mzml_study.zip b/tools/isa-extractor/test-data/mzml_study.zip new file mode 100644 index 0000000000000000000000000000000000000000..d5f9f0532651e930c3240c1bb1f058c815427ef9 GIT binary patch literal 336 zcmWIWW@h1H0D;CdjQ}tMN^mjAFr?-dlvL{FR{8pbhHx@4Cmj-v1L4vNZU#n{H?_OpDX1r%!S!!`fW_n^tW`3StNks|Ru#`ihaSMPL!!SlBIc8jL yl7Kt0p%KJHaUmTwQdIE^U002G*JQ4r^ literal 0 HcmV?d00001 diff --git a/tools/isa-extractor/test-data/netcdf_study_output/empty.CDF b/tools/isa-extractor/test-data/netcdf_study_output/empty.CDF new file mode 100644 index 0000000000..e69de29bb2 diff --git a/tools/isa-extractor/test-data/nmrml_study.zip b/tools/isa-extractor/test-data/nmrml_study.zip new file mode 100644 index 0000000000000000000000000000000000000000..11e47ab8bf5ac2db16fda6271173f448c519bc17 GIT binary patch literal 338 zcmWIWW@h1H00HlGjQ}tMN^mpCFr?-dlvL{F*szpCqHzm=7{f3|COKwY zZjyjIv7r&fL~$W2#D#ba#B?9Bfv!LUvAPy$FvztS2D7q(+`t5ctAO+*5QhN(KWjiX literal 0 HcmV?d00001 diff --git a/tools/isa-extractor/test-data/nmrml_study_output/empty.nmrML b/tools/isa-extractor/test-data/nmrml_study_output/empty.nmrML new file mode 100644 index 0000000000..e69de29bb2 diff --git a/tools/isa-extractor/test/.gitignore b/tools/isa-extractor/test/.gitignore new file mode 100644 index 0000000000..040e00c030 --- /dev/null +++ b/tools/isa-extractor/test/.gitignore @@ -0,0 +1,3 @@ +*_extract +mtbls291-mzmls +fake_mzml_study_extract_symlinks diff --git a/tools/isa-extractor/test/Makefile b/tools/isa-extractor/test/Makefile new file mode 100644 index 0000000000..7655a25e79 --- /dev/null +++ b/tools/isa-extractor/test/Makefile @@ -0,0 +1,7 @@ +all: + ./test-extract-from-isa + +clean: + $(RM) -r *_extract + +.PHONY: all clean diff --git a/tools/isa-extractor/test/res/empty_study/__EMPTY_FOLDER__ b/tools/isa-extractor/test/res/empty_study/__EMPTY_FOLDER__ new file mode 100644 index 0000000000..e69de29bb2 diff --git a/tools/isa-extractor/test/res/fake_case_insensitive_mzml_study/empty1.mzML b/tools/isa-extractor/test/res/fake_case_insensitive_mzml_study/empty1.mzML new file mode 100644 index 0000000000..e69de29bb2 diff --git a/tools/isa-extractor/test/res/fake_case_insensitive_mzml_study/empty2.mzml b/tools/isa-extractor/test/res/fake_case_insensitive_mzml_study/empty2.mzml new file mode 100644 index 0000000000..e69de29bb2 diff --git a/tools/isa-extractor/test/res/fake_case_insensitive_mzml_study/empty3.MZML b/tools/isa-extractor/test/res/fake_case_insensitive_mzml_study/empty3.MZML new file mode 100644 index 0000000000..e69de29bb2 diff --git a/tools/isa-extractor/test/res/fake_mzdata_study/empty.mzData b/tools/isa-extractor/test/res/fake_mzdata_study/empty.mzData new file mode 100644 index 0000000000..e69de29bb2 diff --git a/tools/isa-extractor/test/res/fake_mzml_study/empty.mzML b/tools/isa-extractor/test/res/fake_mzml_study/empty.mzML new file mode 100644 index 0000000000..e69de29bb2 diff --git a/tools/isa-extractor/test/res/fake_mzxml_study/empty.mzXML b/tools/isa-extractor/test/res/fake_mzxml_study/empty.mzXML new file mode 100644 index 0000000000..e69de29bb2 diff --git a/tools/isa-extractor/test/res/fake_netcdf_study/empty.CDF b/tools/isa-extractor/test/res/fake_netcdf_study/empty.CDF new file mode 100644 index 0000000000..e69de29bb2 diff --git a/tools/isa-extractor/test/res/fake_nmrml_study/empty.nmrML b/tools/isa-extractor/test/res/fake_nmrml_study/empty.nmrML new file mode 100644 index 0000000000..e69de29bb2 diff --git a/tools/isa-extractor/test/test-extract-from-isa b/tools/isa-extractor/test/test-extract-from-isa new file mode 100644 index 0000000000..2ff11daa72 --- /dev/null +++ b/tools/isa-extractor/test/test-extract-from-isa @@ -0,0 +1,80 @@ +#!/bin/bash + +# Constants {{{1 +################################################################ + +PROG_NAME=$(basename $0) +PROG_PATH=$(dirname $0) +RES_PATH=$PROG_PATH/res + +# Error {{{1 +################################################################ + +function error { + + local msg=$1 + + echo "ERROR: $msg" >&2 + + exit 1 +} + +# Test study {{{1 +################################################################ + +function test_study { + local study_name=$1 + local ext=$2 + local n_expected_files=$3 + local input_path="$PROG_PATH/res/${study_name}" + local output_path="$PROG_PATH/${study_name}_extract" + + # Remove existing output + rm -rf "$output_path" + + # Call program + "$PROG_PATH/../extract-from-isa" -i "$input_path" -o "$output_path" -e $ext || exit 1 + + # Check output + local n_files=$(ls "$output_path/" | wc -l) + local n_right_ext_files=$(find "$output_path" -iname "*.$ext" | wc -l) + [[ $n_files -eq $n_expected_files ]] || error "Error while extracting $ext files from $study_name. Extracted $n_files instead of $n_expected_files." + [[ $n_files -eq $n_right_ext_files ]] || error "Error while extracting $ext files from $study_name. $n_right_ext_files extracted files have the right extension. Was expecting $n_expected_files." +} + +# Test symbolic links {{{1 +################################################################ + +test_symlinks() { + + local study_name=fake_mzml_study + local ext=mzML + local n_expected_files=1 + local input_path="$PROG_PATH/res/${study_name}" + local output_path="$PROG_PATH/${study_name}_extract_symlinks" + + # Remove existing output + rm -rf "$output_path" + + # Call program + "$PROG_PATH/../extract-from-isa" -i "$input_path" -o "$output_path" -e $ext -s || exit 1 + + # Check output + local n_files=$(ls "$output_path/" | wc -l) + [[ $n_files -eq $n_expected_files ]] || error "Error while extracting $ext files from $study_name. Extracted $n_files instead of $n_expected_files." + extracted_file=$(ls "$output_path/") + [[ -L $output_path/$extracted_file ]] || error "Extracted file $output_path/$extracted_file is not a symbolic link." +} + +# MAIN {{{1 +################################################################ + +# Test on different studies +test_study empty_study mzML 0 +test_study fake_mzml_study mzML 1 +test_study fake_mzdata_study mzData 1 +test_study fake_mzxml_study mzXML 1 +test_study fake_nmrml_study nmrML 1 +test_study fake_netcdf_study CDF 1 +test_study fake_case_insensitive_mzml_study mzML 3 +test_symlinks