bcgsc / xmatchview

🗻 Visualization of genome/gene sequence synteny
GNU General Public License v3.0
36 stars 7 forks source link

dockefile build of v1.2.3 #9

Closed keiranmraine closed 4 years ago

keiranmraine commented 4 years ago

I've created a docker file which automatically add the fonts and exposes them via an env variable.

Running this shows that the test case doesn't exit with a 0 exit code (standard for success) when using runCompareTwoGenomesColinear.sh.

docker build .
docker run -ti --rm -v $PWD:/data $(docker images -q | head -n 1) bash
# in container
cd /data && cp /opt/xmatchview/tests/test/* .
runCompareTwoGenomesColinear.sh FTL1_pa.fa FTL1_ss.fa 200 90 10 2 2 FTL1_pa.gff FTL1_ss.gff minimap2 .
...
2374 out of 2375
done.
Drawing repeats...
JN039333.1_Picea_abies (50-1213) hits KT263970.1_Picea_sitchensis  ::  mismatch 27.66 target(90)  block 1181 target (10) 
JN039333.1_Picea_abies (386-650) hits KT263970.1_Picea_sitchensis  ::  mismatch 60.79 target(90)  block 291 target (10) 
Saving xmv-FTL1_pa.fa_vs_FTL1_ss.fa.paf_m90_b10_r2_c2.png...
done.
$ echo $?
1

I've made some minor modifications to runCompareTwoGenomesColinear.sh to test for programs and use the preinstalled fonts.

keiranmraine commented 4 years ago

Image generated using the above approach

xmv-FTL1_pa fa_vs_FTL1_ss fa paf_m90_b10_r2_c2

keiranmraine commented 4 years ago

I wasn't completely clear on how this repository was structured with all the subfolders (you don't really need them under git).

The docker file builds the content of the v1.2.3 directory, so it would probably need modification if I've misinterpreted the structure.

lcoombe commented 4 years ago

Yes, I see your point -- When Rene makes a new release, he copies the scripts/files in their current state to a new directory named for the release.

I guess I'm wondering if the best thing would be to have the Dockerfile and the updated runCompareTwoGenomesColinear.sh script in the main repo directory, and then we can update the newest version in the Dockerfile each time a new release is made? Would that make the most sense to you? The improvements to the runCompareTwoGenomesColinear.sh script seem to be good, general changes that probably should be propagated to new releases.

I think this is the only line in the Dockerfile that we would have to update with a new released version?

ARG VER_FOLDER="v1.2.3"
warrenlr commented 4 years ago

yeah, that's poor organization. It was recommended we organize the repo in this fashion when we published the paper.. it is regrettable and now we're stuck with this.

lcoombe commented 4 years ago

Hi @keiranmraine,

So we have now deleted the version-specific directories to get rid of the unnecessary extra files. I think that will just mean that you'll have to tweak your Dockerfile, and push the changes to runCompareTwoGenomesColinear.sh to the script in the base repository directory instead?

keiranmraine commented 4 years ago

Replaced by #10 due to significant changes to master.