-
Notifications
You must be signed in to change notification settings - Fork 555
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add git workflow to test study import export
- Loading branch information
Showing
8 changed files
with
614 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
#!/bin/bash | ||
|
||
# exit when any of these fails | ||
set -e | ||
|
||
run_in_service() { | ||
service=$1 | ||
shift | ||
docker-compose -f docker-compose.yml -f $PORTAL_SOURCE_DIR/test/integration/docker-compose-localbuild.yml \ | ||
run --rm \ | ||
"$service" bash -c "$@" | ||
return $? # return the exit code of the last command | ||
} | ||
|
||
echo "Importing of the test study with API validation..." | ||
run_in_service cbioportal 'metaImport.py -v -u http://cbioportal-container:8080 -o -s /cbioportal/test/test_data/study_es_0_import_export/' | ||
|
||
echo "Exporting of the test study." | ||
run_in_service cbioportal 'curl -s http://cbioportal-container:8080/export/study/study_es_0_import_export.zip | unzip -d ./output_study_es_0_import_export -' | ||
|
||
echo "Comparing the original and exported studies." | ||
# TODO ignore order of lines in files | ||
run_in_service cbioportal 'diff --recursive /cbioportal/test/test_data/study_es_0_import_export/ ./output_study_es_0_import_export' | ||
|
||
exit 0 |
5 changes: 5 additions & 0 deletions
5
test/test_data/study_es_0_import_export/case_lists/cases_sequenced.txt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
cancer_study_identifier: study_es_0_import_export | ||
stable_id: study_es_0_import_export_sequenced | ||
case_list_name: Samples profiled for mutations | ||
case_list_description: This is this case list that contains all samples that are profiled for mutations. | ||
case_list_ids: TCGA-A2-A04P-01 TCGA-A1-A0SK-01 TCGA-A2-A0CM-01 TCGA-AR-A1AR-01 TCGA-B6-A0WX-01 TCGA-BH-A1F0-01 TCGA-B6-A0I6-01 TCGA-BH-A18V-01 TCGA-BH-A18K-01 TCGA-BH-A0HL-01 TCGA-BH-A0E0-01 TCGA-A1-A0SB-01 TCGA-A1-A0SB-02 TEST_SAMPLE_1 TEST_SAMPLE_2 TEST_SAMPLE_3 TEST_SAMPLE_4 TEST_SAMPLE_15 TEST_SAMPLE_SOMATIC_HOMOZYGOUS TEST_SAMPLE_SOMATIC_HETEROZYGOUS TEST_SAMPLE_SOMATIC_UNDEFINED |
Oops, something went wrong.