Open MrLocuace opened 8 months ago
I'd blindly guess that you don't need to --bind anything, and it should work. If not - start with
apptainer exec Demuxafy.sif pwd # show current dir in container
apptainer exec Demuxafy.sif ls # show content of current dir
But if you do want to --bind, your paths inside should be -v /tmp/souporcell/batch1.MAF0.05.vcf.gz, and right now it is /tmp/$DIR1/souporcell/batch1.MAF0.05.vcf.gz ; also script should be python /tmp/Demuxalot.py
I've never tried apptainer, in case advice above does not help, better ask for help from demuxafy authors.
Hi @arogozhnikov, Thank you for your reply. Unfortunately, your suggestions did not work. I get the same error message all the time.
[me@midway3-login3 scrna]$ apptainer exec Demuxafy.sif pwd /home/me [me@midway3-login3 scrna]$ apptainer exec Demuxafy.sif ls R RtmpHkYF2q RtmpM5ugYe RtmpTi73Rg authorized_keys cellranger_count1.sbatch include perl5 thindrives RtmpACNEOR RtmpLYUF84 RtmpMfuEoa Rtmpc673Mn bin customize_env.sh lib share
yup, so current folder in container clearly does not contain files that you expect it to contain - so you confirmed apptainer does not work as you expect it to.
Hi @arogozhnikov,
I am trying running the script below. I have both Demuxalot.py and Demuxalot.sif in this dir: /project/PI/USERS/me/czi/data/scrna, which is located upstream of all input files.
!/bin/bash
###########################################
SBATCH --time=34:00:00
SBATCH --partition=PI
SBATCH --account=pi-lb
SBATCH --mem=120G
SBATCH --nodes=1
SBATCH --ntasks=1
SBATCH --cpus-per-task=12
SBATCH --output=/project/PI/USERS/me/czi/data/scrna/demuxalot/demuxalot-%j.out
SBATCH --error=/project/PI/USERS/me/czi/data/scrna/demuxalot/demuxalot-%j.err
###########################################
module load apptainer/1.1.4
cd /project/PI/USERS/me/czi/data/scrna
DIR1=/project/PI/USERS/me/czi/data/scrna BATCH=${1} SAMPLE=$(echo "$BATCH")
SAMPLE=$(echo "$BATCH" | cut -d"_" -f1)
BARCODES=$DIR1/cellranger/${SAMPLE}_OUT/outs/filtered_feature_bc_matrix/barcodes.tsv BAM=$DIR1/cellranger/${SAMPLE}_OUT/outs/possorted_genome_bam.bam INDS=$DIR1/demuxalot/indvs_batch1.txt VCF=$DIR1/souporcell/batch1.MAF0.05.vcf.gz DEMUXALOT_OUTDIR=$DIR1/demuxalot/${SAMPLE}_OUT
apptainer exec --bind $DIR1:/tmp Demuxafy.sif python Demuxalot.py \ -b /tmp/$BARCODES \ -a /tmp/$BAM \ -n /tmp/$INDS \ -v /tmp/$VCF \ -o /tmp/$DEMUXALOT_OUTDIR \ -r True
But I get this error:
/opt/conda/envs/py37/bin/python: can't open file 'Demuxalot.py': [Errno 2] No such file or directory
Please help