From 831772d443500eaca2bcec25e11751c3c05e988b Mon Sep 17 00:00:00 2001 From: Alex Kanitz <alexander.kanitz@alumni.ethz.ch> Date: Sat, 9 Jul 2022 10:20:29 +0200 Subject: [PATCH] test: add test files and docs --- README.md | 29 +++++++++++++++++++++++++++++ ascii_alignment_pileup.R | 0 tests/test_files/test.bam | Bin 0 -> 1581 bytes tests/test_files/test.bam.bai | Bin 0 -> 46080 bytes tests/test_files/test.bed | 1 + tests/test_files/test.gff | 3 +++ 6 files changed, 33 insertions(+) mode change 100644 => 100755 ascii_alignment_pileup.R create mode 100644 tests/test_files/test.bam create mode 100644 tests/test_files/test.bam.bai create mode 100644 tests/test_files/test.bed create mode 100644 tests/test_files/test.gff diff --git a/README.md b/README.md index 6f00385..54bfd78 100644 --- a/README.md +++ b/README.md @@ -69,6 +69,35 @@ TACCATGAGGTAGTAGGTTGTATAGTT..................................................... .........................................................TATACAATCTACTGTCTTTCCT. 1 ``` +## Example + +There is a set of test files available in directory `tests/`. If you are in +the repository root directory, and all dependencies are installed and +available, you can use the following command to run a test: + +```bash +ascii_alignment_pileup.R \ + --verbose \ + --annotations="tests/test_files/test.gff" \ + --output-directory="$PWD" \ + "tests/test_files/test.bed" \ + "tests/test_files/test.bam" +``` + +Note that if you build a Docker image from the provided `Dockerfile` or pull +one of the prebuilt images (see section [Requirements](#requirements)), the +test files are included in those images. Therefore, you can also run the tests +in a container. To do that, start a container with: + +```bash +docker run --rm -it <IMAGE_ID> /bin/bash +``` + +Then run the test command above. + +In both cases, a successful test will create a file +`test.hsa-let-7a-1.min.1.pileup.tab` in the current working directory. + ## Options ```console diff --git a/ascii_alignment_pileup.R b/ascii_alignment_pileup.R old mode 100644 new mode 100755 diff --git a/tests/test_files/test.bam b/tests/test_files/test.bam new file mode 100644 index 0000000000000000000000000000000000000000..22d87f0ceb2ede21cb6bea4c9a693dc2c88a537b GIT binary patch literal 1581 zcmZYAdpr|*6aesfFD+eawM@9(HhdIWw6zr_ePrI6uz7`X8&_*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TOd}p64?T?Vh+G4HZ`)T+_l)D@j`%qS4T{~BPa_jtzVx%F( zQW0p7G-qfiE9*TZeQsD<&7Cqu=%{79oIFn#IjCPX9eX36n1QNpxo@WCm5?7KLVrU} zg4<_=Z?WykA<Q8jm4+6HhK9{8priql;F=k!zIjbD63>q-c}E4q{H^T2Vc#lVxEMs6 z4yhXme_zK7y&@2Epn~11e%#PVYqsEephd}B{Bppo-^oK3k!ya(#NDL7$g*^nkHJ?% zBBP+atZyZq$RMWscsz2+y}}Y?gb-8*_oD9f=K+E$<#&$Sor{sb+lF<DKJ2kgl?*qu zl<Nv`)o;!&1+8EtYF&CF-pWG^Dv$M<Za#|&8fX?6ePeqCS@gdEugq`h*zMb>I1kP$ z<H<BS%9>^9<n?EFBr$Z8YF#6qT<i;=3UC~urF(trrD$Cv{surcfU*gcXh2SYrC#<M z8#wj$mLJ+=+pjj(<y0HtZE3u1kF{W>&m6hfTL1Hz)bL+!LS~h9O-6FolB8eWJEn#| zV)$_}(j5~brH-xQh8{2W@U(mFv>S<m3sqQl=4~6bh9RSMz#;$xcVz>{HlSb=#2dh1 zVq_k_lcDr$lXcIbVPUeD1yt>mdiq``BpO&Zr@Dk5Tm6REo@roYc!ihHD5&>U`EpjZ z@~Hp#YNblk8zzqOl=CINmy@|17j<T0rRgz{>{L1-&~DAZ*x^!KkoFFHTgP?H>@|p( z6XxGe6z}uuZ8_eacq(y3d&QaA{F}YOWrO1OE5^@ac_S?7osUmqd|mU6(!I|7*~qF| zyVNw*gy%-p?{#$NHjfiQYkDe8CWn^XwlVmNYRt^S@VHj-nW40O_0DjF`7|W+@;!|m zo`-4sJ{A|`AGs$-R!zuTXckqt#HObnd?gN&M2y7wEQbSe>I2UaT~Y<d#7Q^ax&m}d Tqufb{|NqBOfWklbVe|PL=#Brh literal 0 HcmV?d00001 diff --git a/tests/test_files/test.bam.bai b/tests/test_files/test.bam.bai new file mode 100644 index 0000000000000000000000000000000000000000..9ac006efd3ce5851200a72d391f018eb8ad9735d GIT binary patch literal 46080 zcmeIyp%H{I5CzZ=0*|2v+5pG(LjkmK{opAJLJo5h{Y0`mN!I+Cym?xhCP{m(eN0N9 zZ1<k@U1>hwdjEfZ{9Zj}9ZL7isx=om$icth0tYz20S<70103K02ROh14sd`29N+*4 zIKTl8aDW3G-~b0WzyS_$fCC)h00%h00S<70103K02ROh14sd`29N+*4IKTl8aDW3G z-~b0WzyS_$fCC)h00%h00S<70103K02ROh14sd`29N+*4IKTl8aDW3G-~b0WzyS_$ zfCC)h00%h00S<70103K02ROh14sd`29N+*4IKTl8aDW3G-~b0WzyS_$fCC)h00%h0 z0S<70103K02ROh14sd`29N+*4IKTl8aDW3G-~b0WzyS_$fCC)h00%h00S<70103K0 P2ROh14shU|19j>IV>?!| literal 0 HcmV?d00001 diff --git a/tests/test_files/test.bed b/tests/test_files/test.bed new file mode 100644 index 0000000..b75f352 --- /dev/null +++ b/tests/test_files/test.bed @@ -0,0 +1 @@ +9 94175956 94176036 hsa-let-7a-1 0 + diff --git a/tests/test_files/test.gff b/tests/test_files/test.gff new file mode 100644 index 0000000..00e05f0 --- /dev/null +++ b/tests/test_files/test.gff @@ -0,0 +1,3 @@ +9 . miRNA_primary_transcript 94175957 94176036 . + . ID=MI0000060;Alias=MI0000060;Name=hsa-let-7a-1 +9 . miRNA 94175962 94175983 . + . ID=MIMAT0000062_2;Alias=MIMAT0000062;Name=hsa-let-7a-5p;Derives_from=MI0000060 +9 . miRNA 94176013 94176033 . + . ID=MIMAT0004481_1;Alias=MIMAT0004481;Name=hsa-let-7a-3p;Derives_from=MI0000060 -- GitLab