Epigenomics-Screw / Screw

SCREW: A Reproducible Workflow for Single-Cell Epigenomics
MIT License
7 stars 7 forks source link

Error running pairwise-distance.sh from inside docker (pairwise-distance.cwl) #35

Closed jjonphl closed 6 years ago

jjonphl commented 6 years ago

I get the error below when running pairwise-distance.cwl:

/home/ubuntu/Screw/bin/pairwise-distance.sh: line 19: GSM2324500_CMP_1_D2_13_R1.txt.scwgbs.meth.sym.tojoin: Read-only file system

The problem is the script changes directory to $indir, which is mounted as readonly

The docker command:

[job distanceMatrix] /Users/jon/work/bio/hackseq-2017/hack/Farlik_2016_Example/docker_tmp/tmpfj4czwrq$ docker \
    run \
    -i \
    ...
    --volume=/Users/jon/work/bio/hackseq-2017/hack/Farlik_2016_Example/subset2:/private/var/lib/cwl/stg3e0b2100-42c0-4eaf-8b1f-bb90059393dd/subset2:ro \
    ...
    pairwise-distance.sh \
    -i \
    /private/var/lib/cwl/stg3e0b2100-42c0-4eaf-8b1f-bb90059393dd/subset2 > /Users/jon/work/bio/hackseq-2017/hack/Farlik_2016_Example/docker_tmp/tmpfj4czwrq/pairwise-euc.txt

In pairwise-distance.sh:

cd ${indir};
...
for i in *.sym; do
    awk '{print $1 ":" $2 "\t" $5}' ${i} | sort -k 1b,1 > ${i}.tojoin;
    ...
done;
...
oneillkza commented 6 years ago

Yes, it should be sending the output to $outdir, not attempting to write to $indir. @jjonphl would you be willing to work on this? It would be a pretty good CWL practice exercise.

You should also check that clustering.cwl still works after that.

jjonphl commented 6 years ago

Yes will do. I have the fix already, still need to test with clustering.cwl. I'm testing it on Farlik_2016_Example, but it's failing on pairwise-euc-heatmap.cwl. I think heatmap.txt there needs to be updated (some files are not in the mapping).

oneillkza commented 6 years ago

Great! I'm not 100% sure clustering.cwl actually currently works -- I'm still fiddling with getting it to work correctly with the scatter/gather functionality.