AmpliconSuite / AmpliconSuite-pipeline

A quickstart tool for AmpliconArchitect. Performs all preliminary steps (alignment, CNV calling, seed interval detection) required prior to running AmpliconArchitect. Previously called PrepareAA.
Other
58 stars 28 forks source link

please update ampliconarchitect docker image #31

Closed ryao-mdanderson closed 1 year ago

ryao-mdanderson commented 1 year ago

Dear @jluebeck:

Thank you for providing the research community for this application.

We would like to request a new docker image of ampliconarchitect with a slight change but makes it working to invoke running run_aa_script.sh outside of the container.


The following is a summary what my colleague did:

Follow the Singularity container for AmpliconArchitect. Instructions at

https://github.com/jluebeck/AmpliconArchitect#obtain-ampliconarchitect-image-and-execution-script

say the following:

1. Pull docker image:
    docker pull jluebeck/ampliconarchitect

2. Clone script run_aa_docker.sh from Github:
    git clone https://github.com/jluebeck/AmpliconArchitect.git

so I have done the following on a linux server:

singularity pull ampliconarchitect.sif docker://jluebeck/ampliconarchitect

git clone https://github.com/jluebeck/AmpliconArchitect.git

For running AmpliconArchitect, instructions at

https://github.com/jluebeck/AmpliconArchitect#2-usage

say the following:

2) Usage:

$AA --bam {input_bam} --bed {bed file} --out {prefix_of_output_files} <optional arguments>

The execution script $AA is provided within the Github source code and the exact path depends on the installation option used:

    Docker image: AA=AmpliconArchitect/docker/run_aa_docker.sh
    Github source: AA=python2 AmpliconArchitect/src/AmpliconArchitect.py

Script ``AmpliconArchitect/docker/run_aa_docker.sh'' performs a lot of setup work and ends with the following line:

docker run --rm -e AA_DATA_REPO=/home/data_repo -e argstring="$argstring" \
           -v $AA_DATA_REPO:/home/data_repo -v $BAM_DIR:/home/bam_dir \
           -v $BED_DIR:/home/bed_dir -v $OUT_DIR:/home/output \
           -v $MOSEKLM_LICENSE_FILE:/home/programs/mosek/8/licenses \
           virajbdeshpande/ampliconarchitect bash /home/run_aa_script.sh

Note that it ends with ``bash /home/run_aa_script.sh''. If I try to run that script, I see the following:

$ singularity run ampliconarchitect.sif /home/run_aa_script.sh
python2: can't open file 'programs/AmpliconArchitect-master/src/AmpliconArchitect.py': [Errno 2] No such file or directory

If I go into the Singularity container, I can do the following:

$ singularity exec ampliconarchitect.sif /bin/bash

Singularity> bash /home/run_aa_script.sh
python2: can't open file 'programs/AmpliconArchitect-master/src/AmpliconArchitect.py': [Errno 2] No such file or directory

Singularity> cd /home

Singularity> ls -l
.....
drwxr-xr-x  2 root     root     3 Oct 17 12:35 input
drwxr-xr-x  2 root     root     3 Oct 17 12:35 output
drwxr-xr-x  4 root     root   144 Oct 17 12:36 programs
drwxr-xr-x  2 root     root    44 Oct 17 12:27 requirements
-rwxrwxr-x  1 root     root   221 Apr 12  2022 run_aa_script.sh

Singularity> bash run_aa_script.sh
usage: AmpliconArchitect.py [-h] --bed FILE --bam FILE -o FILE [--runmode STR]
                            [--extendmode STR] [--sensitivems STR]
                            [--plotstyle STR] --ref STR [--downsample FLOAT]
                            [--cbam FILE] [--cbed FILE] [--insert_sdevs FLOAT]
                            [--pair_support_min INT] [--no_cstats]
                            [--random_seed] [-v]
AmpliconArchitect.py: error: argument --bed is required

So this works interactively within the container but not when invoked from outside the container. Here is script ``run_aa_script.sh'':

#!/bin/bash
AA_DATA_REPO=/home/data_repo
export AA_DATA_REPO
MOSEKLM_LICENSE_FILE=/home/programs/mosek/8/licenses
export MOSEKLM_LICENSE_FILE

python2 programs/AmpliconArchitect-master/src/AmpliconArchitect.py $argstring

If the user is in container directory /home and invokes shell script run_aa_script.sh'', the script looks in adjacent directoryprograms'' for Python script `` AmpliconArchitect.py'' (it is there; I checked), and executes it.

I created a modified version of ``run_aa_script.sh'' in container directory /tmp (/home is read-only) that changed the last line to be the following:

python2 /home/programs/AmpliconArchitect-master/src/AmpliconArchitect.py $argstring

and that works from outside /home:

Singularity> cd /tmp
Singularity> ./run_aa_script.sh
usage: AmpliconArchitect.py [-h] --bed FILE --bam FILE -o FILE [--runmode STR]
                            [--extendmode STR] [--sensitivems STR]
                            [--plotstyle STR] --ref STR [--downsample FLOAT]
                            [--cbam FILE] [--cbed FILE] [--insert_sdevs FLOAT]
                            [--pair_support_min INT] [--no_cstats]
                            [--random_seed] [-v]
AmpliconArchitect.py: error: argument --bed is required

**** end of what my colleague have tried.

If you can help with a slightly modified version of script ``run_aa_script.sh'' to put the absolute path to to AmpliconArchitect.py, then upload this new image to docker site, that will be very helpful.

Thank you for your help!

ryao-mdanderson commented 1 year ago

Dear @jluebeck @edwin5588: May you please look into the above issue report? Thank you for your help.

Regards, Rong Yao

jluebeck commented 1 year ago

Hi Rong,

Thank you for your message - I have updated the script and will update the hosted docker images in the next day or so. I will mark this issue closed when the process is completed.

Thank you, Jens

ryao-mdanderson commented 1 year ago

Dear Jens,

Great! Thank you very much for your help!

Rong

jluebeck commented 1 year ago

Hi Rong,

Issue updated in 373f689, please let me know if there are additional issues.

Thanks, Jens

ryao-mdanderson commented 1 year ago

Hi Jens,

We use the image that hosted in docker hub. I am checking https://hub.docker.com/r/jluebeck/ampliconarchitect, seems it was updated 3 months ago. Please kindly update an updated docker image so that we can directly pull from.

Thank you for your help! Rong

ryao-mdanderson commented 1 year ago

Good morning Jens:

We notice at hub.docker.com, the container for AmpliconSuite-pipeline (jluebeck/prepareaa) was updated several hours ago, just wondering, how it relates to docker image https://hub.docker.com/r/jluebeck/ampliconarchitect? Thanks for your help!

Regards, Rong

jluebeck commented 1 year ago

Got it - sorry for the confusion. I have now also updated the jluebeck/ampliconarchitect image as well. The AmpliconSuite-pipeline docker image contains the latest version of AmpliconArchitect, but now both are updated to the most recent versions.

ryao-mdanderson commented 1 year ago

Hello Jens:

Awesome! Thank you very much.

Regards, Rong

jingydz commented 9 months ago

[root@login-0 dockerfiles]# singularity pull ampliconarchitect.sif docker://jluebeck/ampliconarchitect FATAL: While making image from oci registry: error fetching image to cache: failed to get checksum for docker://jluebeck/ampliconarchitect: reading manifest latest in docker.io/jluebeck/ampliconarchitect: requested access to the resource is denied

Has anyone met this error?

jluebeck commented 9 months ago

Hi, this is the preferred way to get the AmpliconArchitect via singularity:

singularity pull library://jluebeck/ampliconsuite-pipeline/ampliconsuite-pipeline

We have packaged AmpliconArchitect with AmpliconSuite and this is how users should get the latest versions. Please let me know if you continue to run into issues or need some other functionality to accomplish your goals.

Thanks, Jens

yonatans2 commented 4 months ago

I'm getting this issue:

[feshap@docker02 ~]$ singularity pull library://jluebeck/ampliconsuite-pipeline/ampliconsuite-pipeline
FATAL:   While pulling library image: error fetching image: image does not exist in the library: jluebeck/ampliconsuite-pipeline/ampliconsuite-pipeline:latest (amd64)

How do I know if the problem's local or remote? Thanks

jluebeck commented 4 months ago

Thanks for reaching out. I had forgotten to tag this image as 'latest'. The command is functional now.