thehyve / cbioportal-docker

A context to create cBioPortal docker images
7 stars 18 forks source link

Error removing study from cBioportal #51

Closed lakhujanivijay closed 5 years ago

lakhujanivijay commented 5 years ago

I am trying to remove data from cbioportal which I have installed using docker container.

I am running below command (not sure if that is the correct command) and it says that it could not find the file; when the fact remains that the file is indeed present at this location.

bioinfo@bioinfo-pc:~/Desktop$ docker run -it --rm --net cbio-net \
>     -v "$PWD/portal.properties:/cbioportal/portal.properties:ro" \
>     thehyve/cbioportal:v2.0.1-iss5758 \
>     cbioportalImporter.py \
>         -c remove-study \
>         -meta /home/bioinfo/Desktop/meta_study.txt 

Data loading step using /cbioportal/scripts/target/scripts-2.0.1-SNAPSHOT.jar

Checked DB schema version: (expected: 2.7.3) (found: 2.7.3)
meta-file cannot be found: /home/bioinfo/Desktop/meta_study.txt

I checked that the file is present at this location

bioinfo@bioinfo-pc:~/Desktop$ ls /home/bioinfo/Desktop | fold
case_lists
data_clinical_patient.txt
data_clinical_sample.txt
data_log2CNA.txt
meta_clinical_patient.txt
meta_clinical_sample.txt
meta_CNA_log2.txt
meta_study.txt

Any help is highly appreciated!

pvannierop commented 5 years ago

The problem is that the file /home/bioinfo/Desktop/meta_study.txt is not known inside the docker container. The solution would be to mount the file (with -v flag) and pass the mounted file to the python script as this:

docker run -it --rm --net cbio-net \
     -v "$PWD/portal.properties:/cbioportal/portal.properties:ro" \
     -v "/home/bioinfo/Desktop/meta_study.txt:/metafiles/meta_study.txt" \
     thehyve/cbioportal:v2.0.1-iss5758 \
     cbioportalImporter.py \
         -c remove-study \
         -meta /metafiles/meta_study.txt 
lakhujanivijay commented 5 years ago

@pvannierop , thanks for the super-fast response. That really solved the problem. Thank you so much! Highly appreciated.