AmpliconArchitect icon indicating copy to clipboard operation
AmpliconArchitect copied to clipboard

Results owned by root

Open MrDotOne opened this issue 2 years ago • 5 comments

Finally got AA setup on a pretty beefy server and when i run the docker script i notice that the results are written as root. This may be a silly question but is there a way that the results can be written as the user running the script?

MrDotOne avatar Jul 07 '22 01:07 MrDotOne

Hi,

Yes - we can add an argument to make this choice possible. In the meantime though, one can make a small modification to the docker runscript for AA (or PrepareAA)

In run_aa_docker.sh, modify the last 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

to instead include docker run -u `id -u $USER` --rm -e AA_DATA_REPO= ....

I suppose the alternative is to chown and chgrp all the newly created files at the end of the docker run.

Jens

jluebeck avatar Jul 07 '22 16:07 jluebeck

Thank you for your prompt response. I will check that out immediately, thank you.

MrDotOne avatar Jul 07 '22 20:07 MrDotOne

I added -u id -u $USER:id -g $USER`` to the run command and it works well.

MrDotOne avatar Jul 07 '22 20:07 MrDotOne

Awesome - good luck with the analyses and let us know if you have any questions. We have wrapped the data pre-processing and post-processing (amplicon classification) steps into a wrapper called PrepareAA which may be of interest.

Jens

jluebeck avatar Jul 07 '22 21:07 jluebeck

I saw that, thank you, and was checking it out. I am actually building this for a researcher who wanted to run this on their Mac laptop.

MrDotOne avatar Jul 08 '22 00:07 MrDotOne