diff --git a/bio/ngscheckmate/makesnvpattern/environment.linux-64.pin.txt b/bio/ngscheckmate/makesnvpattern/environment.linux-64.pin.txt new file mode 100644 index 0000000000..71eb31f1a5 --- /dev/null +++ b/bio/ngscheckmate/makesnvpattern/environment.linux-64.pin.txt @@ -0,0 +1,116 @@ +# This file may be used to create an environment using: +# $ conda create --name --file +# platform: linux-64 +# created-by: conda 24.9.2 +@EXPLICIT +https://conda.anaconda.org/conda-forge/linux-64/_libgcc_mutex-0.1-conda_forge.tar.bz2#d7c89558ba9fa0495403155b64376d81 +https://conda.anaconda.org/conda-forge/noarch/_r-mutex-1.0.1-anacondar_1.tar.bz2#19f9db5f4f1b7f5ef5f6d67207f25f38 +https://conda.anaconda.org/conda-forge/linux-64/ca-certificates-2024.8.30-hbcca054_0.conda#c27d1c142233b5bc9ca570c6e2e0c244 +https://conda.anaconda.org/conda-forge/noarch/kernel-headers_linux-64-3.10.0-he073ed8_18.conda#ad8527bf134a90e1c9ed35fa0b64318c +https://conda.anaconda.org/conda-forge/linux-64/ld_impl_linux-64-2.39-hcc3a1bd_1.conda#737be0d34c22d24432049ab7a3214de4 +https://conda.anaconda.org/conda-forge/linux-64/libgcc-devel_linux-64-9.5.0-h0a57e50_19.tar.bz2#ab924f432810933b22bac6803733574d +https://conda.anaconda.org/conda-forge/linux-64/libstdcxx-devel_linux-64-9.5.0-h0a57e50_19.tar.bz2#110182af718f862c43ac3be597a02c8a +https://conda.anaconda.org/conda-forge/noarch/tzdata-2024b-hc8b5060_0.conda#8ac3367aafb1cc0a068483c580af8015 +https://conda.anaconda.org/conda-forge/linux-64/libgomp-14.2.0-h77fa898_1.conda#cc3573974587f12dda90d96e3e55a702 +https://conda.anaconda.org/conda-forge/noarch/sysroot_linux-64-2.17-h4a8ded7_18.conda#0ea96f90a10838f58412aa84fdd9df09 +https://conda.anaconda.org/conda-forge/linux-64/_openmp_mutex-4.5-2_gnu.tar.bz2#73aaf86a425cc6e73fcf236a5a46396d +https://conda.anaconda.org/conda-forge/linux-64/binutils_impl_linux-64-2.39-he00db2b_1.conda#3d726e8b51a1f5bfd66892a2b7d9db2d +https://conda.anaconda.org/conda-forge/linux-64/binutils_linux-64-2.39-h5fc0e48_13.conda#7f25a524665e4e2f8a5f86522f8d0e31 +https://conda.anaconda.org/conda-forge/linux-64/libgcc-14.2.0-h77fa898_1.conda#3cb76c3f10d3bc7f1105b2fc9db984df +https://conda.anaconda.org/conda-forge/linux-64/c-ares-1.34.3-hb9d3cd8_1.conda#ee228789a85f961d14567252a03e725f +https://conda.anaconda.org/conda-forge/linux-64/libexpat-2.6.4-h5888daf_0.conda#db833e03127376d461e1e13e76f09b6c +https://conda.anaconda.org/conda-forge/linux-64/libgcc-ng-14.2.0-h69a702a_1.conda#e39480b9ca41323497b05492a63bc35b +https://conda.anaconda.org/conda-forge/linux-64/libgfortran5-14.2.0-hd5240d6_1.conda#9822b874ea29af082e5d36098d25427d +https://conda.anaconda.org/conda-forge/linux-64/libstdcxx-14.2.0-hc0a3c3a_1.conda#234a5554c53625688d51062645337328 +https://conda.anaconda.org/conda-forge/linux-64/make-4.4.1-hb9d3cd8_2.conda#33405d2a66b1411db9f7242c8b97c9e7 +https://conda.anaconda.org/conda-forge/linux-64/pthread-stubs-0.4-hb9d3cd8_1002.conda#b3c17d95b5a10c6e64a21fa17573e70e +https://conda.anaconda.org/conda-forge/linux-64/xorg-libice-1.1.1-hb9d3cd8_1.conda#19608a9656912805b2b9a2f6bd257b04 +https://conda.anaconda.org/conda-forge/linux-64/xorg-libxau-1.0.11-hb9d3cd8_1.conda#77cbc488235ebbaab2b6e912d3934bae +https://conda.anaconda.org/conda-forge/linux-64/xorg-libxdmcp-1.1.5-hb9d3cd8_0.conda#8035c64cb77ed555e3f150b7b3972480 +https://conda.anaconda.org/conda-forge/linux-64/xorg-xorgproto-2024.1-hb9d3cd8_1.conda#7c21106b851ec72c037b162c216d8f05 +https://conda.anaconda.org/conda-forge/linux-64/bzip2-1.0.8-h4bc722e_7.conda#62ee74e96c5ebb0af99386de58cf9553 +https://conda.anaconda.org/conda-forge/linux-64/expat-2.6.4-h5888daf_0.conda#1d6afef758879ef5ee78127eb4cd2c4a +https://conda.anaconda.org/conda-forge/linux-64/fribidi-1.0.10-h36c2ea0_0.tar.bz2#ac7bc6a654f8f41b352b38f4051135f8 +https://conda.anaconda.org/conda-forge/linux-64/gettext-tools-0.22.5-he02047a_3.conda#fcd2016d1d299f654f81021e27496818 +https://conda.anaconda.org/conda-forge/linux-64/jpeg-9e-h0b41bf4_3.conda#c7a069243e1fbe9a556ed2ec030e6407 +https://conda.anaconda.org/conda-forge/linux-64/libdeflate-1.14-h166bdaf_0.tar.bz2#fc84a0446e4e4fb882e78d786cfb9734 +https://conda.anaconda.org/conda-forge/linux-64/libev-4.33-hd590300_2.conda#172bf1cd1ff8629f2b1179945ed45055 +https://conda.anaconda.org/conda-forge/linux-64/libgettextpo-0.22.5-he02047a_3.conda#efab66b82ec976930b96d62a976de8e7 +https://conda.anaconda.org/conda-forge/linux-64/libgfortran-14.2.0-h69a702a_1.conda#f1fd30127802683586f768875127a987 +https://conda.anaconda.org/conda-forge/linux-64/libiconv-1.17-hd590300_2.conda#d66573916ffcf376178462f1b61c941e +https://conda.anaconda.org/conda-forge/linux-64/libsanitizer-9.5.0-h2f262e1_19.tar.bz2#ec1a30921d0fac7d7b0a89686fa507ef +https://conda.anaconda.org/conda-forge/linux-64/libstdcxx-ng-14.2.0-h4852527_1.conda#8371ac6457591af2cf6159439c1fd051 +https://conda.anaconda.org/conda-forge/linux-64/libuuid-2.38.1-h0b41bf4_0.conda#40b61aab5c7ba9ff276c41cfffe6b80b +https://conda.anaconda.org/conda-forge/linux-64/libwebp-base-1.4.0-hd590300_0.conda#b26e8aa824079e1be0294e7152ca4559 +https://conda.anaconda.org/conda-forge/linux-64/libxcb-1.17.0-h8a09558_0.conda#92ed62436b625154323d40d5f2f11dd7 +https://conda.anaconda.org/conda-forge/linux-64/libxcrypt-4.4.36-hd590300_1.conda#5aa797f8787fe7a17d1b0821485b5adc +https://conda.anaconda.org/conda-forge/linux-64/libzlib-1.2.13-h4ab18f5_6.conda#27329162c0dc732bcf67a4e0cd488125 +https://conda.anaconda.org/conda-forge/linux-64/ncurses-6.5-he02047a_1.conda#70caf8bb6cf39a0b6b7efc885f51c0fe +https://conda.anaconda.org/conda-forge/linux-64/openssl-1.1.1w-hd590300_0.conda#301e70057a3bd399640bb16bbdf87995 +https://conda.anaconda.org/conda-forge/linux-64/sed-4.8-he412f7d_0.tar.bz2#7362f0042e95681f5d371c46c83ebd08 +https://conda.anaconda.org/conda-forge/linux-64/xz-5.2.6-h166bdaf_0.tar.bz2#2161070d867d1b1204ea749c8eec4ef0 +https://conda.anaconda.org/conda-forge/linux-64/gcc_impl_linux-64-9.5.0-h99780fb_19.tar.bz2#da185e537a469401ff741c5028b9320c +https://conda.anaconda.org/conda-forge/linux-64/graphite2-1.3.13-h59595ed_1003.conda#f87c7b7c2cb45f323ffbce941c78ab7c +https://conda.anaconda.org/conda-forge/linux-64/icu-67.1-he1b5a44_0.tar.bz2#7ced6a5e5c94726af797d2b5a2b09228 +https://conda.anaconda.org/conda-forge/linux-64/lerc-4.0.0-h27087fc_0.tar.bz2#76bbff344f0134279f225174e9064c8f +https://conda.anaconda.org/conda-forge/linux-64/libasprintf-0.22.5-he8f35ee_3.conda#4fab9799da9571266d05ca5503330655 +https://conda.anaconda.org/conda-forge/linux-64/libedit-3.1.20191231-he28a2e2_2.tar.bz2#4d331e44109e3f0e19b4cb8f9b82f3e1 +https://conda.anaconda.org/conda-forge/linux-64/libffi-3.2.1-he1b5a44_1007.tar.bz2#11389072d7d6036fd811c3d9460475cd +https://conda.anaconda.org/conda-forge/linux-64/libgettextpo-devel-0.22.5-he02047a_3.conda#9aba7960731e6b4547b3a52f812ed801 +https://conda.anaconda.org/conda-forge/linux-64/libgfortran-ng-14.2.0-h69a702a_1.conda#0a7f4cd238267c88e5d69f7826a407eb +https://conda.anaconda.org/conda-forge/linux-64/libnghttp2-1.51.0-hdcd2b5c_0.conda#c42b460bae0365fb9777b1ff9d09a554 +https://conda.anaconda.org/conda-forge/linux-64/libopenblas-0.3.28-pthreads_h94d23a6_1.conda#62857b389e42b36b686331bec0922050 +https://conda.anaconda.org/conda-forge/linux-64/libpng-1.6.43-h2797004_0.conda#009981dd9cfcaa4dbfa25ffaed86bcae +https://conda.anaconda.org/conda-forge/linux-64/libsqlite-3.46.0-hde9e2c9_0.conda#18aa975d2094c34aef978060ae7da7d8 +https://conda.anaconda.org/conda-forge/linux-64/libssh2-1.10.0-haa6b8db_3.tar.bz2#89acee135f0809a18a1f4537390aa2dd +https://conda.anaconda.org/conda-forge/linux-64/pcre-8.45-h9c3ff4c_0.tar.bz2#c05d1820a6d34ff07aaaab7a9b7eddaa +https://conda.anaconda.org/conda-forge/linux-64/perl-5.32.1-7_hd590300_perl5.conda#f2cfec9406850991f4e3d960cc9e3321 +https://conda.anaconda.org/conda-forge/linux-64/pixman-0.43.2-h59595ed_0.conda#71004cbf7924e19c02746ccde9fd7123 +https://conda.anaconda.org/conda-forge/linux-64/readline-8.2-h8228510_1.conda#47d31b792659ce70f470b5c82fdfb7a4 +https://conda.anaconda.org/conda-forge/linux-64/tbb-2020.2-h4bd325d_4.tar.bz2#850df84d9b8261b73102a8fce99f820f +https://conda.anaconda.org/conda-forge/linux-64/tk-8.6.13-noxft_h4845f30_101.conda#d453b98d9c83e71da0741bb0ff4d76bc +https://conda.anaconda.org/conda-forge/linux-64/xorg-libsm-1.2.4-he73a12e_1.conda#05a8ea5f446de33006171a7afe6ae857 +https://conda.anaconda.org/conda-forge/linux-64/xorg-libx11-1.8.10-h4f16b4b_0.conda#0b666058a179b744a622d0a4a0c56353 +https://conda.anaconda.org/conda-forge/linux-64/zlib-1.2.13-h4ab18f5_6.conda#559d338a4234c2ad6e676f460a093e67 +https://conda.anaconda.org/conda-forge/linux-64/zstd-1.5.6-ha6fb4c9_0.conda#4d056880988120e29d75bfff282e0f45 +https://conda.anaconda.org/conda-forge/linux-64/bwidget-1.9.14-ha770c72_1.tar.bz2#5746d6202ba2abad4a4707f2a2462795 +https://conda.anaconda.org/conda-forge/linux-64/freetype-2.12.1-h267a509_2.conda#9ae35c3d96db2c94ce0cef86efdfa2cb +https://conda.anaconda.org/conda-forge/linux-64/gcc_linux-64-9.5.0-h4258300_13.conda#942a9833d5a5930ca7b3722dbc4ca9c0 +https://conda.anaconda.org/conda-forge/linux-64/gfortran_impl_linux-64-9.5.0-hf1096a2_19.tar.bz2#77749a2835210e114d95a34d88d8d22a +https://conda.anaconda.org/conda-forge/linux-64/gxx_impl_linux-64-9.5.0-h99780fb_19.tar.bz2#2715a43223661e9cee63bc977e42e55e +https://conda.anaconda.org/conda-forge/linux-64/krb5-1.17.2-h926e7f8_0.tar.bz2#926325c11478d6e781e76072c117763b +https://conda.anaconda.org/conda-forge/linux-64/libasprintf-devel-0.22.5-he8f35ee_3.conda#1091193789bb830127ed067a9e01ac57 +https://conda.anaconda.org/conda-forge/linux-64/libblas-3.9.0-25_linux64_openblas.conda#8ea26d42ca88ec5258802715fe1ee10b +https://conda.anaconda.org/conda-forge/linux-64/libtiff-4.4.0-h82bc61c_5.conda#e712a63a21f9db647982971dc121cdcf +https://conda.anaconda.org/conda-forge/linux-64/libxml2-2.9.10-h68273f3_2.tar.bz2#0315cae0468a1e17f1e7fad5b13d53f8 +https://conda.anaconda.org/conda-forge/linux-64/pcre2-10.36-h032f7d1_1.tar.bz2#ffc35300e65074a386aa151f135986b8 +https://conda.anaconda.org/conda-forge/linux-64/sqlite-3.46.0-h6d4b2fc_0.conda#77ea8dff5cf8550cc8f5629a6af56323 +https://conda.anaconda.org/conda-forge/linux-64/tktable-2.10-h8bc8fbc_6.conda#dff3627fec2c0584ded391205295abf0 +https://conda.anaconda.org/conda-forge/linux-64/xorg-libxext-1.3.6-hb9d3cd8_0.conda#febbab7d15033c913d53c7a2c102309d +https://conda.anaconda.org/conda-forge/linux-64/xorg-libxrender-0.9.11-hb9d3cd8_1.conda#a7a49a8b85122b49214798321e2e96b4 +https://conda.anaconda.org/conda-forge/linux-64/xorg-libxt-1.3.1-hb9d3cd8_0.conda#279b0de5f6ba95457190a1c459a64e31 +https://conda.anaconda.org/conda-forge/linux-64/fontconfig-2.14.2-h14ed4e7_0.conda#0f69b688f52ff6da70bccb7ff7001d1d +https://conda.anaconda.org/conda-forge/linux-64/gettext-0.22.5-he02047a_3.conda#c7f243bbaea97cd6ea1edd693270100e +https://conda.anaconda.org/conda-forge/linux-64/gfortran_linux-64-9.5.0-hdb51d14_13.conda#61b7cae3f6924e45af68c7ffc48bc214 +https://conda.anaconda.org/conda-forge/linux-64/gxx_linux-64-9.5.0-h43f449f_13.conda#2acc0f10529a57cb166ce6bfd61bab10 +https://conda.anaconda.org/conda-forge/linux-64/libcblas-3.9.0-25_linux64_openblas.conda#5dbd1b0fc0d01ec5e0e1fbe667281a11 +https://conda.anaconda.org/conda-forge/linux-64/libcurl-7.76.1-hc4aaa36_1.tar.bz2#349a288d04af695b639e5f947df3c2d0 +https://conda.anaconda.org/conda-forge/linux-64/liblapack-3.9.0-25_linux64_openblas.conda#4dc03a53fc69371a6158d0ed37214cd3 +https://conda.anaconda.org/conda-forge/linux-64/python-2.7.15-h5a48372_1011_cpython.tar.bz2#d1824ac0987155f58a03b7ffda01db38 +https://conda.anaconda.org/conda-forge/linux-64/curl-7.76.1-h979ede3_1.tar.bz2#28e9133d2ad9ba3081e52548ea20c870 +https://conda.anaconda.org/conda-forge/linux-64/gsl-2.6-he838d99_2.tar.bz2#d54a10784d331d7b13f8af19acf297b7 +https://conda.anaconda.org/bioconda/linux-64/htslib-1.12-h9093b5e_1.tar.bz2#50992d90a43601fc3e77b48c76aca3f0 +https://conda.anaconda.org/conda-forge/linux-64/libglib-2.66.3-hbe7bbb4_0.tar.bz2#d5a09a9e981849b751cb75656b7302a0 +https://conda.anaconda.org/conda-forge/linux-64/python_abi-2.7-1_cp27mu.tar.bz2#02d6ad6bce3a798e6ee85494cd9b3d8d +https://conda.anaconda.org/conda-forge/noarch/wheel-0.37.1-pyhd8ed1ab_0.tar.bz2#1ca02aaf78d9c70d9a81a3bed5752022 +https://conda.anaconda.org/bioconda/linux-64/bcftools-1.12-h45bccc9_1.tar.bz2#f1a250774b39eed81ea9027205ffbf15 +https://conda.anaconda.org/bioconda/linux-64/bowtie-1.2.3-py27h2bce143_2.tar.bz2#7ebec80bbb03ace67315dd03736c425a +https://conda.anaconda.org/conda-forge/linux-64/cairo-1.16.0-h9f066cc_1006.tar.bz2#9f8ef44d205f35056dccc1a92fbe6592 +https://conda.anaconda.org/conda-forge/linux-64/certifi-2019.11.28-py27h8c360ce_1.tar.bz2#a345324a2547908c1f9ca4b65d93f5ba +https://conda.anaconda.org/bioconda/linux-64/samtools-1.6-hb116620_7.tar.bz2#cce66eac7c57bd1a400ade017ed19d2d +https://conda.anaconda.org/conda-forge/linux-64/harfbuzz-2.7.2-ha5b49bf_1.tar.bz2#71644db5e3e9a0bd6e04439d06e5190b +https://conda.anaconda.org/conda-forge/linux-64/setuptools-44.0.0-py27_0.tar.bz2#a1dcb0ca393c777d0611faf5b86602be +https://conda.anaconda.org/conda-forge/linux-64/pango-1.42.4-h69149e4_5.tar.bz2#9e325ab71e743c57955e73172d1db615 +https://conda.anaconda.org/conda-forge/noarch/pip-20.1.1-pyh9f0ad1d_0.tar.bz2#cd67a20c73ff2514cf5f34cae28fc867 +https://conda.anaconda.org/conda-forge/linux-64/r-base-4.0.3-ha43b4e8_3.tar.bz2#8d0313987e021b34d6539de08a4ee344 +https://conda.anaconda.org/bioconda/noarch/ngscheckmate-1.0.1-py27pl5321r40hdfd78af_1.tar.bz2#a0557c7159a568002624b19964f0f277 diff --git a/bio/ngscheckmate/makesnvpattern/environment.yaml b/bio/ngscheckmate/makesnvpattern/environment.yaml new file mode 100644 index 0000000000..e523940994 --- /dev/null +++ b/bio/ngscheckmate/makesnvpattern/environment.yaml @@ -0,0 +1,6 @@ +channels: + - conda-forge + - bioconda + - nodefaults +dependencies: + - ngscheckmate=1.0.1 diff --git a/bio/ngscheckmate/makesnvpattern/meta.yaml b/bio/ngscheckmate/makesnvpattern/meta.yaml new file mode 100644 index 0000000000..34f37a8c40 --- /dev/null +++ b/bio/ngscheckmate/makesnvpattern/meta.yaml @@ -0,0 +1,15 @@ +name: NGSCheckMate MakeSNVPattern +url: https://github.com/parklab/NGSCheckMate?tab=readme-ov-file#1-patterngenerator +description: Generate SNP pattern file +authors: + - Thibault Dayris +input: + - bed: Path to bed intervals + - fasta: Path to fasta genome sequence + - index: List of paths to `bowtie` index files +output: + - fasta: Path to fasta-formatted regions extracted from bed intervals. Unique numeric names are given to each region. + - pattern_uncompressed: Path to uncompressed patterns, used for internal patterns checks only. Col1 = Sequence, Col2 = reference max count, Col3 = variant max count. + - pattern: Path to compressed (binary) pattern file. Main output file. +notes: | + This script uses 4 threads while running bowtie and does not allow user to change this value. diff --git a/bio/ngscheckmate/makesnvpattern/test/Snakefile b/bio/ngscheckmate/makesnvpattern/test/Snakefile new file mode 100644 index 0000000000..10dac5f880 --- /dev/null +++ b/bio/ngscheckmate/makesnvpattern/test/Snakefile @@ -0,0 +1,22 @@ +rule test_ngscheckmate_makesnvpattern: + input: + fasta="genome.fasta", + bed="variants.bed", + index=multiext( + "genome_bwt", + ".1.ebwt", + ".2.ebwt", + ".3.ebwt", + ".4.ebwt", + ".rev.1.ebwt", + ".rev.2.ebwt", + ), + output: + pattern="genome.pt", + fasta=temp("genome.pt.fasta"), + pattern_uncompressed=temp("genome.pt.txt.sorted"), + threads: 4 + log: + "makesnvpattern.log", + wrapper: + "master/bio/ngscheckmate/makesnvpattern" diff --git a/bio/ngscheckmate/makesnvpattern/test/genome.fasta b/bio/ngscheckmate/makesnvpattern/test/genome.fasta new file mode 100644 index 0000000000..31fdf75b9c --- /dev/null +++ b/bio/ngscheckmate/makesnvpattern/test/genome.fasta @@ -0,0 +1,10 @@ +>21 +TCTTCTGGCTTAGAGGTAGATCATCTTGGTCCAATCAGACTGAAATGCCTTGAGGCTAGATTTCAGTCTT +TGTGGCAGCTGGTGAATTTCTAGTTTGCCTTTTCAGCTAGGGATTAGCTTTTTAGGGGTCCCAATGCCTA +GGGAGATTTCTAGGTCCTCTGTTCCTTGCTGACCTCCAATTTTGTCTATCCTTTTGCTGAGAGGTCTGCT +TAACTTCCTTTTAGTCAGGTAGCTCCATTTTATGCTAAGCTTCTTAGTTGCTCACCTTCTGCAGCTAAAG +AATCAGAAAATGCTGTGAAGGAAAAACAAAATGAAATTGCATTGTTTCTACCGGCCCTTTATCAAGCCCT +GGCCACCATGATAGTCATGAATTCCAATTGTTGTCTATGCAGGCCTACCAGATTTCTAACATCTCTGAGC +TACCATTTTCTTCTTAGCTATCTGCTCAGCAAATGTATCCAAATGAAAGGCTGTGGAGAATGTTGAAATC +ACTTCAATGTGTTTCTCTTCTTTCTGGGAGCTTACACACTCAAGTTCTGGATGCTTTGATTGCTATCAGA +AGCCGTTAAATAGCTACTTATTTTTAATTAATTTTACCCAGCTTTCATAATTGTTCTTGCCAGGTGGGAT diff --git a/bio/ngscheckmate/makesnvpattern/test/genome_bwt.1.ebwt b/bio/ngscheckmate/makesnvpattern/test/genome_bwt.1.ebwt new file mode 100644 index 0000000000..a4fbcd6e5b Binary files /dev/null and b/bio/ngscheckmate/makesnvpattern/test/genome_bwt.1.ebwt differ diff --git a/bio/ngscheckmate/makesnvpattern/test/genome_bwt.2.ebwt b/bio/ngscheckmate/makesnvpattern/test/genome_bwt.2.ebwt new file mode 100644 index 0000000000..842545e4c1 Binary files /dev/null and b/bio/ngscheckmate/makesnvpattern/test/genome_bwt.2.ebwt differ diff --git a/bio/ngscheckmate/makesnvpattern/test/genome_bwt.3.ebwt b/bio/ngscheckmate/makesnvpattern/test/genome_bwt.3.ebwt new file mode 100644 index 0000000000..5e04e7b2da Binary files /dev/null and b/bio/ngscheckmate/makesnvpattern/test/genome_bwt.3.ebwt differ diff --git a/bio/ngscheckmate/makesnvpattern/test/genome_bwt.4.ebwt b/bio/ngscheckmate/makesnvpattern/test/genome_bwt.4.ebwt new file mode 100644 index 0000000000..a49eff1357 --- /dev/null +++ b/bio/ngscheckmate/makesnvpattern/test/genome_bwt.4.ebwt @@ -0,0 +1 @@ +÷­=¢#ǽ^pH l½h#x¿kغð7þÖب<ö?ªW°5*ò7zÝ~½-uÁ¿7׿-¢·=ôõ‡Ž]ü³ ö=¾õmØ€p°í‚Ào¼SZýX­E±ŒÇ¼ï͆Öò7ÄÝbSü÷=6·ì\ÀÚ®ûGìþÝ÷·Š=ø­l¿¼Í!X>06=ÿÃÃ?öÇð~o¡« \ No newline at end of file diff --git a/bio/ngscheckmate/makesnvpattern/test/genome_bwt.rev.1.ebwt b/bio/ngscheckmate/makesnvpattern/test/genome_bwt.rev.1.ebwt new file mode 100644 index 0000000000..871306ca1f Binary files /dev/null and b/bio/ngscheckmate/makesnvpattern/test/genome_bwt.rev.1.ebwt differ diff --git a/bio/ngscheckmate/makesnvpattern/test/genome_bwt.rev.2.ebwt b/bio/ngscheckmate/makesnvpattern/test/genome_bwt.rev.2.ebwt new file mode 100644 index 0000000000..e5041dafc5 Binary files /dev/null and b/bio/ngscheckmate/makesnvpattern/test/genome_bwt.rev.2.ebwt differ diff --git a/bio/ngscheckmate/makesnvpattern/test/variants.bed b/bio/ngscheckmate/makesnvpattern/test/variants.bed new file mode 100644 index 0000000000..a785720590 --- /dev/null +++ b/bio/ngscheckmate/makesnvpattern/test/variants.bed @@ -0,0 +1,4 @@ +21 21 22 rs7278737 C A +21 51 52 rs2229741 G A +21 60 61 rs1047978 T A +21 100 101 rs232518 T C diff --git a/bio/ngscheckmate/makesnvpattern/wrapper.py b/bio/ngscheckmate/makesnvpattern/wrapper.py new file mode 100644 index 0000000000..dd5c3c47b9 --- /dev/null +++ b/bio/ngscheckmate/makesnvpattern/wrapper.py @@ -0,0 +1,34 @@ +# coding: utf-8 + +__author__ = "Thibault Dayris" +__copyright__ = "Copyright 2024, Thibault Dayris" +__email__ = "thibault.dayris@gustaveroussy.fr" +__license__ = "MIT" + +from snakemake.shell import shell +from tempfile import TemporaryDirectory +from os.path import commonprefix + +log = snakemake.log_fmt_shell(stdout=True, stderr=True, append=True) + +index = commonprefix(snakemake.input.index).rstrip(".") + +with TemporaryDirectory() as tempdir: + shell( + "makesnvpattern.pl " + "{snakemake.input.bed} " + "{snakemake.input.fasta} " + "{index} {tempdir} snake_out {log}" + ) + + # Ensure user can name each file according to their need + output_mapping = { + "fasta": f"{tempdir}/snake_out.fasta", + "pattern": f"{tempdir}/snake_out.pt", + "pattern_uncompressed": f"{tempdir}/snake_out.uniq.txt.sorted", + } + + for output_key, temp_file in output_mapping.items(): + output_path = snakemake.output.get(output_key) + if output_path: + shell("mv --verbose {temp_file:q} {output_path:q} {log}") diff --git a/test_wrappers.py b/test_wrappers.py index 5c47f4ea9b..70a633fa31 100644 --- a/test_wrappers.py +++ b/test_wrappers.py @@ -564,6 +564,13 @@ def test_purge_dups_get_seqs(run): ) +def test_ngscheckmate_makesnvpattern(run): + run( + "bio/ngscheckmate/makesnvpattern", + ["snakemake", "--cores", "1", "--use-conda", "-F", "genome.pt"], + ) + + def test_purge_dups_ngscstat(run): run( "bio/purge_dups/ngscstat",