Upgrade to Pro — share decks privately, control downloads, hide ads and more …

テンクーでのClojure活用事例

 テンクーでのClojure活用事例

2023/07/13 ClojureエンジニアLT&交流会

OHTA Shogo

July 14, 2023
Tweet

More Decks by OHTA Shogo

Other Decks in Technology

Transcript

  1. $MPKVSF-5@0965 ͲΜͳձࣾʁ 6 ໊ࣾ גࣜձࣾςϯΫʔ (Xcoo, Inc.) ୅දऔక໾ ੢ଜ ๜༟

    ઃཱ 2011೥4݄1೔ ελοϑ 44໊ Web https://xcoo.co.jp ॴࡏ஍ ౦ژ౎จژ۠ຊڷ2-40-8 ࢿຊۚ 1ԯԁ ೝূ ISO/IEC 27001 (ISMS) ݈߁ܦӦ༏ྑ๏ਓ2021 ༀࣄ ୈҰछҩྍػث੡଄ൢചۀऀ ҩྍػث੡଄ۀऀ ߴ౓؅ཧҩྍػث౳ൢചۀ/ି༩ۀऀ ৘ใٕज़Ͱҩྍʹߩݙ ࣾձ࣮૷΁ͷՍ͚ڮ ή ϊϜҩྍͷτʔλϧιϦϡʔγϣϯιϑτ΢ΣΞ ͕Μή ϊϜҩྍͷ৘ใղੳ෦෼ΛτʔλϧͰαϙʔτ
  2. $MPKVSF-5@0965 ͕Μή ϊϜҩྍ 7 ͕Μࡉ๔ͷή ϊϜͷมԽΛಛఆ ͦͷή ϊϜͷมԽʹ߹Θͤͯ 
 ࠷దͳ࣏ྍɾ਍அɾ༧๷Λߦ͏

    ۙ೥͸ɺή ϊϜͷมԽʹ߹Θͤͨ෼ࢠඪతༀͷొ৔ʹΑΓɺ͕Μͷ࣏ྍ੒੷͕ܶతʹվળ T A G C A T G G G G C A T T A G C A T C A T
  3. $MPKVSF-5@0965 ։ൃνʔϜߏ੒ 8 Analysis Database Report όΠΦΠϯϑΥϚςΟΫεͷΞϧΰϦζϜܥ σʔλͷΞάϦήʔγϣϯ 
 ߴ଎ͳݕࡧ

    6*΍8FCܥ 
 ҩֶత஌ݟʹ΋ͱ͍ͮͯ൑ఆϩδοΫ Infrastructure + $ISPWJTΛӡ༻͢ΔͨΊͷ଍ճΓ 
 ֤πʔϧ΍ϥΠϒϥϦ΋࣮૷ 
 ͦͷଞͷࣾ಺γεςϜ΋։ൃ Chrovisͷ։ൃνʔϜ͸ΤϯδχΞ20ਓఔ౓
  4. $MPKVSF-5@0965 ։ൃن໛ 10 ϦϙδτϦ਺  ιʔείʔυͷϑΝΠϧ਺ DMK DMKT DMKD 

     ιʔείʔυߦ਺ DMK DMKT DMKD   ϓϧϦΫΤετ਺ Ҏ߱   ˞ݱࡏ
  5. $MPKVSF-5@0965 ςϯΫʔ͕։ൃ͢Δ044 w $ISPWJTؔ࿈ͷ044͸IUUQTHJUIVCDPNDISPWJTͰެ։͞Ε͍ͯΔ  DMKBNή ϊϜղੳͰΑ͘࢖ΘΕΔϑΝΠϧܗࣜͷೖग़ྗ΍ΞϧΰϦζϜͷ࣮૷  WBSJUZมҟͷදهܗࣜ )(74˱7$'

    ؒͷม׵౳  DMKIHWT)(74ه๏ͷύʔαɾϑΥʔϚολ  DMKEFDPOTUSVDUTJHTมҟύλʔϯ͔Βͷมҟγάωνϟͷಉఆ  EVYIVOE%69༥߹Ҩ఻ࢠͷݕग़  FUDFUD 11
  6. $MPKVSF-5@0965 Α͘࢖ΘΕΔϑΝΠϧܗࣜ w '"452  Ԙج഑ྻͱͦͷΫΦϦςΟ ֤Ԙج͕Ͳͷఔ౓ͷ͔֬Β͠͞ͰಡΊ͔ͨ ͷ৘ใΛه࿥ w 4".#".

     ֤഑ྻΛϦϑΝϨϯε഑ྻʹରͯ͠ΞϥΠϝϯτ ҐஔΛಉఆ ͨ݁͠ՌΛه࿥ w 7$'#$'  มҟίʔϧʹΑͬͯಉఆ͞ΕͨมҟΛه࿥ 12 '"452 4". #". 7$' #$' ΞϥΠϯϝϯτ มҟίʔϧ
  7. $MPKVSF-5@0965 DMKBNͷར༻ྫ 13 (require '[cljam.io.sam :as sam]) (with-open [r (sam/reader

    "in.bam") w (sam/writer "out.bam")] (sam/write-header w (sam/read-header r)) (sam/write-refs w (sam/read-refs r) (->> (sam/read-alignments r) (sam/write-alignments w))) (require '[cljam.io.vcf :as vcf]) (with-open [r (vcf/reader "in.vcf") w (vcf/writer "out.vcf")] (->> (vcf/read-variants r) (vcf/write-variants w))) 4".#".ͷಡΈॻ͖ 7$'#$'ͷಡΈॻ͖ (… {:qname "HWI-ST216_0147:5:48:13963:160437#0/1", :flag 0, :rname "chr1", :pos 23000088, :end 23000123, :mapq 255, :seq "TATAGGATTTGTTTGTTGTGTTTAGGTGGGTATAGT", :qual "HFHHHHEHHHHFHHHHEHFHHHHBHGBFFE>EGCFC", :cigar "36M", …} …) (… {:chr "19", :pos 111, :ref "A", :alt ["C"], :qual 9.6, :filter nil, :FORMAT (:GT :HQ), :NA00001 {:GT "0|0", :HQ (10 10)}, :NA00002 {:GT "0|0", :HQ (10 10)}, …} …)
  8. $MPKVSF-5@0965 γʔέϯεʹΑΔσʔλදݱ w ή ϊϜղੳͰ࢖ΘΕΔϑΝΠϧ͸αΠζ͕େ͖͘ͳΓ͕ͪ  ώτͷή ϊϜ഑ྻ͸ԯԘج  ϑΝΠϧͰ਺ेʙ਺ඦ(#ΦʔμʔʹͳΔ͜ͱ΋

     ϑΝΠϧશମͷ಺༰͸ϝϞϦ্ʹࡌΒͳ͍ w ͜ΕΒͷେ͖ͳσʔλΛ஗Ԇγʔέϯεͱͯ͠දݱ͢Δ͜ͱͰɺ$MPKVSFͰ ࣗવʹॲཧͰ͖Δ 16
  9. $MPKVSF-5@0965 3&1-Ͱͷ୳ࡧ w ίʔυʹखΛண͚Δલͷ3&1-Ͱͷࢼߦࡨޡ  "OBMZTJTνʔϜͷϓϩμΫτ։ൃ͸ʮԿΛͲ͏࡞Δ͔ ௚͔͢ ʯ͕࣮ࡍͷσʔλΛ ݟͳ͕Βܾ·Δݚڀ։ൃతͳଆ໘Λ΋ͭ͜ͱ΋͋Δ w

    Ͳ͜Ͱ΋σόοά؀ڥΛ࡞ΕΔ  VCFSKBS͑͋͞Ε͹ɺαʔό্΍%PDLFSίϯςφ಺౳ͷ؀ڥͰ΋$MPKVSFͷ3&1-Λ ্ཱͪ͛ͯΞϓϦέʔγϣϯͷ؀ڥΛ੔͑ΒΕΔ  ιέοτ3&1-Λ࢖͑͹ϦϞʔτσόοά΋༰қ 18
  10. $MPKVSF-5@0965 ͍Ζ͍ΖͳϓϥοτϑΥʔϜͰ࢖͑Δ w ςϯΫʔͰͷར༻ྫ  $MPKVSF PO+7. ղੳπʔϧɺ8FCαʔϏε όοΫΤϯυ 

     $MPKVSF4DSJQU8FCαʔϏε ϑϩϯτΤϯυ   #BCBTILB$-*πʔϧɺεΫϦϓςΟϯά w #BCBTILBBTCFUUFSγΣϧεΫϦϓτ  #BCBTILB͸ଞͷίϚϯυͱ૊Έ߹Θͤͯ࢖͍΍͘͢ɺେྔͷϑΝΠϧ͕ੜ੒͞Ε Δॲཧͷूܭ౳ʹศར  $MPKVSFͷศརͳίϨΫγϣϯΛඋ͑ɺͦͷؾʹͳΕ͹εϨου΋࢖͑Δɺ࢖͍ग़ ͕͋ΔεΫϦϓτݴޠͱͯ͠׆༻Ͱ͖Δ 20